From 89b58eaa2706c54aeb0a48252d1cfbd2b5ae01b7 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 4 Mar 2023 03:48:48 +0100 Subject: irmd: Add configuration file support This adds initial support for configuration files using the C99 TOML parser (to be installed separately from https://github.com/cktan/tomlc99). The default location for the IRMd configuration file is /etc/ouroboros/irmd.conf. This is configurable at build time. An example file will be installed in the configuration directory with the name irmd.conf.example. Config file support can be disabled using the DISABLE_CONFIGFILE build option. There were some refactors and changes to the configuration messages and protobuf files. This works towards consolidation of protobuf C as an option for more generic handling of serialization/deserialization of various messages. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/ipcp_config.proto | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/lib/ipcp_config.proto') diff --git a/src/lib/ipcp_config.proto b/src/lib/ipcp_config.proto index c6481b09..1ff304f1 100644 --- a/src/lib/ipcp_config.proto +++ b/src/lib/ipcp_config.proto @@ -42,7 +42,7 @@ message uni_config_msg { message eth_config_msg { required string dev = 1; - optional uint32 ethertype = 2; + required uint32 ethertype = 2; } message udp_config_msg { @@ -53,22 +53,8 @@ message udp_config_msg { message ipcp_config_msg { required layer_info_msg layer_info = 1; - required int32 ipcp_type = 2; + required uint32 ipcp_type = 2; optional uni_config_msg unicast = 3; optional udp_config_msg udp = 4; optional eth_config_msg eth = 5; } - -enum enroll_code { - ENROLL_REQ = 1; - ENROLL_BOOT = 2; - ENROLL_DONE = 4; -}; - -message enroll_msg { - required enroll_code code = 1; - optional ipcp_config_msg conf = 2; - optional int64 t_sec = 3; - optional uint32 t_nsec = 4; - optional int32 result = 5; -}; \ No newline at end of file -- cgit v1.2.3