[CRIU] [PATCH 1/8] protobuf: add image for netlink sockets
Andrey Vagin
avagin at openvz.org
Mon Mar 25 11:28:42 EDT 2013
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/protobuf.h | 1 +
protobuf.c | 2 ++
protobuf/Makefile | 1 +
protobuf/sk-netlink.proto | 16 ++++++++++++++++
4 files changed, 20 insertions(+)
create mode 100644 protobuf/sk-netlink.proto
diff --git a/include/protobuf.h b/include/protobuf.h
index 222a173..68e8dde 100644
--- a/include/protobuf.h
+++ b/include/protobuf.h
@@ -31,6 +31,7 @@ enum {
PB_INETSK,
PB_UNIXSK,
PB_PACKETSK,
+ PB_NETLINKSK,
PB_PIPES,
PB_FIFO,
PB_PIPES_DATA,
diff --git a/protobuf.c b/protobuf.c
index d5dde47..8f10ead 100644
--- a/protobuf.c
+++ b/protobuf.c
@@ -52,6 +52,7 @@
#include "protobuf/file-lock.pb-c.h"
#include "protobuf/rlimit.pb-c.h"
#include "protobuf/pagemap.pb-c.h"
+#include "protobuf/sk-netlink.pb-c.h"
typedef size_t (*pb_getpksize_t)(void *obj);
typedef size_t (*pb_pack_t)(void *obj, void *where);
@@ -135,6 +136,7 @@ void cr_pb_init(void)
CR_PB_DESC(RLIMIT, Rlimit, rlimit);
CR_PB_MDESC_INIT(cr_pb_descs[PB_PAGEMAP_HEAD], PagemapHead, pagemap_head);
CR_PB_DESC(PAGEMAP, Pagemap, pagemap);
+ CR_PB_DESC(NETLINKSK, NetlinkSk, netlink_sk);
}
/*
diff --git a/protobuf/Makefile b/protobuf/Makefile
index de3bf11..5e9da53 100644
--- a/protobuf/Makefile
+++ b/protobuf/Makefile
@@ -37,6 +37,7 @@ proto-obj-y += mm.o
proto-obj-y += sk-opts.o
proto-obj-y += sk-unix.o
proto-obj-y += sk-inet.o
+proto-obj-y += sk-netlink.o
proto-obj-y += packet-sock.o
proto-obj-y += ipc-var.o
proto-obj-y += ipc-desc.o
diff --git a/protobuf/sk-netlink.proto b/protobuf/sk-netlink.proto
new file mode 100644
index 0000000..593848b
--- /dev/null
+++ b/protobuf/sk-netlink.proto
@@ -0,0 +1,16 @@
+import "fown.proto";
+import "sk-opts.proto";
+
+message netlink_sk_entry {
+ required uint32 id = 1;
+ required uint32 ino = 2;
+ required uint32 protocol = 3;
+ required uint32 state = 4;
+ required uint32 flags = 6;
+ required uint32 portid = 7;
+ repeated uint32 groups = 8;
+ required uint32 dst_portid = 9;
+ required uint32 dst_group = 10;
+ required fown_entry fown = 11;
+ required sk_opts_entry opts = 12;
+}
--
1.7.11.7
More information about the CRIU
mailing list