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:
@@ -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[] = {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user