diff options
author | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
commit | a7f001c816c9390acda1c72f889fd110f8d75563 (patch) | |
tree | 876d508224fb0bc9435a2e3b83f73719b56ad0b6 /usr.sbin/ppp/ipcp.c | |
parent | 13d351d26116b6bf544f619e0de396a53d47ccd1 (diff) | |
download | FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.zip FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.tar.gz |
Fix prototypes.
Remove extraneous decls.
Add ``const'' to several places.
Allow ``make NOALIAS=1'' to remove IP aliasing.
Merge with OpenBSD - only the Makefiles vary.
We can now survive a compile with
-Wall -Wbad-function-cast -Wcast-align -Wcast-qual
-Winline -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wredundant-decls
-Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts
(although the Makefile just contains -Wall).
Diffstat (limited to 'usr.sbin/ppp/ipcp.c')
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 7f93f14..6e6a4c2 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipcp.c,v 1.36 1997/11/14 15:39:14 brian Exp $ + * $Id: ipcp.c,v 1.37 1997/11/18 14:52:04 brian Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -36,6 +36,7 @@ #include <time.h> #include <unistd.h> +#include "command.h" #include "mbuf.h" #include "log.h" #include "defs.h" @@ -48,7 +49,6 @@ #include "os.h" #include "phase.h" #include "loadalias.h" -#include "command.h" #include "vars.h" #include "vjcomp.h" #include "ip.h" @@ -101,7 +101,7 @@ struct fsm IpcpFsm = { IpcpDecodeConfig, }; -static char *cftypes[] = { +static const char *cftypes[] = { /* Check out the latest ``Assigned numbers'' rfc (rfc1700.txt) */ "???", "IPADDRS", /* 1: IP-Addresses */ /* deprecated */ @@ -111,7 +111,7 @@ static char *cftypes[] = { #define NCFTYPES (sizeof(cftypes)/sizeof(char *)) -static char *cftypes128[] = { +static const char *cftypes128[] = { /* Check out the latest ``Assigned numbers'' rfc (rfc1700.txt) */ "???", "PRIDNS", /* 129: Primary DNS Server Address */ @@ -137,7 +137,7 @@ IpcpAddOutOctets(int n) } int -ReportIpcpStatus() +ReportIpcpStatus(struct cmdargs const *arg) { struct ipcpstate *icp = &IpcpInfo; struct fsm *fp = &IpcpFsm; @@ -303,8 +303,10 @@ IpcpLayerUp(struct fsm * fp) LogPrintf(LogERROR, "IpcpLayerUp: unable to set ip address\n"); return; } +#ifndef NOALIAS if (mode & MODE_ALIAS) VarPacketAliasSetAddress(IpcpInfo.want_ipaddr); +#endif OsLinkup(); throughput_start(&throughput); StartIdleTimer(); |