naccyde / rpms / iproute

Forked from rpms/iproute 10 months ago
Clone

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

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