summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/parse_utils.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-02-15 15:45:04 +0100
committerXavier Simonart <xavier.simonart@intel.com>2018-02-15 15:45:04 +0100
commite739edca4824d29614204d0f511afe5477dabbf7 (patch)
tree72258fdc2c9b2aac7d67695a227a35bd039e13b5 /VNFs/DPPD-PROX/parse_utils.h
parent485bc363a8709459b560c3446c707765d58d6aef (diff)
Add support for comments in configuration variables
This feature will enable the possibility to have many cores configured in a prox config file, and enable/disable them through variables. For instance, a [core $var1] section in a config file will result in [core 1] if $var1 = 1; the whole section and section content will be ignored if $var1=# Before this implementation, [#core 1] or [core #] was already treated as a commented out section (the whole section was commented). But there was no way to define a variable $var = # to comment a section through a variable. Note that in today's implementation any non numerical (except s, h, t, -) characteter in the [core] section header (and not only #) will cause the section to be ignored. It would probably be better to consider # (as maybe N/A and none) as comments, and everything else as error. This is however not supported by the change request. Change-Id: Id4e2b27a1f9b6d595e0b442dcd971ad44a502031 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/parse_utils.h')
-rw-r--r--VNFs/DPPD-PROX/parse_utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/parse_utils.h b/VNFs/DPPD-PROX/parse_utils.h
index 14aee9eb..27ebb0bd 100644
--- a/VNFs/DPPD-PROX/parse_utils.h
+++ b/VNFs/DPPD-PROX/parse_utils.h
@@ -118,4 +118,6 @@ const char* get_parse_err(void);
/* Returns true if running from a virtual machine. */
int is_virtualized(void);
+int parse_single_var(char *val, size_t len, const char *name);
+
#endif /* _PARSE_UTILS_H_ */