]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Fix unix socket diagnostic build
authorStephen Hemminger <shemminger@vyatta.com>
Fri, 20 Jan 2012 20:48:00 +0000 (12:48 -0800)
committerStephen Hemminger <shemminger@vyatta.com>
Fri, 20 Jan 2012 20:48:00 +0000 (12:48 -0800)
Get updated headers incorporated into build environment
and include required sock_diag.h.

include/linux/sock_diag.h [new file with mode: 0644]
include/linux/unix_diag.h
misc/ss.c

diff --git a/include/linux/sock_diag.h b/include/linux/sock_diag.h
new file mode 100644 (file)
index 0000000..39e4b1c
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef __SOCK_DIAG_H__
+#define __SOCK_DIAG_H__
+
+#include <linux/types.h>
+
+#define SOCK_DIAG_BY_FAMILY 20
+
+struct sock_diag_req {
+       __u8    sdiag_family;
+       __u8    sdiag_protocol;
+};
+
+enum {
+       SK_MEMINFO_RMEM_ALLOC,
+       SK_MEMINFO_RCVBUF,
+       SK_MEMINFO_WMEM_ALLOC,
+       SK_MEMINFO_SNDBUF,
+       SK_MEMINFO_FWD_ALLOC,
+       SK_MEMINFO_WMEM_QUEUED,
+       SK_MEMINFO_OPTMEM,
+
+       SK_MEMINFO_VARS,
+};
+
+#endif
index 3f7afb007d70779e74d0e162317973aab9cbf3c8..b1d2bf16b33c92fe4f5e27aafe5d34fe87d5fede 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __UNIX_DIAG_H__
 #define __UNIX_DIAG_H__
 
+#include <linux/types.h>
+
 struct unix_diag_req {
        __u8    sdiag_family;
        __u8    sdiag_protocol;
@@ -16,6 +18,7 @@ struct unix_diag_req {
 #define UDIAG_SHOW_PEER                0x00000004      /* show peer socket info */
 #define UDIAG_SHOW_ICONS       0x00000008      /* show pending connections */
 #define UDIAG_SHOW_RQLEN       0x00000010      /* show skb receive queue len */
+#define UDIAG_SHOW_MEMINFO     0x00000020      /* show memory info of a socket */
 
 struct unix_diag_msg {
        __u8    udiag_family;
@@ -33,6 +36,7 @@ enum {
        UNIX_DIAG_PEER,
        UNIX_DIAG_ICONS,
        UNIX_DIAG_RQLEN,
+       UNIX_DIAG_MEMINFO,
 
        UNIX_DIAG_MAX,
 };
@@ -42,4 +46,9 @@ struct unix_diag_vfs {
        __u32   udiag_vfs_dev;
 };
 
+struct unix_diag_rqlen {
+       __u32   udiag_rqueue;
+       __u32   udiag_wqueue;
+};
+
 #endif
index 00cb56917dcfeed6f962c288070e7ea557ab8b2a..7a15d698ffbe122780021a702af88ebf655b11ed 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -34,6 +34,7 @@
 #include "SNAPSHOT.h"
 
 #include <netinet/tcp.h>
+#include <linux/sock_diag.h>
 #include <linux/inet_diag.h>
 #include <linux/unix_diag.h>