#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include <nubase.h>#include "sys_config.h"#include "getdelim.h"Include dependency graph for sys_config.c:

Go to the source code of this file.
Defines | |
| #define | SYS_CONF_FILE CONFIG_DIR "/nuclient.conf" |
Functions | |
| static int | str_to_bool (const char *val, int default_value) |
| char * | compute_user_config_path () |
| static void | replace_value (char **initval, char *newval) |
| int | parse_sys_config (const char *filename) |
| void | load_sys_config () |
| const char * | nu_client_default_hostname () |
| const char * | nu_client_default_port () |
| const char * | nu_client_default_tls_ca () |
| const char * | nu_client_default_tls_cert () |
| const char * | nu_client_default_tls_key () |
| const char * | nu_client_default_tls_crl () |
| int | nu_client_default_suppress_fqdn_verif () |
Variables | |
| static int | config_loaded = 0 |
| static char * | default_hostname = NULL |
| static char * | default_port = NULL |
| static char * | default_tls_ca = NULL |
| static char * | default_tls_cert = NULL |
| static char * | default_tls_key = NULL |
| static char * | default_tls_crl = NULL |
| static int | default_suppress_fqdn_verif = 0 |
| #define SYS_CONF_FILE CONFIG_DIR "/nuclient.conf" |
| char* compute_user_config_path | ( | ) |
Definition at line 89 of file sys_config.c.
References nu_get_home_dir(), and secure_snprintf().
Referenced by load_sys_config().
Here is the call graph for this function:

| void load_sys_config | ( | ) |
Definition at line 186 of file sys_config.c.
References compute_user_config_path(), config_loaded, parse_sys_config(), and SYS_CONF_FILE.
Referenced by nu_client_global_init().
Here is the call graph for this function:

| const char* nu_client_default_hostname | ( | ) |
Definition at line 209 of file sys_config.c.
References default_hostname.
Referenced by do_connect().
| const char* nu_client_default_port | ( | ) |
| int nu_client_default_suppress_fqdn_verif | ( | ) |
Definition at line 239 of file sys_config.c.
References default_suppress_fqdn_verif.
Referenced by init_library().
| const char* nu_client_default_tls_ca | ( | ) |
Definition at line 219 of file sys_config.c.
References default_tls_ca.
Referenced by init_library().
| const char* nu_client_default_tls_cert | ( | ) |
Definition at line 224 of file sys_config.c.
References default_tls_cert.
Referenced by init_library().
| const char* nu_client_default_tls_crl | ( | ) |
Definition at line 234 of file sys_config.c.
References default_tls_crl.
Referenced by do_connect().
| const char* nu_client_default_tls_key | ( | ) |
Definition at line 229 of file sys_config.c.
References default_tls_key.
Referenced by init_library().
| int parse_sys_config | ( | const char * | filename | ) |
Definition at line 119 of file sys_config.c.
References default_hostname, default_port, default_suppress_fqdn_verif, default_tls_ca, default_tls_cert, default_tls_crl, default_tls_key, replace_value(), and str_to_bool().
Referenced by load_sys_config().
Here is the call graph for this function:

| static void replace_value | ( | char ** | initval, | |
| char * | newval | |||
| ) | [static] |
| static int str_to_bool | ( | const char * | val, | |
| int | default_value | |||
| ) | [static] |
int config_loaded = 0 [static] |
char* default_hostname = NULL [static] |
Definition at line 41 of file sys_config.c.
Referenced by nu_client_default_hostname(), and parse_sys_config().
char* default_port = NULL [static] |
Definition at line 42 of file sys_config.c.
Referenced by nu_client_default_port(), and parse_sys_config().
int default_suppress_fqdn_verif = 0 [static] |
Definition at line 47 of file sys_config.c.
Referenced by nu_client_default_suppress_fqdn_verif(), and parse_sys_config().
char* default_tls_ca = NULL [static] |
Definition at line 43 of file sys_config.c.
Referenced by nu_client_default_tls_ca(), and parse_sys_config().
char* default_tls_cert = NULL [static] |
Definition at line 44 of file sys_config.c.
Referenced by nu_client_default_tls_cert(), and parse_sys_config().
char* default_tls_crl = NULL [static] |
Definition at line 46 of file sys_config.c.
Referenced by nu_client_default_tls_crl(), and parse_sys_config().
char* default_tls_key = NULL [static] |
Definition at line 45 of file sys_config.c.
Referenced by nu_client_default_tls_key(), and parse_sys_config().
1.4.7