0001
0002 #ifndef __PACKET_DIAG_H__
0003 #define __PACKET_DIAG_H__
0004
0005 #include <linux/types.h>
0006
0007 struct packet_diag_req {
0008 __u8 sdiag_family;
0009 __u8 sdiag_protocol;
0010 __u16 pad;
0011 __u32 pdiag_ino;
0012 __u32 pdiag_show;
0013 __u32 pdiag_cookie[2];
0014 };
0015
0016 #define PACKET_SHOW_INFO 0x00000001
0017 #define PACKET_SHOW_MCLIST 0x00000002
0018 #define PACKET_SHOW_RING_CFG 0x00000004
0019 #define PACKET_SHOW_FANOUT 0x00000008
0020 #define PACKET_SHOW_MEMINFO 0x00000010
0021 #define PACKET_SHOW_FILTER 0x00000020
0022
0023 struct packet_diag_msg {
0024 __u8 pdiag_family;
0025 __u8 pdiag_type;
0026 __u16 pdiag_num;
0027
0028 __u32 pdiag_ino;
0029 __u32 pdiag_cookie[2];
0030 };
0031
0032 enum {
0033
0034 PACKET_DIAG_INFO,
0035 PACKET_DIAG_MCLIST,
0036 PACKET_DIAG_RX_RING,
0037 PACKET_DIAG_TX_RING,
0038 PACKET_DIAG_FANOUT,
0039 PACKET_DIAG_UID,
0040 PACKET_DIAG_MEMINFO,
0041 PACKET_DIAG_FILTER,
0042
0043 __PACKET_DIAG_MAX,
0044 };
0045
0046 #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1)
0047
0048 struct packet_diag_info {
0049 __u32 pdi_index;
0050 __u32 pdi_version;
0051 __u32 pdi_reserve;
0052 __u32 pdi_copy_thresh;
0053 __u32 pdi_tstamp;
0054 __u32 pdi_flags;
0055
0056 #define PDI_RUNNING 0x1
0057 #define PDI_AUXDATA 0x2
0058 #define PDI_ORIGDEV 0x4
0059 #define PDI_VNETHDR 0x8
0060 #define PDI_LOSS 0x10
0061 };
0062
0063 struct packet_diag_mclist {
0064 __u32 pdmc_index;
0065 __u32 pdmc_count;
0066 __u16 pdmc_type;
0067 __u16 pdmc_alen;
0068 __u8 pdmc_addr[32];
0069 };
0070
0071 struct packet_diag_ring {
0072 __u32 pdr_block_size;
0073 __u32 pdr_block_nr;
0074 __u32 pdr_frame_size;
0075 __u32 pdr_frame_nr;
0076 __u32 pdr_retire_tmo;
0077 __u32 pdr_sizeof_priv;
0078 __u32 pdr_features;
0079 };
0080
0081 #endif