Back to index

nagios-plugins  1.4.16
extra_opts.h
Go to the documentation of this file.
00001 #ifndef _EXTRA_OPTS_H_
00002 #define _EXTRA_OPTS_H_
00003 
00004 /*
00005  * extra_opts.h: routines for loading nagios-plugin defaults from ini
00006  * configuration files.
00007  */
00008 
00009 /* np_extra_opts: Process the --extra-opts arguments and create a new argument
00010  * array with ini-processed and argument-passed arguments together. The
00011  * ini-procesed arguments always come first (in the order of --extra-opts
00012  * arguments). If no --extra-opts arguments are provided or returned nothing
00013  * it returns **argv otherwise the new array is returned. --extra-opts are
00014  * always removed from **argv. The original pointers from **argv are kept in
00015  * the new array to preserve ability to overwrite arguments in processlist.
00016  *
00017  * The new array can be easily freed as long as a pointer to the original one
00018  * is kept. See my_free() in lib/tests/test_opts1.c for an example.
00019  */
00020 char **np_extra_opts(int *argc, char **argv, const char *plugin_name);
00021 
00022 #endif /* _EXTRA_OPTS_H_ */
00023