mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-05 14:04:38 +08:00
fixed most PPP compilation warnings with -pedantic
This commit is contained in:
parent
d143acfc76
commit
44c2a0a7fc
@ -223,15 +223,15 @@ struct notifier *link_down_notifier = NULL;
|
|||||||
bool uselogin = 0; /* Use /etc/passwd for checking PAP */
|
bool uselogin = 0; /* Use /etc/passwd for checking PAP */
|
||||||
bool session_mgmt = 0; /* Do session management (login records) */
|
bool session_mgmt = 0; /* Do session management (login records) */
|
||||||
bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */
|
bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */
|
||||||
//bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */
|
bool refuse_pap = 0; /* Don't wanna auth. ourselves with PAP */
|
||||||
//bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */
|
bool refuse_chap = 0; /* Don't wanna auth. ourselves with CHAP */
|
||||||
//bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */
|
bool refuse_eap = 0; /* Don't wanna auth. ourselves with EAP */
|
||||||
#if MSCHAP_SUPPORT
|
#if MSCHAP_SUPPORT
|
||||||
//bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */
|
bool refuse_mschap = 0; /* Don't wanna auth. ourselves with MS-CHAP */
|
||||||
//bool refuse_mschap_v2 = 0; /* Don't wanna auth. oif 0 /* UNUSED */urselves with MS-CHAPv2 */
|
bool refuse_mschap_v2 = 0; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
||||||
#else /* MSCHAP_SUPPORT */
|
#else /* MSCHAP_SUPPORT */
|
||||||
//bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */
|
bool refuse_mschap = 1; /* Don't wanna auth. ourselves with MS-CHAP */
|
||||||
//bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
||||||
#endif /* MSCHAP_SUPPORT */
|
#endif /* MSCHAP_SUPPORT */
|
||||||
#endif /* MOVED TO ppp_settings */
|
#endif /* MOVED TO ppp_settings */
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
@ -1079,7 +1079,9 @@ auth_peer_success(unit, protocol, prot_flavor, name, namelen)
|
|||||||
namelen = sizeof(peer_authname) - 1;
|
namelen = sizeof(peer_authname) - 1;
|
||||||
MEMCPY(peer_authname, name, namelen);
|
MEMCPY(peer_authname, name, namelen);
|
||||||
peer_authname[namelen] = 0;
|
peer_authname[namelen] = 0;
|
||||||
//script_setenv("PEERNAME", peer_authname, 0);
|
#if 0 /* UNUSED */
|
||||||
|
script_setenv("PEERNAME", peer_authname, 0);
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
/* Save the authentication method for later. */
|
/* Save the authentication method for later. */
|
||||||
auth_done[unit] |= bit;
|
auth_done[unit] |= bit;
|
||||||
@ -1538,7 +1540,7 @@ auth_reset(unit)
|
|||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
|
|
||||||
#if 0 /* OLD CODE */
|
#if 0 /* OLD CODE */
|
||||||
//ao->neg_upap = !ppp_settings.refuse_pap && (ppp_settings.passwd[0] != 0 || get_pap_passwd(NULL));
|
ao->neg_upap = !ppp_settings.refuse_pap && (ppp_settings.passwd[0] != 0 || get_pap_passwd(NULL));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ao->neg_chap = (!ppp_settings.refuse_chap || !refuse_mschap || !refuse_mschap_v2)
|
ao->neg_chap = (!ppp_settings.refuse_chap || !refuse_mschap || !refuse_mschap_v2)
|
||||||
@ -1978,7 +1980,7 @@ get_secret(unit, client, server, secret, secret_len, am_server)
|
|||||||
|
|
||||||
/* FIXME: clean that */
|
/* FIXME: clean that */
|
||||||
#if 0
|
#if 0
|
||||||
// strlcpy(rname, ppp_settings.user, sizeof(rname));
|
strlcpy(rname, ppp_settings.user, sizeof(rname));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -304,7 +304,7 @@ struct protent ipcp_protent = {
|
|||||||
#endif /* DEMAND_SUPPORT */
|
#endif /* DEMAND_SUPPORT */
|
||||||
};
|
};
|
||||||
|
|
||||||
static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
|
static void ipcp_clear_addrs(int unit, u_int32_t ouraddr, u_int32_t hisaddr, bool replacedefaultroute);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lengths of configuration options.
|
* Lengths of configuration options.
|
||||||
@ -2038,13 +2038,8 @@ ipcp_down(f)
|
|||||||
* ipcp_clear_addrs() - clear the interface addresses, routes,
|
* ipcp_clear_addrs() - clear the interface addresses, routes,
|
||||||
* proxy arp entries, etc.
|
* proxy arp entries, etc.
|
||||||
*/
|
*/
|
||||||
static void
|
static void ipcp_clear_addrs(int unit, u_int32_t ouraddr, u_int32_t hisaddr, bool replacedefaultroute) {
|
||||||
ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
|
|
||||||
int unit;
|
|
||||||
u_int32_t ouraddr; /* local address */
|
|
||||||
u_int32_t hisaddr; /* remote address */
|
|
||||||
bool replacedefaultroute;
|
|
||||||
{
|
|
||||||
if (proxy_arp_set[unit]) {
|
if (proxy_arp_set[unit]) {
|
||||||
cifproxyarp(unit, hisaddr);
|
cifproxyarp(unit, hisaddr);
|
||||||
proxy_arp_set[unit] = 0;
|
proxy_arp_set[unit] = 0;
|
||||||
|
@ -731,22 +731,27 @@ lcp_cilen(f)
|
|||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
LENCISHORT(go->neg_eap) +
|
LENCISHORT(go->neg_eap) +
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
LENCICHAP(
|
|
||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
!go->neg_eap &&
|
LENCICHAP(!go->neg_eap && go->neg_chap) +
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
go->neg_chap) +
|
#if !EAP_SUPPORT
|
||||||
|
LENCICHAP(go->neg_chap) +
|
||||||
|
#endif /* !EAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
LENCISHORT(
|
#if EAP_SUPPORT && CHAP_SUPPORT
|
||||||
#if EAP_SUPPORT
|
LENCISHORT(!go->neg_eap && !go->neg_chap && go->neg_upap) +
|
||||||
!go->neg_eap &&
|
#endif /* EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
#endif /* EAP_SUPPORT */
|
#if EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
#if CHAP_SUPPORT
|
LENCISHORT(!go->neg_eap && go->neg_upap) +
|
||||||
!go->neg_chap &&
|
#endif /* EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#if !EAP_SUPPORT && CHAP_SUPPORT
|
||||||
go->neg_upap) +
|
LENCISHORT(!go->neg_chap && go->neg_upap) +
|
||||||
|
#endif /* !EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
|
#if !EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
|
LENCISHORT(go->neg_upap) +
|
||||||
|
#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* PAP_SUPPORT */
|
#endif /* PAP_SUPPORT */
|
||||||
LENCILQR(go->neg_lqr) +
|
LENCILQR(go->neg_lqr) +
|
||||||
LENCICBCP(go->neg_cbcp) +
|
LENCICBCP(go->neg_cbcp) +
|
||||||
@ -826,22 +831,27 @@ lcp_addci(f, ucp, lenp)
|
|||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
ADDCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP);
|
ADDCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP);
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
ADDCICHAP(CI_AUTHTYPE,
|
|
||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
!go->neg_eap &&
|
ADDCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype);
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
go->neg_chap, go->chap_mdtype);
|
#if !EAP_SUPPORT
|
||||||
|
ADDCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype);
|
||||||
|
#endif /* !EAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
ADDCISHORT(CI_AUTHTYPE,
|
#if EAP_SUPPORT && CHAP_SUPPORT
|
||||||
#if EAP_SUPPORT
|
ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP);
|
||||||
!go->neg_eap &&
|
#endif /* EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
#endif /* EAP_SUPPORT */
|
#if EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
#if CHAP_SUPPORT
|
ADDCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP);
|
||||||
!go->neg_chap &&
|
#endif /* EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#if !EAP_SUPPORT && CHAP_SUPPORT
|
||||||
go->neg_upap, PPP_PAP);
|
ADDCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
|
||||||
|
#endif /* !EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
|
#if !EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
|
ADDCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP);
|
||||||
|
#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* PAP_SUPPORT */
|
#endif /* PAP_SUPPORT */
|
||||||
ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
|
ADDCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
|
||||||
ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
|
ADDCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
|
||||||
@ -993,22 +1003,27 @@ lcp_ackci(f, p, len)
|
|||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
ACKCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP);
|
ACKCISHORT(CI_AUTHTYPE, go->neg_eap, PPP_EAP);
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
ACKCICHAP(CI_AUTHTYPE,
|
|
||||||
#if EAP_SUPPORT
|
#if EAP_SUPPORT
|
||||||
!go->neg_eap &&
|
ACKCICHAP(CI_AUTHTYPE, !go->neg_eap && go->neg_chap, go->chap_mdtype);
|
||||||
#endif /* EAP_SUPPORT */
|
#endif /* EAP_SUPPORT */
|
||||||
go->neg_chap, go->chap_mdtype);
|
#if !EAP_SUPPORT
|
||||||
|
ACKCICHAP(CI_AUTHTYPE, go->neg_chap, go->chap_mdtype);
|
||||||
|
#endif /* !EAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
#if PAP_SUPPORT
|
#if PAP_SUPPORT /* cannot be improved, embedding a directive within macro arguments is not portable */
|
||||||
ACKCISHORT(CI_AUTHTYPE,
|
#if EAP_SUPPORT && CHAP_SUPPORT
|
||||||
#if EAP_SUPPORT
|
ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && !go->neg_chap && go->neg_upap, PPP_PAP);
|
||||||
!go->neg_eap &&
|
#endif /* EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
#endif /* EAP_SUPPORT */
|
#if EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
#if CHAP_SUPPORT
|
ACKCISHORT(CI_AUTHTYPE, !go->neg_eap && go->neg_upap, PPP_PAP);
|
||||||
!go->neg_chap &&
|
#endif /* EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* CHAP_SUPPORT */
|
#if !EAP_SUPPORT && CHAP_SUPPORT
|
||||||
go->neg_upap, PPP_PAP);
|
ACKCISHORT(CI_AUTHTYPE, !go->neg_chap && go->neg_upap, PPP_PAP);
|
||||||
|
#endif /* !EAP_SUPPORT && CHAP_SUPPORT */
|
||||||
|
#if !EAP_SUPPORT && !CHAP_SUPPORT
|
||||||
|
ACKCISHORT(CI_AUTHTYPE, go->neg_upap, PPP_PAP);
|
||||||
|
#endif /* !EAP_SUPPORT && !CHAP_SUPPORT */
|
||||||
#endif /* PAP_SUPPORT */
|
#endif /* PAP_SUPPORT */
|
||||||
ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
|
ACKCILQR(CI_QUALITY, go->neg_lqr, go->lqr_period);
|
||||||
ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
|
ACKCICHAR(CI_CALLBACK, go->neg_cbcp, CBCP_OPT);
|
||||||
|
@ -50,7 +50,9 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
//#include <syslog.h>
|
#if 0
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#ifdef PLUGIN
|
#ifdef PLUGIN
|
||||||
@ -94,12 +96,16 @@ struct option_value {
|
|||||||
int debug = 0; /* Debug flag */
|
int debug = 0; /* Debug flag */
|
||||||
int kdebugflag = 0; /* Tell kernel to print debug messages */
|
int kdebugflag = 0; /* Tell kernel to print debug messages */
|
||||||
int default_device = 1; /* Using /dev/tty or equivalent */
|
int default_device = 1; /* Using /dev/tty or equivalent */
|
||||||
//char devnam[MAXPATHLEN]; /* Device name */
|
#if 0
|
||||||
|
char devnam[MAXPATHLEN]; /* Device name */
|
||||||
|
#endif
|
||||||
bool nodetach = 0; /* Don't detach from controlling tty */
|
bool nodetach = 0; /* Don't detach from controlling tty */
|
||||||
bool updetach = 0; /* Detach once link is up */
|
bool updetach = 0; /* Detach once link is up */
|
||||||
int maxconnect = 0; /* Maximum connect time */
|
int maxconnect = 0; /* Maximum connect time */
|
||||||
//char user[MAXNAMELEN]; /* Username for PAP */
|
#if 0
|
||||||
//char passwd[MAXSECRETLEN]; /* Password for PAP */
|
char user[MAXNAMELEN]; /* Username for PAP */
|
||||||
|
char passwd[MAXSECRETLEN]; /* Password for PAP */
|
||||||
|
#endif
|
||||||
bool persist = 0; /* Reopen link after it goes down */
|
bool persist = 0; /* Reopen link after it goes down */
|
||||||
char our_name[MAXNAMELEN]; /* Our name for authentication purposes */
|
char our_name[MAXNAMELEN]; /* Our name for authentication purposes */
|
||||||
#if DEMAND_SUPPORT
|
#if DEMAND_SUPPORT
|
||||||
@ -114,14 +120,18 @@ int log_to_fd = 1; /* send log messages to this fd too */
|
|||||||
#endif
|
#endif
|
||||||
bool log_default = 1; /* log_to_fd is default (stdout) */
|
bool log_default = 1; /* log_to_fd is default (stdout) */
|
||||||
int maxfail = 10; /* max # of unsuccessful connection attempts */
|
int maxfail = 10; /* max # of unsuccessful connection attempts */
|
||||||
//char linkname[MAXPATHLEN]; /* logical name for link */
|
#if 0
|
||||||
|
char linkname[MAXPATHLEN]; /* logical name for link */
|
||||||
|
#endif
|
||||||
bool tune_kernel; /* may alter kernel settings */
|
bool tune_kernel; /* may alter kernel settings */
|
||||||
int connect_delay = 1000; /* wait this many ms after connect script */
|
int connect_delay = 1000; /* wait this many ms after connect script */
|
||||||
int req_unit = -1; /* requested interface unit */
|
int req_unit = -1; /* requested interface unit */
|
||||||
bool multilink = 0; /* Enable multilink operation */
|
bool multilink = 0; /* Enable multilink operation */
|
||||||
char *bundle_name = NULL; /* bundle name for multilink */
|
char *bundle_name = NULL; /* bundle name for multilink */
|
||||||
bool dump_options; /* print out option values */
|
bool dump_options; /* print out option values */
|
||||||
//bool dryrun; /* print out option values and exit */
|
#if 0
|
||||||
|
bool dryrun; /* print out option values and exit */
|
||||||
|
#endif
|
||||||
char *domain; /* domain name set by domain option */
|
char *domain; /* domain name set by domain option */
|
||||||
int child_wait = 5; /* # seconds to wait for children at exit */
|
int child_wait = 5; /* # seconds to wait for children at exit */
|
||||||
|
|
||||||
|
@ -736,7 +736,7 @@ void pppInProcOverEthernet(int pd, struct pbuf *pb) {
|
|||||||
|
|
||||||
drop:
|
drop:
|
||||||
LINK_STATS_INC(link.drop);
|
LINK_STATS_INC(link.drop);
|
||||||
// snmp_inc_ifindiscards(&pppControl[pd].netif);
|
snmp_inc_ifindiscards(&pppControl[pd].netif);
|
||||||
pbuf_free(pb);
|
pbuf_free(pb);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -744,8 +744,10 @@ drop:
|
|||||||
void pppOverEthernetInitFailed(int pd) {
|
void pppOverEthernetInitFailed(int pd) {
|
||||||
PPPControl* pc;
|
PPPControl* pc;
|
||||||
|
|
||||||
//pppHup(pd);
|
/* FIXME: re-enable that
|
||||||
//pppStop(pd);
|
* pppHup(pd);
|
||||||
|
* pppStop(pd);
|
||||||
|
*/
|
||||||
|
|
||||||
pc = &pppControl[pd];
|
pc = &pppControl[pd];
|
||||||
pppoe_destroy(&pc->netif);
|
pppoe_destroy(&pc->netif);
|
||||||
@ -827,7 +829,7 @@ static err_t pppifOutput(struct netif *netif, struct pbuf *pb, ip_addr_t *ipaddr
|
|||||||
* and the peer will just drop it if it's not accepting it. */
|
* and the peer will just drop it if it's not accepting it. */
|
||||||
if (pd < 0 || pd >= NUM_PPP || !pc->openFlag || !pb) {
|
if (pd < 0 || pd >= NUM_PPP || !pc->openFlag || !pb) {
|
||||||
PPPDEBUG(LOG_WARNING, ("pppifOutput[%d]: bad parms prot=%d pb=%p\n",
|
PPPDEBUG(LOG_WARNING, ("pppifOutput[%d]: bad parms prot=%d pb=%p\n",
|
||||||
pd, PPP_IP, pb));
|
pd, PPP_IP, (void*)pb));
|
||||||
LINK_STATS_INC(link.opterr);
|
LINK_STATS_INC(link.opterr);
|
||||||
LINK_STATS_INC(link.drop);
|
LINK_STATS_INC(link.drop);
|
||||||
snmp_inc_ifoutdiscards(netif);
|
snmp_inc_ifoutdiscards(netif);
|
||||||
@ -1168,8 +1170,10 @@ int sifaddr (int unit, u_int32_t our_adr, u_int32_t his_adr,
|
|||||||
SMEMCPY(&pc->addrs.our_ipaddr, &our_adr, sizeof(our_adr));
|
SMEMCPY(&pc->addrs.our_ipaddr, &our_adr, sizeof(our_adr));
|
||||||
SMEMCPY(&pc->addrs.his_ipaddr, &his_adr, sizeof(his_adr));
|
SMEMCPY(&pc->addrs.his_ipaddr, &his_adr, sizeof(his_adr));
|
||||||
SMEMCPY(&pc->addrs.netmask, &net_mask, sizeof(net_mask));
|
SMEMCPY(&pc->addrs.netmask, &net_mask, sizeof(net_mask));
|
||||||
// SMEMCPY(&pc->addrs.dns1, &ns1, sizeof(ns1));
|
/* FIXME: re-enable DNS
|
||||||
// SMEMCPY(&pc->addrs.dns2, &ns2, sizeof(ns2));
|
* SMEMCPY(&pc->addrs.dns1, &ns1, sizeof(ns1));
|
||||||
|
* SMEMCPY(&pc->addrs.dns2, &ns2, sizeof(ns2));
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
|
@ -281,8 +281,8 @@ struct ppp_settings {
|
|||||||
char user [MAXNAMELEN + 1]; /* Username for PAP */
|
char user [MAXNAMELEN + 1]; /* Username for PAP */
|
||||||
char passwd [MAXSECRETLEN + 1]; /* Password for PAP, secret for CHAP */
|
char passwd [MAXSECRETLEN + 1]; /* Password for PAP, secret for CHAP */
|
||||||
char our_name [MAXNAMELEN + 1]; /* Our name for authentication purposes */
|
char our_name [MAXNAMELEN + 1]; /* Our name for authentication purposes */
|
||||||
// FIXME: re-enable that
|
/* FIXME: re-enable that */
|
||||||
// char remote_name[MAXNAMELEN + 1]; /* Peer's name for authentication */
|
/* char remote_name[MAXNAMELEN + 1]; */ /* Peer's name for authentication */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ppp_settings ppp_settings;
|
struct ppp_settings ppp_settings;
|
||||||
@ -315,12 +315,12 @@ int ppp_init(void);
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
enum pppAuthType {
|
enum pppAuthType {
|
||||||
PPPAUTHTYPE_NONE,
|
|
||||||
PPPAUTHTYPE_ANY,
|
|
||||||
PPPAUTHTYPE_PAP,
|
|
||||||
#if CHAP_SUPPORT
|
#if CHAP_SUPPORT
|
||||||
PPPAUTHTYPE_CHAP,
|
PPPAUTHTYPE_CHAP,
|
||||||
#endif /* CHAP_SUPPORT */
|
#endif /* CHAP_SUPPORT */
|
||||||
|
PPPAUTHTYPE_PAP,
|
||||||
|
PPPAUTHTYPE_ANY,
|
||||||
|
PPPAUTHTYPE_NONE
|
||||||
};
|
};
|
||||||
|
|
||||||
int ppp_init(void);
|
int ppp_init(void);
|
||||||
@ -511,7 +511,7 @@ int get_secret __P((int, char *, char *, char *, int *, int));
|
|||||||
/* get "secret" for chap */
|
/* get "secret" for chap */
|
||||||
|
|
||||||
/* Procedures exported from ipcp.c */
|
/* Procedures exported from ipcp.c */
|
||||||
//int parse_dotted_ip __P((char *, u_int32_t *));
|
/* int parse_dotted_ip __P((char *, u_int32_t *)); */
|
||||||
|
|
||||||
/* Procedures exported from demand.c */
|
/* Procedures exported from demand.c */
|
||||||
#if DEMAND_SUPPORT
|
#if DEMAND_SUPPORT
|
||||||
|
@ -950,7 +950,7 @@ start_charshunt(ifd, ofd)
|
|||||||
{
|
{
|
||||||
int cpid;
|
int cpid;
|
||||||
|
|
||||||
cpid = -1; // safe_fork(ifd, ofd, (log_to_fd >= 0? log_to_fd: 2));
|
cpid = -1; /* safe_fork(ifd, ofd, (log_to_fd >= 0? log_to_fd: 2)); */
|
||||||
if (cpid == -1) {
|
if (cpid == -1) {
|
||||||
error("Can't fork process for character shunt: %m");
|
error("Can't fork process for character shunt: %m");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -40,7 +40,9 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
//#include <syslog.h>
|
#if 0
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <utmp.h>
|
#include <utmp.h>
|
||||||
@ -678,7 +680,7 @@ log_write(level, buf)
|
|||||||
char *buf;
|
char *buf;
|
||||||
{
|
{
|
||||||
/* FIXME: replace this with a log callback */
|
/* FIXME: replace this with a log callback */
|
||||||
// if(level >= min_log_level) /* FIXME: add a minimum log level */
|
/* if(level >= min_log_level) */ /* FIXME: add a minimum log level */
|
||||||
printf("LOG: %s\n", buf);
|
printf("LOG: %s\n", buf);
|
||||||
#if 0
|
#if 0
|
||||||
if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) {
|
if (log_to_fd >= 0 && (level != LOG_DEBUG || debug)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user