yumapro  24.10-3
YumaPro SDK
Loading...
Searching...
No Matches
CLI and .conf File Parameters

CLI utilities to process the CLI parameters at boot-time. More...

Collaboration diagram for CLI and .conf File Parameters:

Typedefs

typedef status_t(* agt_conf_write_fn_t) (FILE *conf_file, void *cookie)
 conf file writer function callback More...
 

Functions

status_t agt_cli_process_input (int argc, char *argv[], agt_profile_t *agt_profile, boolean *showver, help_mode_t *showhelpmode, boolean *no_watcher)
 Process the param line parameters against the hardwired parmset for the netconfd program. More...
 
val_value_tagt_cli_get_valset (void)
 Retrieve the command line parameter set from boot time. More...
 
const xmlChar * agt_cli_get_confspec (void)
 Retrieve the config file used or NULL if none. More...
 
void agt_cli_cleanup (void)
 Cleanup the module static data. More...
 
status_t agt_conf_load_files (const xmlChar *conf_filespec, val_value_t *valset, const xmlChar *conf_dirspec, boolean *skip_def_confdir)
 Default main loaded first: /etc/yumapro/netconfd-pro.conf. More...
 
status_t agt_conf_create_file (const xmlChar *confname, const xmlChar *revision, agt_conf_write_fn_t conf_write_fn, void *cookie)
 Create a module or bundle config in the confdir. More...
 
status_t agt_conf_delete_file (const xmlChar *confname, const xmlChar *revision)
 Delete a module or bundle config in the confdir. More...
 
status_t agt_conf_test_write_file (const xmlChar *confname, const xmlChar *revision)
 Test Append a conf dir. More...
 
void agt_profile_init_server_profile (agt_profile_t *agt_profile)
 Hardwire the initial server profile variables. More...
 
void agt_profile_clean_server_profile (agt_profile_t *agt_profile)
 Clean the server profile variables. More...
 

Detailed Description

CLI utilities to process the CLI parameters at boot-time.

Default conf file is stored in /etc/yumapro/netconfd-pro.conf.

Gathers all parameters and keeps them in an accessible val_value_t tree while the program is running. The parameters are applied to the system at boot-time.

Parameters entered at the command line will over-ride any value set in the .conf file. The 'config' parameter is not allowed in a .conf file.

Typedef Documentation

◆ agt_conf_write_fn_t

typedef status_t(* agt_conf_write_fn_t) (FILE *conf_file, void *cookie)

conf file writer function callback

Parameters
conf_fileopen file to write
cookiecaller parameter cookie
Returns
status:
  • NO_ERR file will be closed
  • else file will be removed

Function Documentation

◆ agt_cli_cleanup()

void agt_cli_cleanup ( void  )

Cleanup the module static data.

Called by the server during shutdown.

Here is the call graph for this function:

◆ agt_cli_get_confspec()

const xmlChar * agt_cli_get_confspec ( void  )

Retrieve the config file used or NULL if none.

Returns
pointer to config filespec

◆ agt_cli_get_valset()

val_value_t * agt_cli_get_valset ( void  )

Retrieve the command line parameter set from boot time.

Returns
pointer to parmset or NULL if none
Here is the caller graph for this function:

◆ agt_cli_process_input()

status_t agt_cli_process_input ( int  argc,
char *  argv[],
agt_profile_t agt_profile,
boolean *  showver,
help_mode_t showhelpmode,
boolean *  no_watcher 
)

Process the param line parameters against the hardwired parmset for the netconfd program.

Parameters
argcargument count
argvarray of command line argument strings
[out]agt_profileserver profile struct to fill in
*agt_profile is filled in, with parms gathered or defaults
[out]showveraddress of version return quick-exit status
*showver TRUE if user requsted version quick-exit mode
[out]showhelpmodeaddress of help return quick-exit status
*showhelpmode requested help mode (none, breief, normal, full)
[out]no_watcherwatcher param to fill in
*no_watcher TRUE if user specified no-watcher param
Returns
NO_ERR if all goes well
Here is the call graph for this function:

◆ agt_conf_create_file()

status_t agt_conf_create_file ( const xmlChar *  confname,
const xmlChar *  revision,
agt_conf_write_fn_t  conf_write_fn,
void *  cookie 
)

Create a module or bundle config in the confdir.

Parameters
confnamemodule or bundle name
revisionrevision date string
conf_write_fncallback function to create the file
cookiecookie to pass to callback
Returns
NO_ERR if file created
Here is the call graph for this function:

◆ agt_conf_delete_file()

status_t agt_conf_delete_file ( const xmlChar *  confname,
const xmlChar *  revision 
)

Delete a module or bundle config in the confdir.

Parameters
confnamemodule or bundle name
revisionrevision date string
Returns
NO_ERR if file found and deleted
Here is the call graph for this function:

◆ agt_conf_load_files()

status_t agt_conf_load_files ( const xmlChar *  conf_filespec,
val_value_t valset,
const xmlChar *  conf_dirspec,
boolean *  skip_def_confdir 
)

Default main loaded first: /etc/yumapro/netconfd-pro.conf.

Set with –config/path/to/myconf.conf

Also check for extra config files: Default conf-dir: /etc/yumapro/netconfd-pro.d/

Parameters
conf_filespecmain netconfd-pro.conf (may be NULL)
[in,out]valsetvalue to add any found parameters
valset filled in with any found parameters
conf_dirspecdirectory to check for more foo.conf files
(may be NULL)
[out]skip_def_confdiraddress of return flag
*skip_def_confdir TRUE if no default conf-dir found
Returns
NO_ERR if all goes well
Here is the call graph for this function:
Here is the caller graph for this function:

◆ agt_conf_test_write_file()

status_t agt_conf_test_write_file ( const xmlChar *  confname,
const xmlChar *  revision 
)

Test Append a conf dir.

Parameters
confnamemodule or bundle name
revisionrevision date string (may be NULL)
Returns
NO_ERR if file created
Here is the call graph for this function:

◆ agt_profile_clean_server_profile()

void agt_profile_clean_server_profile ( agt_profile_t agt_profile)

Clean the server profile variables.

Parameters
[in,out]agt_profileprofile struct to clean
Here is the call graph for this function:

◆ agt_profile_init_server_profile()

void agt_profile_init_server_profile ( agt_profile_t agt_profile)

Hardwire the initial server profile variables.

Parameters
[in,out]agt_profileprofile to initialize
*agt_profile is filled in with params of defaults
Here is the call graph for this function: