Home | History | Annotate | Download | only in linux
      1 #ifndef STRACE_LINUX_PACKET_DIAG_H
      2 #define STRACE_LINUX_PACKET_DIAG_H
      3 
      4 struct packet_diag_req {
      5 	uint8_t sdiag_family;
      6 	uint8_t sdiag_protocol;
      7 	uint16_t pad;
      8 	uint32_t pdiag_ino;
      9 	uint32_t pdiag_show;
     10 	uint32_t pdiag_cookie[2];
     11 };
     12 
     13 #define PACKET_SHOW_INFO	0x00000001
     14 #define PACKET_SHOW_MCLIST	0x00000002
     15 #define PACKET_SHOW_RING_CFG	0x00000004
     16 #define PACKET_SHOW_FANOUT	0x00000008
     17 #define PACKET_SHOW_MEMINFO	0x00000010
     18 #define PACKET_SHOW_FILTER	0x00000020
     19 
     20 struct packet_diag_msg {
     21 	uint8_t pdiag_family;
     22 	uint8_t pdiag_type;
     23 	uint16_t pdiag_num;
     24 
     25 	uint32_t pdiag_ino;
     26 	uint32_t pdiag_cookie[2];
     27 };
     28 
     29 enum {
     30 	PACKET_DIAG_INFO,
     31 	PACKET_DIAG_MCLIST,
     32 	PACKET_DIAG_RX_RING,
     33 	PACKET_DIAG_TX_RING,
     34 	PACKET_DIAG_FANOUT,
     35 	PACKET_DIAG_UID,
     36 	PACKET_DIAG_MEMINFO,
     37 	PACKET_DIAG_FILTER,
     38 };
     39 
     40 struct packet_diag_info {
     41 	uint32_t pdi_index;
     42 	uint32_t pdi_version;
     43 	uint32_t pdi_reserve;
     44 	uint32_t pdi_copy_thresh;
     45 	uint32_t pdi_tstamp;
     46 	uint32_t pdi_flags;
     47 
     48 #define PDI_RUNNING	0x1
     49 #define PDI_AUXDATA	0x2
     50 #define PDI_ORIGDEV	0x4
     51 #define PDI_VNETHDR	0x8
     52 #define PDI_LOSS	0x10
     53 };
     54 
     55 struct packet_diag_mclist {
     56 	uint32_t pdmc_index;
     57 	uint32_t pdmc_count;
     58 	uint16_t pdmc_type;
     59 	uint16_t pdmc_alen;
     60 	uint8_t pdmc_addr[32]; /* MAX_ADDR_LEN */
     61 };
     62 
     63 struct packet_diag_ring {
     64 	uint32_t pdr_block_size;
     65 	uint32_t pdr_block_nr;
     66 	uint32_t pdr_frame_size;
     67 	uint32_t pdr_frame_nr;
     68 	uint32_t pdr_retire_tmo;
     69 	uint32_t pdr_sizeof_priv;
     70 	uint32_t pdr_features;
     71 };
     72 
     73 #endif /* !STRACE_LINUX_PACKET_DIAG_H */
     74