summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2012-08-13 05:53:28 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-14 16:56:33 -0700
commit96ec6327144e1ac9e6676e34fae8b49c2102fa5a (patch)
tree1c2e914c7bbd573db850f2cf340b2e49226df8a0 /include/linux
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')
-rw-r--r--include/linux/Kbuild1
-rw-r--r--include/linux/packet_diag.h24
2 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index d9a754474878..d823d603dadd 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -195,6 +195,7 @@ header-y += in_route.h
header-y += sock_diag.h
header-y += inet_diag.h
header-y += unix_diag.h
+header-y += packet_diag.h
header-y += inotify.h
header-y += input.h
header-y += ioctl.h
diff --git a/include/linux/packet_diag.h b/include/linux/packet_diag.h
new file mode 100644
index 000000000000..fa19300ca334
--- /dev/null
+++ b/include/linux/packet_diag.h
@@ -0,0 +1,24 @@
+#ifndef __PACKET_DIAG_H__
+#define __PACKET_DIAG_H__
+
+#include <linux/types.h>
+
+struct packet_diag_req {
+ __u8 sdiag_family;
+ __u8 sdiag_protocol;
+ __u16 pad;
+ __u32 pdiag_ino;
+ __u32 pdiag_show;
+ __u32 pdiag_cookie[2];
+};
+
+struct packet_diag_msg {
+ __u8 pdiag_family;
+ __u8 pdiag_type;
+ __u16 pdiag_num;
+
+ __u32 pdiag_ino;
+ __u32 pdiag_cookie[2];
+};
+
+#endif