diff options
author | Pavel Tikhomirov <ptikhomirov@virtuozzo.com> | 2016-04-28 19:38:50 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-05-27 13:32:03 +0300 |
commit | 7ea8601c99a89832b804ef77bbcb047875978758 (patch) | |
tree | ff2aab0ec1290306925806e182497d2986a094e1 /images/sysctl.proto | |
parent | 3f6ad33f8f1965a238fb6be7c081599dc4388748 (diff) |
protobuf: add SysctlEntry for ipv4/ipv6 sysctl confs or some others
int32 with boolean value in protobuf has the same size with bool,
many sysctls are boolean but we don't lose anything by storing them
in int32, so add only int32 and string fields
will need string field for stable_secret ipv6 sysctl
also such fromat allows us to easily handle non-present int sysctls
we can check if we have it using has_*arg
v3: rebase images/Makefile to criu-dev branch
v4: use enum for type
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'images/sysctl.proto')
-rw-r--r-- | images/sysctl.proto | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/images/sysctl.proto b/images/sysctl.proto new file mode 100644 index 000000000..c64789a7f --- /dev/null +++ b/images/sysctl.proto @@ -0,0 +1,11 @@ +enum SysctlType { + __CTL_STR = 5; + CTL_32 = 6; +} + +message sysctl_entry { + required SysctlType type = 1; + + optional int32 iarg = 2; + optional string sarg = 3; +} |