[CRIU] [PATCH 3/9] crtools: add a function for showing netlink sockets
Andrey Vagin
avagin at openvz.org
Thu Mar 14 09:24:07 EDT 2013
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
Makefile.crtools | 1 +
include/sockets.h | 1 +
sk-netlink.c | 11 +++++++++++
3 files changed, 13 insertions(+)
create mode 100644 sk-netlink.c
diff --git a/Makefile.crtools b/Makefile.crtools
index 4a0ce0d..eef5d82 100644
--- a/Makefile.crtools
+++ b/Makefile.crtools
@@ -19,6 +19,7 @@ obj-y += sk-inet.o
obj-y += sk-tcp.o
obj-y += sk-unix.o
obj-y += sk-packet.o
+obj-y += sk-netlink.o
obj-y += sk-queue.o
obj-y += files.o
obj-y += files-reg.o
diff --git a/include/sockets.h b/include/sockets.h
index cfc1516..816f863 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -42,6 +42,7 @@ extern int resolve_unix_peers(void);
extern void show_unixsk(int fd, struct cr_options *o);
extern void show_inetsk(int fd, struct cr_options *o);
extern void show_sk_queues(int fd, struct cr_options *o);
+extern void show_netlinksk(int fd, struct cr_options *o);
extern char *skfamily2s(u32 f);
extern char *sktype2s(u32 t);
diff --git a/sk-netlink.c b/sk-netlink.c
new file mode 100644
index 0000000..f31cce5
--- /dev/null
+++ b/sk-netlink.c
@@ -0,0 +1,11 @@
+#include <unistd.h>
+
+#include "crtools.h"
+
+#include "protobuf.h"
+#include "protobuf/sk-netlink.pb-c.h"
+
+void show_netlinksk(int fd, struct cr_options *o)
+{
+ pb_show_plain(fd, PB_NETLINKSK);
+}
--
1.7.11.7
More information about the CRIU
mailing list