|
icmpmonitor
1.2
About: Multiple host monitoring tool (using the InterNet Control Message Protocol "ECHO" facility)
Fossies Dox: icmpmonitor-1.2.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation) ![]() |

Go to the source code of this file.
Data Structures | |
| struct | Dict |
| struct | Cfg |
Functions | |
| struct Cfg * | readcfg (const char *filename) |
| int | writecfg (const char *filename, struct Cfg *) |
| char * | cfgfind (const char *, struct Cfg *, int offset) |
| void | freecfg (struct Cfg *) |
| struct Cfg * | newcfg () |
| void | sortcfg (struct Cfg *) |
| void | cfg_add_entry (struct Cfg *, struct Dict *) |
| void | cfg_new_entry (struct Cfg *cfg, const char *name,...) |
| void | cfg_new_ulong_entry (struct Cfg *cfg, const char *name, unsigned long v) |
| void | cfg_new_fmt_ulong_entry (struct Cfg *cfg, const char *name, unsigned long v, int w) |
Adds new cfg entry to the end of the dictionary. you need to call sortcfg() before it could be really used.
Definition at line 292 of file cfg.c.
References Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::nelements, Cfg::nelements, Cfg::nelements, Cfg::nelements, Cfg::nelements, and Cfg::nelements.
Referenced by cfg_new_entry(), and readcfg().
| void cfg_new_entry | ( | struct Cfg * | cfg, |
| const char * | name, | ||
| ... | |||
| ) |
Adds entry with given name and list of values. list should be terminated with NULL and contain only const char pointers.
Definition at line 317 of file cfg.c.
References cfg_add_entry(), Dict::name, Dict::nvalues, Dict::value, Dict::value, and Dict::value.
Referenced by cfg_new_fmt_ulong_entry(), and cfg_new_ulong_entry().
| void cfg_new_fmt_ulong_entry | ( | struct Cfg * | cfg, |
| const char * | name, | ||
| unsigned long | v, | ||
| int | w | ||
| ) |
add long extended to 'w' chars, with added trailing zeros.
| v | - field value |
| w | - field width |
Definition at line 361 of file cfg.c.
References cfg_new_entry().
| void cfg_new_ulong_entry | ( | struct Cfg * | cfg, |
| const char * | name, | ||
| unsigned long | v | ||
| ) |
Definition at line 348 of file cfg.c.
References cfg_new_entry().
| char* cfgfind | ( | const char * | , |
| struct Cfg * | , | ||
| int | offset | ||
| ) |
Definition at line 44 of file cfg.c.
References Cfg::dict, Cfg::nelements, and Dict::value.
| void freecfg | ( | struct Cfg * | ) |
Definition at line 91 of file cfg.c.
References Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Dict::name, Dict::name, Cfg::nelements, Dict::nvalues, Dict::value, Dict::value, Dict::value, and Dict::value.
| struct Cfg* newcfg | ( | ) |
Definition at line 368 of file cfg.c.
References Cfg::nelements.
| struct Cfg* readcfg | ( | const char * | filename) |
Definition at line 116 of file cfg.c.
References cfg_add_entry(), Cfg::dict, freecfg(), freecfg(), freecfg(), MAXTOKENLEN, Dict::name, Cfg::nelements, Cfg::nelements, Dict::nvalues, Dict::nvalues, Dict::nvalues, Dict::nvalues, Dict::nvalues, sortcfg(), Dict::value, Dict::value, Dict::value, Dict::value, and Dict::value.
| void sortcfg | ( | struct Cfg * | cfg) |
Sorts cfg. Should be called after each modification before attempting to retrieve any data.
Definition at line 278 of file cfg.c.
References Cfg::dict, and Cfg::nelements.
Referenced by readcfg().
| int writecfg | ( | const char * | filename, |
| struct Cfg * | |||
| ) |
Definition at line 65 of file cfg.c.
References Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Cfg::dict, Dict::name, Dict::name, Cfg::nelements, Dict::nvalues, Dict::value, and Dict::value.