parse_ini.h 766 B

1234567891011121314151617181920212223242526
  1. #ifndef _PARSE_INI_H_
  2. #define _PARSE_INI_H_
  3. /*
  4. * parse_ini.h: routines for loading nagios-plugin defaults from ini
  5. * configuration files.
  6. */
  7. /* np_arg_list is a linked list of arguments passed between the ini
  8. * parser and the argument parser to construct the final array */
  9. typedef struct np_arg_el {
  10. char *arg;
  11. struct np_arg_el *next;
  12. } np_arg_list;
  13. /* NP_DEFAULT_INI_PATH: compile-time default location for ini file */
  14. #ifndef NP_DEFAULT_INI_PATH
  15. # define NP_DEFAULT_INI_PATH "/etc/nagios-plugins/plugins.ini"
  16. #endif /* NP_DEFAULT_INI_PATH */
  17. /* np_load_defaults: load the default configuration (if present) for
  18. * a plugin from the ini file
  19. */
  20. np_arg_list* np_get_defaults(const char *locator, const char *default_section);
  21. #endif /* _PARSE_INI_H_ */