aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/packet_diag.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2012-08-13 01:53:28 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-14 19:56:33 -0400
commit96ec6327144e1ac9e6676e34fae8b49c2102fa5a (patch)
tree1c2e914c7bbd573db850f2cf340b2e49226df8a0 /include/linux/packet_diag.h
parent2787b04b6c5e7607510e8248b38b0aeacb5505f6 (diff)
packet: Diag core and basic socket info dumping
The diag module can be built independently from the af_packet.ko one, just like it's done in unix sockets. The core dumping message carries the info available at socket creation time, i.e. family, type and protocol (in the same byte order as shown in the proc file). The socket inode number and cookie is reserved for future per-socket info retrieving. The per-protocol filtering is also reserved for future by requiring the sdiag_protocol to be zero. Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/packet_diag.h')
-rw-r--r--include/linux/packet_diag.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/packet_diag.h b/include/linux/packet_diag.h
new file mode 100644
index 00000000000..fa19300ca33
--- /dev/null
+++ b/include/linux/packet_diag.h
@@ -0,0 +1,24 @@
1#ifndef __PACKET_DIAG_H__
2#define __PACKET_DIAG_H__
3
4#include <linux/types.h>
5
6struct 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
15struct packet_diag_msg {
16 __u8 pdiag_family;
17 __u8 pdiag_type;
18 __u16 pdiag_num;
19
20 __u32 pdiag_ino;
21 __u32 pdiag_cookie[2];
22};
23
24#endif