Blame SOURCES/0037-uapi-add-include-linux-vm_sockets_diag.h.patch

cd1737
From 74e00895532b878a902f9b0477e1b00d1be9df59 Mon Sep 17 00:00:00 2001
cd1737
From: Stefano Brivio <sbrivio@redhat.com>
cd1737
Date: Sun, 22 Oct 2017 21:44:25 +0200
cd1737
Subject: [PATCH] uapi: add include linux/vm_sockets_diag.h
cd1737
cd1737
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1472759
cd1737
Upstream Status: iproute2.git commit e9b0d82dfac2
cd1737
cd1737
commit e9b0d82dfac25912cf757945d9caf6fe2371f526
cd1737
Author: Stephen Hemminger <stephen@networkplumber.org>
cd1737
Date:   Wed Oct 11 10:49:25 2017 -0700
cd1737
cd1737
    uapi: add include linux/vm_sockets_diag.h
cd1737
cd1737
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
cd1737
cd1737
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
cd1737
---
cd1737
 include/uapi/linux/vm_sockets_diag.h | 33 +++++++++++++++++++++++++++++++++
cd1737
 1 file changed, 33 insertions(+)
cd1737
 create mode 100644 include/uapi/linux/vm_sockets_diag.h
cd1737
cd1737
diff --git a/include/uapi/linux/vm_sockets_diag.h b/include/uapi/linux/vm_sockets_diag.h
cd1737
new file mode 100644
cd1737
index 0000000..a732a6f
cd1737
--- /dev/null
cd1737
+++ b/include/uapi/linux/vm_sockets_diag.h
cd1737
@@ -0,0 +1,33 @@
cd1737
+/* AF_VSOCK sock_diag(7) interface for querying open sockets */
cd1737
+
cd1737
+#ifndef __VM_SOCKETS_DIAG_H__
cd1737
+#define __VM_SOCKETS_DIAG_H__
cd1737
+
cd1737
+#include <linux/types.h>
cd1737
+
cd1737
+/* Request */
cd1737
+struct vsock_diag_req {
cd1737
+	__u8	sdiag_family;	/* must be AF_VSOCK */
cd1737
+	__u8	sdiag_protocol;	/* must be 0 */
cd1737
+	__u16	pad;		/* must be 0 */
cd1737
+	__u32	vdiag_states;	/* query bitmap (e.g. 1 << TCP_LISTEN) */
cd1737
+	__u32	vdiag_ino;	/* must be 0 (reserved) */
cd1737
+	__u32	vdiag_show;	/* must be 0 (reserved) */
cd1737
+	__u32	vdiag_cookie[2];
cd1737
+};
cd1737
+
cd1737
+/* Response */
cd1737
+struct vsock_diag_msg {
cd1737
+	__u8	vdiag_family;	/* AF_VSOCK */
cd1737
+	__u8	vdiag_type;	/* SOCK_STREAM or SOCK_DGRAM */
cd1737
+	__u8	vdiag_state;	/* sk_state (e.g. TCP_LISTEN) */
cd1737
+	__u8	vdiag_shutdown; /* local RCV_SHUTDOWN | SEND_SHUTDOWN */
cd1737
+	__u32   vdiag_src_cid;
cd1737
+	__u32   vdiag_src_port;
cd1737
+	__u32   vdiag_dst_cid;
cd1737
+	__u32   vdiag_dst_port;
cd1737
+	__u32	vdiag_ino;
cd1737
+	__u32	vdiag_cookie[2];
cd1737
+};
cd1737
+
cd1737
+#endif /* __VM_SOCKETS_DIAG_H__ */
cd1737
-- 
cd1737
1.8.3.1
cd1737