1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef __PACKET_DIAG_H__ 8 #define __PACKET_DIAG_H__ 9 #include <linux/types.h> 10 struct packet_diag_req { 11 __u8 sdiag_family; 12 __u8 sdiag_protocol; 13 __u16 pad; 14 __u32 pdiag_ino; 15 __u32 pdiag_show; 16 __u32 pdiag_cookie[2]; 17 }; 18 #define PACKET_SHOW_INFO 0x00000001 19 #define PACKET_SHOW_MCLIST 0x00000002 20 #define PACKET_SHOW_RING_CFG 0x00000004 21 #define PACKET_SHOW_FANOUT 0x00000008 22 #define PACKET_SHOW_MEMINFO 0x00000010 23 #define PACKET_SHOW_FILTER 0x00000020 24 struct packet_diag_msg { 25 __u8 pdiag_family; 26 __u8 pdiag_type; 27 __u16 pdiag_num; 28 __u32 pdiag_ino; 29 __u32 pdiag_cookie[2]; 30 }; 31 enum { 32 PACKET_DIAG_INFO, 33 PACKET_DIAG_MCLIST, 34 PACKET_DIAG_RX_RING, 35 PACKET_DIAG_TX_RING, 36 PACKET_DIAG_FANOUT, 37 PACKET_DIAG_UID, 38 PACKET_DIAG_MEMINFO, 39 PACKET_DIAG_FILTER, 40 __PACKET_DIAG_MAX, 41 }; 42 #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1) 43 struct packet_diag_info { 44 __u32 pdi_index; 45 __u32 pdi_version; 46 __u32 pdi_reserve; 47 __u32 pdi_copy_thresh; 48 __u32 pdi_tstamp; 49 __u32 pdi_flags; 50 #define PDI_RUNNING 0x1 51 #define PDI_AUXDATA 0x2 52 #define PDI_ORIGDEV 0x4 53 #define PDI_VNETHDR 0x8 54 #define PDI_LOSS 0x10 55 }; 56 struct packet_diag_mclist { 57 __u32 pdmc_index; 58 __u32 pdmc_count; 59 __u16 pdmc_type; 60 __u16 pdmc_alen; 61 __u8 pdmc_addr[32]; 62 }; 63 struct packet_diag_ring { 64 __u32 pdr_block_size; 65 __u32 pdr_block_nr; 66 __u32 pdr_frame_size; 67 __u32 pdr_frame_nr; 68 __u32 pdr_retire_tmo; 69 __u32 pdr_sizeof_priv; 70 __u32 pdr_features; 71 }; 72 #endif 73