Add missing initializers.

This commit is contained in:
Ralf Corsepius
2008-09-08 06:45:43 +00:00
parent b4dad2815c
commit db09424d43
7 changed files with 147 additions and 142 deletions

View File

@@ -181,46 +181,46 @@ static void set_allowed_addrs(int, struct wordlist *, struct wordlist *);
*/ */
option_t auth_options[] = { option_t auth_options[] = {
{ "require-pap", o_bool, &lcp_wantoptions[0].neg_upap, { "require-pap", o_bool, &lcp_wantoptions[0].neg_upap,
"Require PAP authentication from peer", 1, &auth_required }, "Require PAP authentication from peer", 1, &auth_required, 0, 0 },
{ "+pap", o_bool, &lcp_wantoptions[0].neg_upap, { "+pap", o_bool, &lcp_wantoptions[0].neg_upap,
"Require PAP authentication from peer", 1, &auth_required }, "Require PAP authentication from peer", 1, &auth_required, 0, 0 },
{ "refuse-pap", o_bool, &refuse_pap, { "refuse-pap", o_bool, &refuse_pap,
"Don't agree to auth to peer with PAP", 1 }, "Don't agree to auth to peer with PAP", 1, NULL, 0, 0 },
{ "-pap", o_bool, &refuse_pap, { "-pap", o_bool, &refuse_pap,
"Don't allow PAP authentication with peer", 1 }, "Don't allow PAP authentication with peer", 1, NULL, 0, 0 },
{ "require-chap", o_bool, &lcp_wantoptions[0].neg_chap, { "require-chap", o_bool, &lcp_wantoptions[0].neg_chap,
"Require CHAP authentication from peer", 1, &auth_required }, "Require CHAP authentication from peer", 1, &auth_required, 0, 0 },
{ "+chap", o_bool, &lcp_wantoptions[0].neg_chap, { "+chap", o_bool, &lcp_wantoptions[0].neg_chap,
"Require CHAP authentication from peer", 1, &auth_required }, "Require CHAP authentication from peer", 1, &auth_required, 0, 0 },
{ "refuse-chap", o_bool, &refuse_chap, { "refuse-chap", o_bool, &refuse_chap,
"Don't agree to auth to peer with CHAP", 1 }, "Don't agree to auth to peer with CHAP", 1, NULL, 0, 0 },
{ "-chap", o_bool, &refuse_chap, { "-chap", o_bool, &refuse_chap,
"Don't allow CHAP authentication with peer", 1 }, "Don't allow CHAP authentication with peer", 1, NULL, 0, 0 },
{ "name", o_string, our_name, { "name", o_string, our_name,
"Set local name for authentication", "Set local name for authentication",
OPT_PRIV|OPT_STATIC, NULL, MAXNAMELEN }, OPT_PRIV|OPT_STATIC, NULL, MAXNAMELEN, 0 },
{ "user", o_string, user, { "user", o_string, user,
"Set name for auth with peer", OPT_STATIC, NULL, MAXNAMELEN }, "Set name for auth with peer", OPT_STATIC, NULL, MAXNAMELEN, 0 },
{ "usehostname", o_bool, &usehostname, { "usehostname", o_bool, &usehostname,
"Must use hostname for authentication", 1 }, "Must use hostname for authentication", 1, NULL, 0, 0 },
{ "remotename", o_string, remote_name, { "remotename", o_string, remote_name,
"Set remote name for authentication", OPT_STATIC, "Set remote name for authentication", OPT_STATIC,
&explicit_remote, MAXNAMELEN }, &explicit_remote, MAXNAMELEN, 0 },
{ "auth", o_bool, &auth_required, { "auth", o_bool, &auth_required,
"Require authentication from peer", 1 }, "Require authentication from peer", 1, NULL, 0, 0 },
{ "noauth", o_bool, &auth_required, { "noauth", o_bool, &auth_required,
"Don't require peer to authenticate", OPT_PRIV, &allow_any_ip }, "Don't require peer to authenticate", OPT_PRIV, &allow_any_ip, 0, 0 },
{ "login", o_bool, &uselogin, { "login", o_bool, &uselogin,
"Use system password database for PAP", 1 }, "Use system password database for PAP", 1, NULL, 0, 0 },
{ "papcrypt", o_bool, &cryptpap, { "papcrypt", o_bool, &cryptpap,
"PAP passwords are encrypted", 1 }, "PAP passwords are encrypted", 1, NULL, 0, 0 },
/* Removed for RTEMS PORT /* Removed for RTEMS PORT
{ "+ua", o_special, setupapfile, { "+ua", o_special, setupapfile,
"Get PAP user and password from file" }, "Get PAP user and password from file" },
*/ */
{ "password", o_string, passwd, { "password", o_string, passwd,
"Password for authenticating us to the peer", OPT_STATIC, "Password for authenticating us to the peer", OPT_STATIC,
NULL, MAXSECRETLEN }, NULL, MAXSECRETLEN, 0 },
/* Removed for RTEMS_PORT /* Removed for RTEMS_PORT
{ "privgroup", o_special, privgroup, { "privgroup", o_special, privgroup,
"Allow group members to use privileged options", OPT_PRIV }, "Allow group members to use privileged options", OPT_PRIV },
@@ -228,7 +228,7 @@ option_t auth_options[] = {
"Set IP address(es) which can be used without authentication", "Set IP address(es) which can be used without authentication",
OPT_PRIV }, OPT_PRIV },
*/ */
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
/* /*

View File

@@ -45,38 +45,39 @@ static int setdeflate(char **);
static option_t ccp_option_list[] = { static option_t ccp_option_list[] = {
{ "noccp", o_bool, &ccp_protent.enabled_flag, { "noccp", o_bool, &ccp_protent.enabled_flag,
"Disable CCP negotiation" }, "Disable CCP negotiation", 0, NULL, 0, 0 },
{ "-ccp", o_bool, &ccp_protent.enabled_flag, { "-ccp", o_bool, &ccp_protent.enabled_flag,
"Disable CCP negotiation" }, "Disable CCP negotiation", 0, NULL, 0, 0 },
{ "bsdcomp", o_special, setbsdcomp, { "bsdcomp", o_special, setbsdcomp,
"Request BSD-Compress packet compression" }, "Request BSD-Compress packet compression", 0, NULL, 0, 0 },
{ "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, { "nobsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
"don't allow BSD-Compress", OPT_A2COPY, "don't allow BSD-Compress", OPT_A2COPY,
&ccp_allowoptions[0].bsd_compress }, &ccp_allowoptions[0].bsd_compress, 0, 0 },
{ "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress, { "-bsdcomp", o_bool, &ccp_wantoptions[0].bsd_compress,
"don't allow BSD-Compress", OPT_A2COPY, "don't allow BSD-Compress", OPT_A2COPY,
&ccp_allowoptions[0].bsd_compress }, &ccp_allowoptions[0].bsd_compress, 0, 0 },
{ "deflate", 1, setdeflate, { "deflate", 1, setdeflate,
"request Deflate compression" }, "request Deflate compression", 0, NULL, 0, 0 },
{ "nodeflate", o_bool, &ccp_wantoptions[0].deflate, { "nodeflate", o_bool, &ccp_wantoptions[0].deflate,
"don't allow Deflate compression", OPT_A2COPY, "don't allow Deflate compression", OPT_A2COPY,
&ccp_allowoptions[0].deflate }, &ccp_allowoptions[0].deflate, 0, 0 },
{ "-deflate", o_bool, &ccp_wantoptions[0].deflate, { "-deflate", o_bool, &ccp_wantoptions[0].deflate,
"don't allow Deflate compression", OPT_A2COPY, "don't allow Deflate compression", OPT_A2COPY,
&ccp_allowoptions[0].deflate }, &ccp_allowoptions[0].deflate, 0, 0 },
{ "nodeflatedraft", o_bool, &ccp_wantoptions[0].deflate_draft, { "nodeflatedraft", o_bool, &ccp_wantoptions[0].deflate_draft,
"don't use draft deflate #", OPT_A2COPY, "don't use draft deflate #", OPT_A2COPY,
&ccp_allowoptions[0].deflate_draft }, &ccp_allowoptions[0].deflate_draft, 0, 0 },
{ "predictor1", o_bool, &ccp_wantoptions[0].predictor_1, { "predictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"request Predictor-1", 1, &ccp_allowoptions[0].predictor_1 }, "request Predictor-1", 1,
&ccp_allowoptions[0].predictor_1, 0, 0 },
{ "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1, { "nopredictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"don't allow Predictor-1", OPT_A2COPY, "don't allow Predictor-1", OPT_A2COPY,
&ccp_allowoptions[0].predictor_1 }, &ccp_allowoptions[0].predictor_1, 0, 0 },
{ "-predictor1", o_bool, &ccp_wantoptions[0].predictor_1, { "-predictor1", o_bool, &ccp_wantoptions[0].predictor_1,
"don't allow Predictor-1", OPT_A2COPY, "don't allow Predictor-1", OPT_A2COPY,
&ccp_allowoptions[0].predictor_1 }, &ccp_allowoptions[0].predictor_1, 0, 0 },
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
/* /*

View File

@@ -59,16 +59,16 @@ static const char rcsid[] = RCSID;
*/ */
static option_t chap_option_list[] = { static option_t chap_option_list[] = {
{ "chap-restart", o_int, &chap[0].timeouttime, { "chap-restart", o_int, &chap[0].timeouttime,
"Set timeout for CHAP" }, "Set timeout for CHAP", 0, NULL, 0, 0 },
{ "chap-max-challenge", o_int, &chap[0].max_transmits, { "chap-max-challenge", o_int, &chap[0].max_transmits,
"Set max #xmits for challenge" }, "Set max #xmits for challenge", 0, NULL, 0, 0 },
{ "chap-interval", o_int, &chap[0].chal_interval, { "chap-interval", o_int, &chap[0].chal_interval,
"Set interval for rechallenge" }, "Set interval for rechallenge", 0, NULL, 0, 0 },
#ifdef MSLANMAN #ifdef MSLANMAN
{ "ms-lanman", o_bool, &ms_lanman, { "ms-lanman", o_bool, &ms_lanman,
"Use LanMan passwd when using MS-CHAP", 1 }, "Use LanMan passwd when using MS-CHAP", 1, NULL, 0, 0 },
#endif #endif
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
/* /*

View File

@@ -105,60 +105,64 @@ static int setwinsaddr(char **);
static option_t ipcp_option_list[] = { static option_t ipcp_option_list[] = {
{ "noip", o_bool, &ipcp_protent.enabled_flag, { "noip", o_bool, &ipcp_protent.enabled_flag,
"Disable IP and IPCP" }, "Disable IP and IPCP", 0, NULL, 0, 0 },
{ "-ip", o_bool, &ipcp_protent.enabled_flag, { "-ip", o_bool, &ipcp_protent.enabled_flag,
"Disable IP and IPCP" }, "Disable IP and IPCP", 0, NULL, 0, 0 },
{ "novj", o_bool, &ipcp_wantoptions[0].neg_vj, { "novj", o_bool, &ipcp_wantoptions[0].neg_vj,
"Disable VJ compression", OPT_A2COPY, &ipcp_allowoptions[0].neg_vj }, "Disable VJ compression", OPT_A2COPY,
&ipcp_allowoptions[0].neg_vj, 0, 0 },
{ "-vj", o_bool, &ipcp_wantoptions[0].neg_vj, { "-vj", o_bool, &ipcp_wantoptions[0].neg_vj,
"Disable VJ compression", OPT_A2COPY, &ipcp_allowoptions[0].neg_vj }, "Disable VJ compression", OPT_A2COPY,
&ipcp_allowoptions[0].neg_vj, 0, 0 },
{ "novjccomp", o_bool, &ipcp_wantoptions[0].cflag, { "novjccomp", o_bool, &ipcp_wantoptions[0].cflag,
"Disable VJ connection-ID compression", OPT_A2COPY, "Disable VJ connection-ID compression", OPT_A2COPY,
&ipcp_allowoptions[0].cflag }, &ipcp_allowoptions[0].cflag, 0, 0 },
{ "-vjccomp", o_bool, &ipcp_wantoptions[0].cflag, { "-vjccomp", o_bool, &ipcp_wantoptions[0].cflag,
"Disable VJ connection-ID compression", OPT_A2COPY, "Disable VJ connection-ID compression", OPT_A2COPY,
&ipcp_allowoptions[0].cflag }, &ipcp_allowoptions[0].cflag, 0, 0 },
{ "vj-max-slots", 1, setvjslots, { "vj-max-slots", 1, setvjslots,
"Set maximum VJ header slots" }, "Set maximum VJ header slots", 0, NULL, 0, 0 },
{ "ipcp-accept-local", o_bool, &ipcp_wantoptions[0].accept_local, { "ipcp-accept-local", o_bool, &ipcp_wantoptions[0].accept_local,
"Accept peer's address for us", 1 }, "Accept peer's address for us", 1, NULL, 0, 0 },
{ "ipcp-accept-remote", o_bool, &ipcp_wantoptions[0].accept_remote, { "ipcp-accept-remote", o_bool, &ipcp_wantoptions[0].accept_remote,
"Accept peer's address for it", 1 }, "Accept peer's address for it", 1, NULL, 0, 0 },
{ "ipparam", o_string, &ipparam, { "ipparam", o_string, &ipparam,
"Set ip script parameter" }, "Set ip script parameter", 0, NULL, 0, 0 },
{ "noipdefault", o_bool, &disable_defaultip, { "noipdefault", o_bool, &disable_defaultip,
"Don't use name for default IP adrs", 1 }, "Don't use name for default IP adrs", 1, NULL, 0, 0 },
{ "ms-dns", 1, setdnsaddr, { "ms-dns", 1, setdnsaddr,
"DNS address for the peer's use" }, "DNS address for the peer's use", 0, NULL, 0, 0 },
{ "ms-wins", 1, setwinsaddr, { "ms-wins", 1, setwinsaddr,
"Nameserver for SMB over TCP/IP for peer" }, "Nameserver for SMB over TCP/IP for peer", 0, NULL, 0, 0 },
{ "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime, { "ipcp-restart", o_int, &ipcp_fsm[0].timeouttime,
"Set timeout for IPCP" }, "Set timeout for IPCP", 0, NULL, 0, 0 },
{ "ipcp-max-terminate", o_int, &ipcp_fsm[0].maxtermtransmits, { "ipcp-max-terminate", o_int, &ipcp_fsm[0].maxtermtransmits,
"Set max #xmits for term-reqs" }, "Set max #xmits for term-reqs", 0, NULL, 0, 0 },
{ "ipcp-max-configure", o_int, &ipcp_fsm[0].maxconfreqtransmits, { "ipcp-max-configure", o_int, &ipcp_fsm[0].maxconfreqtransmits,
"Set max #xmits for conf-reqs" }, "Set max #xmits for conf-reqs", 0, NULL, 0, 0 },
{ "ipcp-max-failure", o_int, &ipcp_fsm[0].maxnakloops, { "ipcp-max-failure", o_int, &ipcp_fsm[0].maxnakloops,
"Set max #conf-naks for IPCP" }, "Set max #conf-naks for IPCP", 0, NULL, 0, 0 },
{ "defaultroute", o_bool, &ipcp_wantoptions[0].default_route, { "defaultroute", o_bool, &ipcp_wantoptions[0].default_route,
"Add default route", OPT_ENABLE|1, &ipcp_allowoptions[0].default_route }, "Add default route", OPT_ENABLE|1,
&ipcp_allowoptions[0].default_route, 0, 0 },
{ "nodefaultroute", o_bool, &ipcp_allowoptions[0].default_route, { "nodefaultroute", o_bool, &ipcp_allowoptions[0].default_route,
"disable defaultroute option", OPT_A2COPY, "disable defaultroute option", OPT_A2COPY,
&ipcp_wantoptions[0].default_route }, &ipcp_wantoptions[0].default_route, 0, 0 },
{ "-defaultroute", o_bool, &ipcp_allowoptions[0].default_route, { "-defaultroute", o_bool, &ipcp_allowoptions[0].default_route,
"disable defaultroute option", OPT_A2COPY, "disable defaultroute option", OPT_A2COPY,
&ipcp_wantoptions[0].default_route }, &ipcp_wantoptions[0].default_route, 0, 0 },
{ "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp, { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
"Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp }, "Add proxy ARP entry", OPT_ENABLE|1,
&ipcp_allowoptions[0].proxy_arp, 0, 0 },
{ "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
"disable proxyarp option", OPT_A2COPY, "disable proxyarp option", OPT_A2COPY,
&ipcp_wantoptions[0].proxy_arp }, &ipcp_wantoptions[0].proxy_arp, 0, 0 },
{ "-proxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp, { "-proxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
"disable proxyarp option", OPT_A2COPY, "disable proxyarp option", OPT_A2COPY,
&ipcp_wantoptions[0].proxy_arp }, &ipcp_wantoptions[0].proxy_arp, 0, 0 },
{ "usepeerdns", o_bool, &usepeerdns, { "usepeerdns", o_bool, &usepeerdns,
"Ask peer for DNS address(es)", 1 }, "Ask peer for DNS address(es)", 1, NULL, 0, 0 },
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
/* /*

View File

@@ -40,7 +40,7 @@ static const char rcsid[] = RCSID;
*/ */
static int lcp_echo_interval = 0; /* Interval between LCP echo-requests */ static int lcp_echo_interval = 0; /* Interval between LCP echo-requests */
static int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */ static int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */
static bool lax_recv = 0; /* accept control chars in asyncmap */ static bool lax_recv = false; /* accept control chars in asyncmap */
static int setescape(char **); static int setescape(char **);
@@ -48,66 +48,66 @@ static option_t lcp_option_list[] = {
/* LCP options */ /* LCP options */
{ "noaccomp", o_bool, &lcp_wantoptions[0].neg_accompression, { "noaccomp", o_bool, &lcp_wantoptions[0].neg_accompression,
"Disable address/control compression", "Disable address/control compression",
OPT_A2COPY, &lcp_allowoptions[0].neg_accompression }, OPT_A2COPY, &lcp_allowoptions[0].neg_accompression, 0, 0 },
{ "-ac", o_bool, &lcp_wantoptions[0].neg_accompression, { "-ac", o_bool, &lcp_wantoptions[0].neg_accompression,
"Disable address/control compression", "Disable address/control compression",
OPT_A2COPY, &lcp_allowoptions[0].neg_accompression }, OPT_A2COPY, &lcp_allowoptions[0].neg_accompression, 0, 0 },
{ "default-asyncmap", o_bool, &lcp_wantoptions[0].neg_asyncmap, { "default-asyncmap", o_bool, &lcp_wantoptions[0].neg_asyncmap,
"Disable asyncmap negotiation", "Disable asyncmap negotiation",
OPT_A2COPY, &lcp_allowoptions[0].neg_asyncmap }, OPT_A2COPY, &lcp_allowoptions[0].neg_asyncmap, 0, 0 },
{ "-am", o_bool, &lcp_wantoptions[0].neg_asyncmap, { "-am", o_bool, &lcp_wantoptions[0].neg_asyncmap,
"Disable asyncmap negotiation", "Disable asyncmap negotiation",
OPT_A2COPY, &lcp_allowoptions[0].neg_asyncmap }, OPT_A2COPY, &lcp_allowoptions[0].neg_asyncmap, 0, 0 },
{ "asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap, { "asyncmap", o_uint32, &lcp_wantoptions[0].asyncmap,
"Set asyncmap (for received packets)", "Set asyncmap (for received packets)",
OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, OPT_OR, &lcp_wantoptions[0].neg_asyncmap, 0, 0 },
{ "-as", o_uint32, &lcp_wantoptions[0].asyncmap, { "-as", o_uint32, &lcp_wantoptions[0].asyncmap,
"Set asyncmap (for received packets)", "Set asyncmap (for received packets)",
OPT_OR, &lcp_wantoptions[0].neg_asyncmap }, OPT_OR, &lcp_wantoptions[0].neg_asyncmap, 0, 0 },
{ "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber, { "nomagic", o_bool, &lcp_wantoptions[0].neg_magicnumber,
"Disable magic number negotiation (looped-back line detection)", "Disable magic number negotiation (looped-back line detection)",
OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber }, OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber, 0, 0 },
{ "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber, { "-mn", o_bool, &lcp_wantoptions[0].neg_magicnumber,
"Disable magic number negotiation (looped-back line detection)", "Disable magic number negotiation (looped-back line detection)",
OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber }, OPT_A2COPY, &lcp_allowoptions[0].neg_magicnumber, 0, 0 },
{ "default-mru", o_bool, &lcp_wantoptions[0].neg_mru, { "default-mru", o_bool, &lcp_wantoptions[0].neg_mru,
"Disable MRU negotiation (use default 1500)", "Disable MRU negotiation (use default 1500)",
OPT_A2COPY, &lcp_allowoptions[0].neg_mru }, OPT_A2COPY, &lcp_allowoptions[0].neg_mru, 0, 0 },
{ "-mru", o_bool, &lcp_wantoptions[0].neg_mru, { "-mru", o_bool, &lcp_wantoptions[0].neg_mru,
"Disable MRU negotiation (use default 1500)", "Disable MRU negotiation (use default 1500)",
OPT_A2COPY, &lcp_allowoptions[0].neg_mru }, OPT_A2COPY, &lcp_allowoptions[0].neg_mru, 0, 0 },
{ "mru", o_int, &lcp_wantoptions[0].mru, { "mru", o_int, &lcp_wantoptions[0].mru,
"Set MRU (maximum received packet size) for negotiation", "Set MRU (maximum received packet size) for negotiation",
0, &lcp_wantoptions[0].neg_mru }, 0, &lcp_wantoptions[0].neg_mru, 0, 0 },
{ "nopcomp", o_bool, &lcp_wantoptions[0].neg_pcompression, { "nopcomp", o_bool, &lcp_wantoptions[0].neg_pcompression,
"Disable protocol field compression", "Disable protocol field compression",
OPT_A2COPY, &lcp_allowoptions[0].neg_pcompression }, OPT_A2COPY, &lcp_allowoptions[0].neg_pcompression, 0, 0 },
{ "-pc", o_bool, &lcp_wantoptions[0].neg_pcompression, { "-pc", o_bool, &lcp_wantoptions[0].neg_pcompression,
"Disable protocol field compression", "Disable protocol field compression",
OPT_A2COPY, &lcp_allowoptions[0].neg_pcompression }, OPT_A2COPY, &lcp_allowoptions[0].neg_pcompression, 0, 0 },
{ "-p", o_bool, &lcp_wantoptions[0].passive, { "-p", o_bool, &lcp_wantoptions[0].passive,
"Set passive mode", 1 }, "Set passive mode", 1, NULL, 0, 0 },
{ "passive", o_bool, &lcp_wantoptions[0].passive, { "passive", o_bool, &lcp_wantoptions[0].passive,
"Set passive mode", 1 }, "Set passive mode", 1, NULL, 0, 0 },
{ "silent", o_bool, &lcp_wantoptions[0].silent, { "silent", o_bool, &lcp_wantoptions[0].silent,
"Set silent mode", 1 }, "Set silent mode", 1, NULL, 0, 0 },
{ "escape", o_special, setescape, { "escape", o_special, setescape,
"List of character codes to escape on transmission" }, "List of character codes to escape on transmission", 0, NULL, 0, 0 },
{ "lcp-echo-failure", o_int, &lcp_echo_fails, { "lcp-echo-failure", o_int, &lcp_echo_fails,
"Set number of consecutive echo failures to indicate link failure" }, "Set number of consecutive echo failures to indicate link failure", 0, NULL, 0, 0 },
{ "lcp-echo-interval", o_int, &lcp_echo_interval, { "lcp-echo-interval", o_int, &lcp_echo_interval,
"Set time in seconds between LCP echo requests" }, "Set time in seconds between LCP echo requests", 0, NULL, 0, 0 },
{ "lcp-restart", o_int, &lcp_fsm[0].timeouttime, { "lcp-restart", o_int, &lcp_fsm[0].timeouttime,
"Set time in seconds between LCP retransmissions" }, "Set time in seconds between LCP retransmissions", 0, NULL, 0, 0 },
{ "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits, { "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits,
"Set maximum number of LCP terminate-request transmissions" }, "Set maximum number of LCP terminate-request transmissions", 0, NULL, 0, 0 },
{ "lcp-max-configure", o_int, &lcp_fsm[0].maxconfreqtransmits, { "lcp-max-configure", o_int, &lcp_fsm[0].maxconfreqtransmits,
"Set maximum number of LCP configure-request transmissions" }, "Set maximum number of LCP configure-request transmissions", 0, NULL, 0, 0 },
{ "lcp-max-failure", o_int, &lcp_fsm[0].maxnakloops, { "lcp-max-failure", o_int, &lcp_fsm[0].maxnakloops,
"Set limit on number of LCP configure-naks" }, "Set limit on number of LCP configure-naks", 0, NULL, 0, 0 },
{ "receive-all", o_bool, &lax_recv, { "receive-all", o_bool, &lax_recv,
"Accept all received control characters", 1 }, "Accept all received control characters", 1, NULL, 0, 0 },
{NULL} {NULL, 0, NULL, NULL, 0, NULL, 0, 0}
}; };
/* global vars */ /* global vars */

View File

@@ -162,116 +162,116 @@ static struct option_list *extra_options = NULL;
*/ */
option_t general_options[] = { option_t general_options[] = {
{ "debug", o_int, &debug, { "debug", o_int, &debug,
"Increase debugging level", OPT_INC|OPT_NOARG|1 }, "Increase debugging level", OPT_INC|OPT_NOARG|1, NULL, 0, 0 },
{ "-d", o_int, &debug, { "-d", o_int, &debug,
"Increase debugging level", OPT_INC|OPT_NOARG|1 }, "Increase debugging level", OPT_INC|OPT_NOARG|1, NULL, 0, 0 },
{ "kdebug", o_int, &kdebugflag, { "kdebug", o_int, &kdebugflag,
"Set kernel driver debug level" }, "Set kernel driver debug level", 0, NULL, 0, 0 },
{ "nodetach", o_bool, &nodetach, { "nodetach", o_bool, &nodetach,
"Don't detach from controlling tty", 1 }, "Don't detach from controlling tty", 1, NULL, 0, 0 },
{ "-detach", o_bool, &nodetach, { "-detach", o_bool, &nodetach,
"Don't detach from controlling tty", 1 }, "Don't detach from controlling tty", 1, NULL, 0, 0 },
{ "updetach", o_bool, &updetach, { "updetach", o_bool, &updetach,
"Detach from controlling tty once link is up", 1 }, "Detach from controlling tty once link is up", 1, NULL, 0, 0 },
{ "holdoff", o_int, &holdoff, { "holdoff", o_int, &holdoff,
"Set time in seconds before retrying connection" }, "Set time in seconds before retrying connection", 0, NULL, 0, 0 },
{ "idle", o_int, &idle_time_limit, { "idle", o_int, &idle_time_limit,
"Set time in seconds before disconnecting idle link" }, "Set time in seconds before disconnecting idle link", 0, NULL, 0, 0 },
{ "lock", o_bool, &lockflag, { "lock", o_bool, &lockflag,
"Lock serial device with UUCP-style lock file", 1 }, "Lock serial device with UUCP-style lock file", 1, NULL, 0, 0 },
{ "-all", o_special_noarg, noopt, { "-all", o_special_noarg, noopt,
"Don't request/allow any LCP or IPCP options (useless)" }, "Don't request/allow any LCP or IPCP options (useless)", 0, NULL, 0, 0 },
{ "init", o_string, &initializer, { "init", o_string, &initializer,
"A program to initialize the device", "A program to initialize the device",
OPT_A2INFO | OPT_PRIVFIX, &initializer_info }, OPT_A2INFO | OPT_PRIVFIX, &initializer_info, 0, 0 },
{ "connect", o_string, &connect_script, { "connect", o_string, &connect_script,
"A program to set up a connection", "A program to set up a connection",
OPT_A2INFO | OPT_PRIVFIX, &connect_script_info }, OPT_A2INFO | OPT_PRIVFIX, &connect_script_info, 0, 0 },
{ "disconnect", o_string, &disconnect_script, { "disconnect", o_string, &disconnect_script,
"Program to disconnect serial device", "Program to disconnect serial device",
OPT_A2INFO | OPT_PRIVFIX, &disconnect_script_info }, OPT_A2INFO | OPT_PRIVFIX, &disconnect_script_info, 0, 0 },
{ "welcome", o_string, &welcomer, { "welcome", o_string, &welcomer,
"Script to welcome client", "Script to welcome client",
OPT_A2INFO | OPT_PRIVFIX, &welcomer_info }, OPT_A2INFO | OPT_PRIVFIX, &welcomer_info, 0, 0 },
{ "pty", o_string, &ptycommand, { "pty", o_string, &ptycommand,
"Script to run on pseudo-tty master side", "Script to run on pseudo-tty master side",
OPT_A2INFO | OPT_PRIVFIX | OPT_DEVNAM, &ptycommand_info }, OPT_A2INFO | OPT_PRIVFIX | OPT_DEVNAM, &ptycommand_info, 0, 0 },
{ "notty", o_bool, &notty, { "notty", o_bool, &notty,
"Input/output is not a tty", OPT_DEVNAM | 1 }, "Input/output is not a tty", OPT_DEVNAM | 1, NULL, 0, 0 },
{ "record", o_string, &record_file, { "record", o_string, &record_file,
"Record characters sent/received to file" }, "Record characters sent/received to file", 0, NULL, 0, 0 },
{ "maxconnect", o_int, &maxconnect, { "maxconnect", o_int, &maxconnect,
"Set connection time limit", OPT_LLIMIT|OPT_NOINCR|OPT_ZEROINF }, "Set connection time limit", OPT_LLIMIT|OPT_NOINCR|OPT_ZEROINF, NULL, 0, 0 },
{ "crtscts", o_int, &crtscts, { "crtscts", o_int, &crtscts,
"Set hardware (RTS/CTS) flow control", OPT_NOARG|OPT_VAL(1) }, "Set hardware (RTS/CTS) flow control", OPT_NOARG|OPT_VAL(1), NULL, 0, 0 },
{ "nocrtscts", o_int, &crtscts, { "nocrtscts", o_int, &crtscts,
"Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) }, "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1), NULL, 0, 0 },
{ "-crtscts", o_int, &crtscts, { "-crtscts", o_int, &crtscts,
"Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) }, "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1), NULL, 0, 0 },
{ "cdtrcts", o_int, &crtscts, { "cdtrcts", o_int, &crtscts,
"Set alternate hardware (DTR/CTS) flow control", OPT_NOARG|OPT_VAL(2) }, "Set alternate hardware (DTR/CTS) flow control", OPT_NOARG|OPT_VAL(2), NULL, 0, 0 },
{ "nocdtrcts", o_int, &crtscts, { "nocdtrcts", o_int, &crtscts,
"Disable hardware flow control", OPT_NOARG|OPT_VAL(-1) }, "Disable hardware flow control", OPT_NOARG|OPT_VAL(-1), NULL, 0, 0 },
{ "xonxoff", o_special_noarg, setxonxoff, { "xonxoff", o_special_noarg, setxonxoff,
"Set software (XON/XOFF) flow control" }, "Set software (XON/XOFF) flow control", 0, NULL, 0, 0 },
{ "domain", o_special, setdomain, { "domain", o_special, setdomain,
"Add given domain name to hostname" }, "Add given domain name to hostname", 0, NULL, 0, 0 },
{ "mtu", o_int, &lcp_allowoptions[0].mru, { "mtu", o_int, &lcp_allowoptions[0].mru,
"Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU }, "Set our MTU", OPT_LIMITS, NULL, MAXMRU, MINMRU },
{ "netmask", o_special, setnetmask, { "netmask", o_special, setnetmask,
"set netmask" }, "set netmask", 0, NULL, 0, 0 },
{ "modem", o_bool, &modem, { "modem", o_bool, &modem,
"Use modem control lines", 1 }, "Use modem control lines", 1, NULL, 0, 0 },
{ "local", o_bool, &modem, { "local", o_bool, &modem,
"Don't use modem control lines" }, "Don't use modem control lines", 0, NULL, 0, 0 },
{ "file", o_special, readfile, { "file", o_special, readfile,
"Take options from a file", OPT_PREPASS }, "Take options from a file", OPT_PREPASS, NULL, 0, 0 },
{ "call", o_special, callfile, { "call", o_special, callfile,
"Take options from a privileged file", OPT_PREPASS }, "Take options from a privileged file", OPT_PREPASS, NULL, 0, 0 },
{ "persist", o_bool, &persist, { "persist", o_bool, &persist,
"Keep on reopening connection after close", 1 }, "Keep on reopening connection after close", 1, NULL, 0, 0 },
{ "nopersist", o_bool, &persist, { "nopersist", o_bool, &persist,
"Turn off persist option" }, "Turn off persist option", 0, NULL, 0, 0 },
{ "demand", o_bool, &demand, { "demand", o_bool, &demand,
"Dial on demand", OPT_INITONLY | 1, &persist }, "Dial on demand", OPT_INITONLY | 1, &persist, 0, 0 },
{ "sync", o_bool, &sync_serial, { "sync", o_bool, &sync_serial,
"Use synchronous HDLC serial encoding", 1 }, "Use synchronous HDLC serial encoding", 1, NULL, 0, 0 },
{ "logfd", o_int, &log_to_fd, { "logfd", o_int, &log_to_fd,
"Send log messages to this file descriptor" }, "Send log messages to this file descriptor", 0, NULL, 0, 0 },
{ "logfile", o_special, setlogfile, { "logfile", o_special, setlogfile,
"Append log messages to this file" }, "Append log messages to this file", 0, NULL, 0, 0 },
{ "nolog", o_int, &log_to_fd, { "nolog", o_int, &log_to_fd,
"Don't send log messages to any file", "Don't send log messages to any file",
OPT_NOARG | OPT_VAL(-1) }, OPT_NOARG | OPT_VAL(-1), NULL, 0, 0 },
{ "nologfd", o_int, &log_to_fd, { "nologfd", o_int, &log_to_fd,
"Don't send log messages to any file descriptor", "Don't send log messages to any file descriptor",
OPT_NOARG | OPT_VAL(-1) }, OPT_NOARG | OPT_VAL(-1), NULL, 0, 0 },
{ "linkname", o_string, linkname, { "linkname", o_string, linkname,
"Set logical name for link", "Set logical name for link",
OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN }, OPT_PRIV|OPT_STATIC, NULL, MAXPATHLEN, 0 },
{ "maxfail", o_int, &maxfail, { "maxfail", o_int, &maxfail,
"Maximum number of unsuccessful connection attempts to allow" }, "Maximum number of unsuccessful connection attempts to allow", 0, NULL, 0, 0 },
{ "ktune", o_bool, &tune_kernel, { "ktune", o_bool, &tune_kernel,
"Alter kernel settings as necessary", 1 }, "Alter kernel settings as necessary", 1, NULL, 0, 0 },
{ "noktune", o_bool, &tune_kernel, { "noktune", o_bool, &tune_kernel,
"Don't alter kernel settings", 0 }, "Don't alter kernel settings", 0, NULL, 0, 0 },
{ "connect-delay", o_int, &connect_delay, { "connect-delay", o_int, &connect_delay,
"Maximum time (in ms) to wait after connect script finishes" }, "Maximum time (in ms) to wait after connect script finishes", 0, NULL, 0, 0 },
#ifdef PLUGIN #ifdef PLUGIN
{ "plugin", o_special, loadplugin, { "plugin", o_special, loadplugin,
"Load a plug-in module into pppd", OPT_PRIV }, "Load a plug-in module into pppd", OPT_PRIV, NULL, 0, 0 },
#endif #endif
#ifdef PPP_FILTER #ifdef PPP_FILTER
{ "pdebug", o_int, &dflag, { "pdebug", o_int, &dflag,
"libpcap debugging" }, "libpcap debugging", 0, NULL, 0, 0 },
{ "pass-filter", 1, setpassfilter, { "pass-filter", 1, setpassfilter,
"set filter for packets to pass" }, "set filter for packets to pass", 0, NULL, 0, 0 },
{ "active-filter", 1, setactivefilter, { "active-filter", 1, setactivefilter,
"set filter for active pkts" }, "set filter for active pkts", 0, NULL, 0, 0 },
#endif #endif
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
#ifndef IMPLEMENTATION #ifndef IMPLEMENTATION

View File

@@ -31,23 +31,23 @@
static const char rcsid[] = RCSID; static const char rcsid[] = RCSID;
static bool hide_password = 1; static bool hide_password = true;
/* /*
* Command-line options. * Command-line options.
*/ */
static option_t pap_option_list[] = { static option_t pap_option_list[] = {
{ "hide-password", o_bool, &hide_password, { "hide-password", o_bool, &hide_password,
"Don't output passwords to log", 1 }, "Don't output passwords to log", 1, NULL, 0, 0 },
{ "show-password", o_bool, &hide_password, { "show-password", o_bool, &hide_password,
"Show password string in debug log messages", 0 }, "Show password string in debug log messages", 0, NULL, 0, 0 },
{ "pap-restart", o_int, &upap[0].us_timeouttime, { "pap-restart", o_int, &upap[0].us_timeouttime,
"Set retransmit timeout for PAP" }, "Set retransmit timeout for PAP", 0, NULL, 0, 0 },
{ "pap-max-authreq", o_int, &upap[0].us_maxtransmits, { "pap-max-authreq", o_int, &upap[0].us_maxtransmits,
"Set max number of transmissions for auth-reqs" }, "Set max number of transmissions for auth-reqs", 0, NULL, 0, 0 },
{ "pap-timeout", o_int, &upap[0].us_reqtimeout, { "pap-timeout", o_int, &upap[0].us_reqtimeout,
"Set time limit for peer PAP authentication" }, "Set time limit for peer PAP authentication", 0, NULL, 0, 0 },
{ NULL } { NULL, 0, NULL, NULL, 0, NULL, 0, 0 }
}; };
/* /*