1/* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6#ifndef __PACKET_DIAG_H__ 7#define __PACKET_DIAG_H__ 8#include <linux/types.h> 9struct packet_diag_req { 10 __u8 sdiag_family; 11 __u8 sdiag_protocol; 12 __u16 pad; 13 __u32 pdiag_ino; 14 __u32 pdiag_show; 15 __u32 pdiag_cookie[2]; 16}; 17#define PACKET_SHOW_INFO 0x00000001 18#define PACKET_SHOW_MCLIST 0x00000002 19#define PACKET_SHOW_RING_CFG 0x00000004 20#define PACKET_SHOW_FANOUT 0x00000008 21#define PACKET_SHOW_MEMINFO 0x00000010 22#define PACKET_SHOW_FILTER 0x00000020 23struct packet_diag_msg { 24 __u8 pdiag_family; 25 __u8 pdiag_type; 26 __u16 pdiag_num; 27 __u32 pdiag_ino; 28 __u32 pdiag_cookie[2]; 29}; 30enum { 31 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) 43struct 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}; 56struct 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}; 63struct 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