[CRIU] [PATCH 1/4] netdevconf: add net_device_ipv4_conf_entry to protobuf
Pavel Tikhomirov
ptikhomirov at parallels.com
Wed Sep 10 01:02:25 PDT 2014
add magic and descriptors for image file
Signed-off-by: Pavel Tikhomirov <ptikhomirov at parallels.com>
---
cr-show.c | 1 +
image-desc.c | 1 +
include/image-desc.h | 1 +
include/magic.h | 1 +
include/protobuf-desc.h | 1 +
protobuf-desc.c | 1 +
protobuf/netdev.proto | 5 +++++
7 files changed, 11 insertions(+)
diff --git a/cr-show.c b/cr-show.c
index 0e1a2c6..f958a2f 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -322,6 +322,7 @@ static struct show_image_info show_infos[] = {
SHOW_PLAIN(TUNFILE),
SHOW_PLAINS(EXT_FILE),
SHOW_PLAIN(IRMAP_CACHE),
+ SHOW_PLAIN(NETDEV_CONF),
{ FILE_LOCKS_MAGIC, PB_FILE_LOCK, false, NULL, "3:%u", },
{ TCP_STREAM_MAGIC, PB_TCP_STREAM, true, show_tcp_stream, "1:%u 2:%u 3:%u 4:%u 12:%u", },
diff --git a/image-desc.c b/image-desc.c
index 49dc29d..1625cc1 100644
--- a/image-desc.c
+++ b/image-desc.c
@@ -62,6 +62,7 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
FD_ENTRY(TCP_STREAM, "tcp-stream-%x"),
FD_ENTRY(MNTS, "mountpoints-%d"),
FD_ENTRY(NETDEV, "netdev-%d"),
+ FD_ENTRY(NETDEV_CONF, "netdev-confs-%d"),
FD_ENTRY(IFADDR, "ifaddr-%d"),
FD_ENTRY(ROUTE, "route-%d"),
FD_ENTRY(IPTABLES, "iptables-%d"),
diff --git a/include/image-desc.h b/include/image-desc.h
index 93b3392..d5f6f0b 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -40,6 +40,7 @@ enum {
CR_FD_IFADDR,
CR_FD_ROUTE,
CR_FD_IPTABLES,
+ CR_FD_NETDEV_CONF,
_CR_FD_NETNS_TO,
CR_FD_PSTREE,
diff --git a/include/magic.h b/include/magic.h
index 5192a60..0248a57 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -61,6 +61,7 @@
#define INOTIFY_WD_MAGIC 0x54562009 /* Svetlogorsk (Rauschen) */
#define MNTS_MAGIC 0x55563928 /* Petushki */
#define NETDEV_MAGIC 0x57373951 /* Yaroslavl */
+#define NETDEV_CONF_MAGIC 0x55933752 /* Dolgoprudny */
#define TTY_FILES_MAGIC 0x59433025 /* Pushkin */
#define TTY_INFO_MAGIC 0x59453036 /* Kolpino */
#define FILE_LOCKS_MAGIC 0x54323616 /* Kaluga */
diff --git a/include/protobuf-desc.h b/include/protobuf-desc.h
index 01c9f4c..d0052ce 100644
--- a/include/protobuf-desc.h
+++ b/include/protobuf-desc.h
@@ -63,6 +63,7 @@ enum {
PB_SK_QUEUES,
PB_IPCNS_MSG,
PB_IPCNS_MSG_ENT,
+ PB_NETDEV_CONF,
PB_MAX,
};
diff --git a/protobuf-desc.c b/protobuf-desc.c
index b97418b..18b1192 100644
--- a/protobuf-desc.c
+++ b/protobuf-desc.c
@@ -94,6 +94,7 @@ void cr_pb_init(void)
CR_PB_DESC(IPCNS_MSG_ENT, IpcMsg, ipc_msg);
CR_PB_DESC(REMAP_FPATH, RemapFilePath, remap_file_path);
CR_PB_DESC(NETDEV, NetDevice, net_device);
+ CR_PB_DESC(NETDEV_CONF, NetDeviceIpv4Conf, net_device_ipv4_conf);
CR_PB_MDESC_INIT(cr_pb_descs[PB_PAGEMAP_HEAD], PagemapHead, pagemap_head);
#include "protobuf-desc-gen.h"
diff --git a/protobuf/netdev.proto b/protobuf/netdev.proto
index 4fa23d3..fc92107 100644
--- a/protobuf/netdev.proto
+++ b/protobuf/netdev.proto
@@ -24,3 +24,8 @@ message net_device_entry {
optional bytes address = 7;
}
+
+message net_device_ipv4_conf_entry {
+ required string dev_name = 1;
+ repeated uint32 data = 2;
+}
--
1.9.3
More information about the CRIU
mailing list