4
0

extra_opts.h 975 B

1234567891011121314151617181920212223
  1. #ifndef NAGIOS_EXTRA_OPTS_H_INCLUDED
  2. #define NAGIOS_EXTRA_OPTS_H_INCLUDED
  3. /*
  4. * extra_opts.h: routines for loading nagios-plugin defaults from ini
  5. * configuration files.
  6. */
  7. /* np_extra_opts: Process the --extra-opts arguments and create a new argument
  8. * array with ini-processed and argument-passed arguments together. The
  9. * ini-procesed arguments always come first (in the order of --extra-opts
  10. * arguments). If no --extra-opts arguments are provided or returned nothing
  11. * it returns **argv otherwise the new array is returned. --extra-opts are
  12. * always removed from **argv. The original pointers from **argv are kept in
  13. * the new array to preserve ability to overwrite arguments in processlist.
  14. *
  15. * The new array can be easily freed as long as a pointer to the original one
  16. * is kept. See my_free() in lib/tests/test_opts1.c for an example.
  17. */
  18. char **np_extra_opts(int *argc, char **argv, const char *plugin_name);
  19. #endif /* NAGIOS_EXTRA_OPTS_H_INCLUDED */