Commit | Line | Data |
---|---|---|
96ec6327 PE |
1 | #ifndef __PACKET_DIAG_H__ |
2 | #define __PACKET_DIAG_H__ | |
3 | ||
4 | #include <linux/types.h> | |
5 | ||
6 | struct packet_diag_req { | |
7 | __u8 sdiag_family; | |
8 | __u8 sdiag_protocol; | |
9 | __u16 pad; | |
10 | __u32 pdiag_ino; | |
11 | __u32 pdiag_show; | |
12 | __u32 pdiag_cookie[2]; | |
13 | }; | |
14 | ||
8a360be0 | 15 | #define PACKET_SHOW_INFO 0x00000001 /* Basic packet_sk information */ |
eea68e2f | 16 | #define PACKET_SHOW_MCLIST 0x00000002 /* A set of packet_diag_mclist-s */ |
8a360be0 | 17 | |
96ec6327 PE |
18 | struct packet_diag_msg { |
19 | __u8 pdiag_family; | |
20 | __u8 pdiag_type; | |
21 | __u16 pdiag_num; | |
22 | ||
23 | __u32 pdiag_ino; | |
24 | __u32 pdiag_cookie[2]; | |
25 | }; | |
26 | ||
8a360be0 PE |
27 | enum { |
28 | PACKET_DIAG_INFO, | |
eea68e2f | 29 | PACKET_DIAG_MCLIST, |
8a360be0 PE |
30 | |
31 | PACKET_DIAG_MAX, | |
32 | }; | |
33 | ||
34 | struct packet_diag_info { | |
35 | __u32 pdi_index; | |
36 | __u32 pdi_version; | |
37 | __u32 pdi_reserve; | |
38 | __u32 pdi_copy_thresh; | |
39 | __u32 pdi_tstamp; | |
40 | __u32 pdi_flags; | |
41 | ||
42 | #define PDI_RUNNING 0x1 | |
43 | #define PDI_AUXDATA 0x2 | |
44 | #define PDI_ORIGDEV 0x4 | |
45 | #define PDI_VNETHDR 0x8 | |
46 | #define PDI_LOSS 0x10 | |
47 | }; | |
48 | ||
eea68e2f PE |
49 | struct packet_diag_mclist { |
50 | __u32 pdmc_index; | |
51 | __u32 pdmc_count; | |
52 | __u16 pdmc_type; | |
53 | __u16 pdmc_alen; | |
54 | __u8 pdmc_addr[MAX_ADDR_LEN]; | |
55 | }; | |
56 | ||
96ec6327 | 57 | #endif |