network: introduce network_config_source_from_string()

It is currently unused, but will be used later.
Preparation for later commits.
This commit is contained in:
Yu Watanabe
2024-11-05 02:55:15 +09:00
parent 5ca212a984
commit bf6e9b383d
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ static const char * const network_config_source_table[_NETWORK_CONFIG_SOURCE_MAX
[NETWORK_CONFIG_SOURCE_RUNTIME] = "runtime",
};
DEFINE_STRING_TABLE_LOOKUP_TO_STRING(network_config_source, NetworkConfigSource);
DEFINE_STRING_TABLE_LOOKUP(network_config_source, NetworkConfigSource);
int network_config_state_to_string_alloc(NetworkConfigState s, char **ret) {
static const char* states[] = {
+1
View File
@@ -56,6 +56,7 @@ CONFIG_PARSER_PROTOTYPE(config_parse_ip_masquerade);
CONFIG_PARSER_PROTOTYPE(config_parse_mud_url);
const char* network_config_source_to_string(NetworkConfigSource s) _const_;
NetworkConfigSource network_config_source_from_string(const char* s) _pure_;
int network_config_state_to_string_alloc(NetworkConfigState s, char **ret);