(root)/
strace-6.5/
src/
print_group_req.c
       1  /*
       2   * Copyright (c) 2015-2021 The strace developers.
       3   * All rights reserved.
       4   *
       5   * SPDX-License-Identifier: LGPL-2.1-or-later
       6   */
       7  
       8  #include "defs.h"
       9  #include <netinet/in.h>
      10  
      11  # include DEF_MPERS_TYPE(struct_group_req)
      12  typedef struct group_req struct_group_req;
      13  
      14  #include MPERS_DEFS
      15  
      16  MPERS_PRINTER_DECL(void, print_group_req, struct tcb *const tcp,
      17  		   const kernel_ulong_t addr, const int len)
      18  {
      19  	struct_group_req greq;
      20  
      21  	if (len < (int) sizeof(greq)) {
      22  		printaddr(addr);
      23  	} else if (!umove_or_printaddr(tcp, addr, &greq)) {
      24  		tprint_struct_begin();
      25  		PRINT_FIELD_IFINDEX(greq, gr_interface);
      26  		tprint_struct_next();
      27  		PRINT_FIELD_SOCKADDR(greq, gr_group, tcp);
      28  		tprint_struct_end();
      29  	}
      30  }