Pavel Emelyanov | 96ec632 | 2012-08-13 05:53:28 +0000 | [diff] [blame] | 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 | |
Pavel Emelyanov | 8a360be | 2012-08-13 05:55:46 +0000 | [diff] [blame^] | 15 | #define PACKET_SHOW_INFO 0x00000001 /* Basic packet_sk information */ |
| 16 | |
Pavel Emelyanov | 96ec632 | 2012-08-13 05:53:28 +0000 | [diff] [blame] | 17 | struct packet_diag_msg { |
| 18 | __u8 pdiag_family; |
| 19 | __u8 pdiag_type; |
| 20 | __u16 pdiag_num; |
| 21 | |
| 22 | __u32 pdiag_ino; |
| 23 | __u32 pdiag_cookie[2]; |
| 24 | }; |
| 25 | |
Pavel Emelyanov | 8a360be | 2012-08-13 05:55:46 +0000 | [diff] [blame^] | 26 | enum { |
| 27 | PACKET_DIAG_INFO, |
| 28 | |
| 29 | PACKET_DIAG_MAX, |
| 30 | }; |
| 31 | |
| 32 | struct packet_diag_info { |
| 33 | __u32 pdi_index; |
| 34 | __u32 pdi_version; |
| 35 | __u32 pdi_reserve; |
| 36 | __u32 pdi_copy_thresh; |
| 37 | __u32 pdi_tstamp; |
| 38 | __u32 pdi_flags; |
| 39 | |
| 40 | #define PDI_RUNNING 0x1 |
| 41 | #define PDI_AUXDATA 0x2 |
| 42 | #define PDI_ORIGDEV 0x4 |
| 43 | #define PDI_VNETHDR 0x8 |
| 44 | #define PDI_LOSS 0x10 |
| 45 | }; |
| 46 | |
Pavel Emelyanov | 96ec632 | 2012-08-13 05:53:28 +0000 | [diff] [blame] | 47 | #endif |