X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fccp.c;h=3c286829157a25b7512661dbb3c69bdde925edcb;hb=fafbfdf19a3d52e85ec2a445bd72e412a06cb0d0;hp=36ee5496d33b530de45fb6df64bbca85207fa85d;hpb=e8676075aea6d278f435d5ce83d9b6aa216a1ecb;p=ppp.git diff --git a/pppd/ccp.c b/pppd/ccp.c index 36ee549..3c28682 100644 --- a/pppd/ccp.c +++ b/pppd/ccp.c @@ -17,7 +17,7 @@ * 3. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Paul Mackerras - * ". + * ". * * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY @@ -36,11 +36,16 @@ #include #include +#if defined(SOL2) +#include +#else +#include +#endif -#include "pppd.h" +#include "pppd-private.h" +#include "options.h" #include "fsm.h" #include "ccp.h" -#include #include "chap_ms.h" #include "mppe.h" @@ -71,7 +76,7 @@ static char deflate_value[8]; bool refuse_mppe_stateful = 1; /* Allow stateful mode? */ #endif -static option_t ccp_option_list[] = { +static struct option ccp_option_list[] = { { "noccp", o_bool, &ccp_protent.enabled_flag, "Disable CCP negotiation" }, { "-ccp", o_bool, &ccp_protent.enabled_flag, @@ -272,12 +277,12 @@ setbsdcomp(char **argv) abits = strtol(str, &endp, 0); } if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for bsdcomp option", *argv); + ppp_option_error("invalid parameter '%s' for bsdcomp option", *argv); return 0; } if ((rbits != 0 && (rbits < BSD_MIN_BITS || rbits > BSD_MAX_BITS)) || (abits != 0 && (abits < BSD_MIN_BITS || abits > BSD_MAX_BITS))) { - option_error("bsdcomp option values must be 0 or %d .. %d", + ppp_option_error("bsdcomp option values must be 0 or %d .. %d", BSD_MIN_BITS, BSD_MAX_BITS); return 0; } @@ -310,13 +315,13 @@ setdeflate(char **argv) abits = strtol(str, &endp, 0); } if (*endp != 0 || endp == str) { - option_error("invalid parameter '%s' for deflate option", *argv); + ppp_option_error("invalid parameter '%s' for deflate option", *argv); return 0; } if ((rbits != 0 && (rbits < DEFLATE_MIN_SIZE || rbits > DEFLATE_MAX_SIZE)) || (abits != 0 && (abits < DEFLATE_MIN_SIZE || abits > DEFLATE_MAX_SIZE))) { - option_error("deflate option values must be 0 or %d .. %d", + ppp_option_error("deflate option values must be 0 or %d .. %d", DEFLATE_MIN_SIZE, DEFLATE_MAX_SIZE); return 0; } @@ -525,7 +530,7 @@ ccp_resetci(fsm *f) if (go->mppe) { ccp_options *ao = &ccp_allowoptions[f->unit]; int auth_mschap_bits = auth_done[f->unit]; -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS int auth_eap_bits = auth_done[f->unit]; #endif int numbits; @@ -556,7 +561,7 @@ ccp_resetci(fsm *f) return; } -#ifdef USE_EAPTLS +#ifdef PPP_WITH_EAPTLS /* * MPPE is also possible in combination with EAP-TLS. * It is not possible to detect if we're doing EAP or EAP-TLS @@ -1171,9 +1176,9 @@ ccp_reqci(fsm *f, u_char *p, int *lenp, int dont_nak) * because MPPE frames **grow**. The kernel [must] * allocate MPPE_PAD extra bytes in xmit buffers. */ - mtu = netif_get_mtu(f->unit); + mtu = ppp_get_mtu(f->unit); if (mtu) - netif_set_mtu(f->unit, mtu - MPPE_PAD); + ppp_set_mtu(f->unit, mtu - MPPE_PAD); else newret = CONFREJ; }