28 |
{ false = 0, true } |
{ false = 0, true } |
29 |
bool_t; |
bool_t; |
30 |
|
|
|
/* command line getopt values */ |
|
|
typedef enum |
|
|
{ |
|
|
/* use this if no command line option is associated */ |
|
|
opt_none = 256, |
|
|
/* letter correspond to short option alias */ |
|
|
opt_help = 'h', |
|
|
opt_version = 'V', |
|
|
opt_interface_type = 't', |
|
|
opt_interface_name = 'i', |
|
|
opt_user = 'u', |
|
|
opt_pass = 'p', |
|
|
opt_auto_reconnect = 'r', |
|
|
opt_daemon = 'd', |
|
|
opt_debug_level = 'D', |
|
|
opt_modem = 'm', |
|
|
opt_phone = 'n', |
|
|
opt_speed = 's', |
|
|
opt_server_login = 'l', |
|
|
opt_server_pass = 'w', |
|
|
/* numeric opt_id, not associated with any short option */ |
|
|
opt_pid_file = 300, |
|
|
opt_ip_up = 301, |
|
|
opt_ip_down = 302, |
|
|
opt_rtscts = 303, |
|
|
opt_init_str = 304, |
|
|
opt_dial_str = 305 |
|
|
} option_e; |
|
|
|
|
31 |
typedef struct |
typedef struct |
32 |
{ |
{ |
33 |
option_e opt_id; |
char shortopt; |
34 |
|
char *longopt; |
35 |
char *name; |
char *name; |
36 |
enum |
enum |
37 |
{ boolean, integer, string } |
{ boolean, integer, string } |