Teonet library
0.4.7
|
#include "conf.h"
Go to the source code of this file.
Macros | |
#define | SHOW_PEER_CONTINUOSLY 2 |
Enumerations | |
enum | ksnetEvMgrOpts { READ_OPTIONS = 01, READ_CONFIGURATION, READ_ALL = READ_OPTIONS|READ_CONFIGURATION, APP_PARAM, BLOCK_CLI_INPUT = 0x08 } |
Functions | |
char ** | ksnet_optRead (int argc, char **argv, teonet_cfg *conf, int app_argc, char **app_argv, char **app_argv_descr, int show_opt) |
Read configuration and command line options. More... | |
void | ksnet_optSetApp (teonet_cfg *conf, const char *app_name, const char *app_prompt, const char *app_description) |
Set application name. More... | |
#define SHOW_PEER_CONTINUOSLY 2 |
Referenced by ksnet_optRead().
enum ksnetEvMgrOpts |
char** ksnet_optRead | ( | int | argc, |
char ** | argv, | ||
teonet_cfg * | conf, | ||
int | app_argc, | ||
char ** | app_argv, | ||
char ** | app_argv_descr, | ||
int | show_arg | ||
) |
Read configuration and command line options.
This function should be called to read configuration and command line options
argc | Number of command line arguments |
argv | String array with command line arguments |
conf | Pointer to teonet_cfg structure to read configuration and command line parameters to |
app_argc | Number of application arguments |
app_argv | String array with application arguments names |
app_argv_descr | String array with application arguments descriptions |
show_arg | Show arguments |
References teonet_cfg::app_description, teonet_cfg::app_name, teonet_cfg::auth_secret, teonet_cfg::block_cli_input_f, teonet_cfg::color_output_disable_f, teonet_cfg::dflag, teonet_cfg::extended_l0_log_f, teonet_cfg::filter, free(), getDataPath(), teonet_cfg::host_name, teonet_cfg::hot_keys_f, teonet_cfg::kflag, KSN_BUFFER_SM_SIZE, KSN_MAX_HOST_NAME, ksnet_formatMessage(), ksnet_sformatMessage(), teonet_cfg::l0_allow_f, teonet_cfg::l0_public_ipv4, teonet_cfg::l0_public_ipv6, teonet_cfg::l0_tcp_ip_remote, teonet_cfg::l0_tcp_port, teonet_cfg::log_disable_f, teonet_cfg::log_priority, teonet_cfg::logging_f, teonet_cfg::net_key, teonet_cfg::network, teonet_cfg::no_multi_thread_f, opt_usage(), PACKAGE_NAME, teonet_cfg::port, teonet_cfg::port_inc_f, teonet_cfg::r_host_addr_opt, teonet_cfg::r_port, teonet_cfg::r_tcp_f, teonet_cfg::r_tcp_port, resolveDnsName(), teonet_cfg::send_ack_event_f, teonet_cfg::send_all_logs_f, teonet_cfg::show_connect_f, teonet_cfg::show_debug_f, teonet_cfg::show_debug_vv_f, teonet_cfg::show_debug_vvv_f, SHOW_PEER_CONTINUOSLY, teonet_cfg::show_peers_f, teonet_cfg::show_tr_udp_f, teonet_cfg::sig_segv_f, start_stop_daemon(), teonet_cfg::statsd_ip, teonet_cfg::statsd_peers_f, teonet_cfg::statsd_port, teonet_cfg::tcp_allow_f, teonet_cfg::tcp_port, VERSION, teonet_cfg::vpn_connect_f, teonet_cfg::vpn_ip, and teonet_cfg::vpn_mtu.
Referenced by ksnetEvMgrInitPort().
void ksnet_optSetApp | ( | teonet_cfg * | conf, |
const char * | app_name, | ||
const char * | app_prompt, | ||
const char * | app_description | ||
) |
Set application name.
Set application name, prompt and description (use it before ksnet_optRead)
References teonet_cfg::app_description, teonet_cfg::app_name, teonet_cfg::app_prompt, and KSN_BUFFER_SM_SIZE.
Referenced by ksnetEvMgrInitPort().