[CRIU] [PATCH 2/9] protobuf: add image for netlink sockets
Andrey Vagin
avagin at openvz.org
Thu Mar 14 09:24:06 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 | 17 +++++++++++++++++
4 files changed, 21 insertions(+)
create mode 100644 protobuf/sk-netlink.proto
diff --git a/include/protobuf.h b/include/protobuf.h
index bbd4ded..7cf82a7 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 c02e516..a23f83c 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/siginfo.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);
@@ -134,6 +135,7 @@ void cr_pb_init(void)
CR_PB_DESC(FILE_LOCK, FileLock, file_lock);
CR_PB_DESC(RLIMIT, Rlimit, rlimit);
CR_PB_DESC(SIGINFO, Siginfo, siginfo);
+ CR_PB_DESC(NETLINKSK, NetlinkSk, netlink_sk);
}
/*
diff --git a/protobuf/Makefile b/protobuf/Makefile
index 9db78ad..a85dd1d 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..a82119b
--- /dev/null
+++ b/protobuf/sk-netlink.proto
@@ -0,0 +1,17 @@
+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 type = 5;
+ 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