Nanostack Border Router is a generic mbed border router implementation that provides the 6LoWPAN ND or Thread border router initialization logic.
source/cfg_parser.c
- Committer:
- mbed_official
- Date:
- 2019-11-27
- Revision:
- 108:0c14bd1d3334
- Parent:
- 0:85f4174a8e29
File content as of revision 108:0c14bd1d3334:
/* * Copyright (c) 2016 ARM Limited. All rights reserved. */ #include <string.h> #include "cfg_parser.h" const char *cfg_string(conf_t *conf, const char *key, const char *default_value) { for (; (conf && conf->name); conf++) { if (0 == strcmp(conf->name, key)) { return conf->svalue; } } return default_value; } int cfg_int(conf_t *conf, const char *key, int default_value) { for (; (conf && conf->name); conf++) { if (0 == strcmp(conf->name, key)) { return conf->ivalue; } } return default_value; }