summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-01-21 02:15:33 +0000
committerbrian <brian@FreeBSD.org>1998-01-21 02:15:33 +0000
commit8a229af5668a46fda9ae9c7a0fc18cf5d0f2e337 (patch)
tree403c2042c52b8c056a6d3fd2cb974c58a8dfa534 /usr.sbin/ppp
parent606a03ebe5beda6ea740330bf2295c7adc7f4101 (diff)
downloadFreeBSD-src-8a229af5668a46fda9ae9c7a0fc18cf5d0f2e337.zip
FreeBSD-src-8a229af5668a46fda9ae9c7a0fc18cf5d0f2e337.tar.gz
Remove unused #includes.
Make various bits static. Remove unused variables. Submitted by: eivind
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/alias_cmd.c3
-rw-r--r--usr.sbin/ppp/async.c9
-rw-r--r--usr.sbin/ppp/auth.c7
-rw-r--r--usr.sbin/ppp/ccp.c3
-rw-r--r--usr.sbin/ppp/chap_ms.c5
-rw-r--r--usr.sbin/ppp/chat.c5
-rw-r--r--usr.sbin/ppp/defs.c3
-rw-r--r--usr.sbin/ppp/filter.c5
-rw-r--r--usr.sbin/ppp/fsm.h3
-rw-r--r--usr.sbin/ppp/hdlc.c23
-rw-r--r--usr.sbin/ppp/hdlc.h4
-rw-r--r--usr.sbin/ppp/id.c7
-rw-r--r--usr.sbin/ppp/ip.c8
-rw-r--r--usr.sbin/ppp/ipcp.c7
-rw-r--r--usr.sbin/ppp/lcp.c8
-rw-r--r--usr.sbin/ppp/log.c3
-rw-r--r--usr.sbin/ppp/lqr.c8
-rw-r--r--usr.sbin/ppp/lqr.h6
-rw-r--r--usr.sbin/ppp/main.c9
-rw-r--r--usr.sbin/ppp/mbuf.c5
-rw-r--r--usr.sbin/ppp/mbuf.h4
-rw-r--r--usr.sbin/ppp/modem.c6
-rw-r--r--usr.sbin/ppp/modem.h4
-rw-r--r--usr.sbin/ppp/nat_cmd.c3
-rw-r--r--usr.sbin/ppp/os.c7
-rw-r--r--usr.sbin/ppp/phase.h3
-rw-r--r--usr.sbin/ppp/route.c5
-rw-r--r--usr.sbin/ppp/server.c3
-rw-r--r--usr.sbin/ppp/systems.c4
-rw-r--r--usr.sbin/ppp/timer.c8
-rw-r--r--usr.sbin/ppp/timer.h5
-rw-r--r--usr.sbin/ppp/tun.c3
-rw-r--r--usr.sbin/ppp/vars.c7
-rw-r--r--usr.sbin/ppp/vars.h5
-rw-r--r--usr.sbin/ppp/vjcomp.c9
35 files changed, 69 insertions, 138 deletions
diff --git a/usr.sbin/ppp/alias_cmd.c b/usr.sbin/ppp/alias_cmd.c
index 15f3a94..d79ff32 100644
--- a/usr.sbin/ppp/alias_cmd.c
+++ b/usr.sbin/ppp/alias_cmd.c
@@ -2,11 +2,10 @@
* The code in this file was written by Eivind Eklund <perhaps@yes.no>,
* who places it in the public domain without restriction.
*
- * $Id: alias_cmd.c,v 1.10 1997/12/21 14:28:23 brian Exp $
+ * $Id: alias_cmd.c,v 1.11 1997/12/24 10:28:37 brian Exp $
*/
#include <sys/param.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
diff --git a/usr.sbin/ppp/async.c b/usr.sbin/ppp/async.c
index 9d02622..835de42 100644
--- a/usr.sbin/ppp/async.c
+++ b/usr.sbin/ppp/async.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: async.c,v 1.13 1997/10/29 01:19:38 brian Exp $
+ * $Id: async.c,v 1.14 1997/11/22 03:37:23 brian Exp $
*
*/
#include <sys/param.h>
@@ -39,7 +39,6 @@
#include "modem.h"
#include "loadalias.h"
#include "vars.h"
-#include "os.h"
#include "async.h"
#define HDLCSIZE (MAX_MRU*2+6)
@@ -140,7 +139,7 @@ AsyncDecode(u_char c)
struct mbuf *bp;
if ((hs->mode & MODE_HUNT) && c != HDLC_SYN)
- return (NULLBUFF);
+ return NULL;
switch (c) {
case HDLC_SYN:
@@ -149,7 +148,7 @@ AsyncDecode(u_char c)
bp = mballoc(hs->length, MB_ASYNC);
mbwrite(bp, hs->hbuff, hs->length);
hs->length = 0;
- return (bp);
+ return bp;
}
break;
case HDLC_ESC:
@@ -173,7 +172,7 @@ AsyncDecode(u_char c)
hs->hbuff[hs->length++] = c;
break;
}
- return NULLBUFF;
+ return NULL;
}
void
diff --git a/usr.sbin/ppp/auth.c b/usr.sbin/ppp/auth.c
index 9e07cc7..4226a0a 100644
--- a/usr.sbin/ppp/auth.c
+++ b/usr.sbin/ppp/auth.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: auth.c,v 1.25 1997/12/24 09:28:50 brian Exp $
+ * $Id: auth.c,v 1.26 1998/01/05 01:35:17 brian Exp $
*
* TODO:
* o Implement check against with registered IP addresses.
@@ -31,20 +31,15 @@
#include "command.h"
#include "mbuf.h"
-#include "log.h"
#include "defs.h"
#include "timer.h"
#include "fsm.h"
-#include "lcpproto.h"
#include "ipcp.h"
#include "loadalias.h"
#include "vars.h"
-#include "filter.h"
#include "auth.h"
#include "chat.h"
#include "systems.h"
-#include "iplist.h"
-#include "route.h"
void
LocalAuthInit()
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 248da3f..5dfd941 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ccp.c,v 1.28 1998/01/10 01:55:08 brian Exp $
+ * $Id: ccp.c,v 1.29 1998/01/20 22:47:34 brian Exp $
*
* TODO:
* o Support other compression protocols
@@ -62,7 +62,6 @@ struct fsm CcpFsm = {
0,
ST_INITIAL,
0, 0, 0,
- 0,
{0, 0, 0, NULL, NULL, NULL}, /* FSM timer */
{0, 0, 0, NULL, NULL, NULL}, /* Open timer */
{0, 0, 0, NULL, NULL, NULL}, /* Stopped timer */
diff --git a/usr.sbin/ppp/chap_ms.c b/usr.sbin/ppp/chap_ms.c
index aaef294..5ae1d29 100644
--- a/usr.sbin/ppp/chap_ms.c
+++ b/usr.sbin/ppp/chap_ms.c
@@ -19,7 +19,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: chap_ms.c,v 1.3 1997/11/22 03:37:26 brian Exp $
+ * $Id: chap_ms.c,v 1.4 1997/12/24 09:28:53 brian Exp $
*
*/
@@ -29,12 +29,9 @@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
-#include <syslog.h>
#include "command.h"
#include "mbuf.h"
-#include "timer.h"
-#include "chap.h"
#include "chap_ms.h"
/* unused, for documentation only */
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 9603072..61d9877 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.42 1997/12/24 09:28:54 brian Exp $
+ * $Id: chat.c,v 1.43 1997/12/27 07:22:11 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -36,9 +36,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/socket.h>
#include <sys/time.h>
-#include <sys/uio.h>
#include <sys/wait.h>
#include <termios.h>
#include <unistd.h>
@@ -51,7 +49,6 @@
#include "loadalias.h"
#include "vars.h"
#include "chat.h"
-#include "sig.h"
#include "modem.h"
#ifndef isblank
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c
index 979daa7..f974b90 100644
--- a/usr.sbin/ppp/defs.c
+++ b/usr.sbin/ppp/defs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: defs.c,v 1.9 1997/12/27 13:45:47 brian Exp $
+ * $Id: defs.c,v 1.10 1997/12/30 20:02:50 brian Exp $
*/
#include <sys/param.h>
@@ -33,7 +33,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "defs.h"
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index 596b65a..b426e31 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -17,13 +17,12 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: filter.c,v 1.20 1997/12/13 02:37:22 brian Exp $
+ * $Id: filter.c,v 1.21 1997/12/24 09:28:57 brian Exp $
*
* TODO: Shoud send ICMP error message when we discard packets.
*/
#include <sys/param.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -269,7 +268,7 @@ ParseUdpOrTcp(int argc, char const *const *argv, int proto)
return (0);
}
-const char *opname[] = {"none", "eq", "gt", NULL, "lt"};
+static const char *opname[] = {"none", "eq", "gt", NULL, "lt"};
static int
Parse(int argc, char const *const *argv, struct filterent * ofp)
diff --git a/usr.sbin/ppp/fsm.h b/usr.sbin/ppp/fsm.h
index 42f1184..131c901 100644
--- a/usr.sbin/ppp/fsm.h
+++ b/usr.sbin/ppp/fsm.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: fsm.h,v 1.14 1998/01/10 01:55:10 brian Exp $
+ * $Id: fsm.h,v 1.15 1998/01/20 22:47:37 brian Exp $
*
* TODO:
*/
@@ -55,7 +55,6 @@ struct fsm {
int restart; /* Restart counter value */
int maxconfig;
- int reqcode; /* Request code sent */
struct pppTimer FsmTimer; /* Restart Timer */
struct pppTimer OpenTimer; /* Delay before opening */
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index db0dc87..ca51a64 100644
--- a/usr.sbin/ppp/hdlc.c
+++ b/usr.sbin/ppp/hdlc.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: hdlc.c,v 1.26 1998/01/06 00:58:31 brian Exp $
+ * $Id: hdlc.c,v 1.27 1998/01/10 01:55:10 brian Exp $
*
* TODO:
*/
@@ -49,7 +49,7 @@
#include "modem.h"
#include "ccp.h"
-struct hdlcstat {
+static struct hdlcstat {
int badfcs;
int badaddr;
int badcommand;
@@ -59,10 +59,8 @@ struct hdlcstat {
static int ifOutPackets;
static int ifOutOctets;
static int ifOutLQRs;
-static int ifInPackets;
-static int ifInOctets;
-struct protostat {
+static struct protostat {
u_short number;
const char *name;
u_long in_count;
@@ -121,8 +119,8 @@ u_char EscMap[33];
void
HdlcInit()
{
- ifInOctets = ifOutOctets = 0;
- ifInPackets = ifOutPackets = 0;
+ ifOutOctets = 0;
+ ifOutPackets = 0;
ifOutLQRs = 0;
}
@@ -138,7 +136,7 @@ HdlcFcs(u_short fcs, u_char * cp, int len)
return (fcs);
}
-inline u_short
+static inline u_short
HdlcFcsBuf(u_short fcs, struct mbuf *m)
{
int len;
@@ -173,7 +171,7 @@ HdlcOutput(int pri, u_short proto, struct mbuf * bp)
return;
if (DEV_IS_SYNC)
- mfcs = NULLBUFF;
+ mfcs = NULL;
else
mfcs = mballoc(2, MB_HDLCOUT);
@@ -371,7 +369,7 @@ Protocol2Nam(u_short proto)
return "unrecognised protocol";
}
-void
+static void
DecodePacket(u_short proto, struct mbuf * bp)
{
u_char *cp;
@@ -406,7 +404,7 @@ DecodePacket(u_short proto, struct mbuf * bp)
case PROTO_VJUNCOMP:
case PROTO_VJCOMP:
bp = VjCompInput(bp, proto);
- if (bp == NULLBUFF) {
+ if (bp == NULL) {
break;
}
/* fall down */
@@ -518,9 +516,6 @@ HdlcInput(struct mbuf * bp)
}
cp = MBUF_CTOP(bp);
- ifInPackets++;
- ifInOctets += bp->cnt;
-
if (!LcpInfo.want_acfcomp) {
/*
diff --git a/usr.sbin/ppp/hdlc.h b/usr.sbin/ppp/hdlc.h
index 7cb5234..caf991f 100644
--- a/usr.sbin/ppp/hdlc.h
+++ b/usr.sbin/ppp/hdlc.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: hdlc.h,v 1.12 1997/11/22 03:37:33 brian Exp $
+ * $Id: hdlc.h,v 1.13 1997/12/03 10:23:48 brian Exp $
*
* TODO:
*/
@@ -62,7 +62,5 @@ extern void HdlcErrorCheck(void);
extern void HdlcInput(struct mbuf *);
extern void HdlcOutput(int, u_short, struct mbuf *bp);
extern u_short HdlcFcs(u_short, u_char *, int);
-extern u_short HdlcFcsBuf(u_short, struct mbuf *);
-extern void DecodePacket(u_short, struct mbuf *);
extern int ReportHdlcStatus(struct cmdargs const *);
extern int ReportProtStatus(struct cmdargs const *);
diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c
index df37339..af41207 100644
--- a/usr.sbin/ppp/id.c
+++ b/usr.sbin/ppp/id.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: id.c,v 1.4 1997/12/21 12:11:05 brian Exp $
+ * $Id: id.c,v 1.5 1997/12/27 19:23:12 brian Exp $
*/
#include <sys/types.h>
@@ -32,7 +32,6 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <stdio.h>
-#include <stdlib.h>
#include <sysexits.h>
#include <unistd.h>
@@ -48,17 +47,13 @@
#include "id.h"
static int uid;
-static int gid;
static int euid;
-static int egid;
void
ID0init()
{
uid = getuid();
- gid = getgid();
euid = geteuid();
- egid = getegid();
}
static void
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index ac17962..ddd520b 100644
--- a/usr.sbin/ppp/ip.c
+++ b/usr.sbin/ppp/ip.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: ip.c,v 1.36 1998/01/04 20:26:37 brian Exp $
+ * $Id: ip.c,v 1.37 1998/01/11 17:53:18 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -25,8 +25,9 @@
*/
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/select.h>
#include <sys/socket.h>
+#include <net/if.h>
+#include <net/if_tun.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
@@ -34,8 +35,6 @@
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
-#include <net/if.h>
-#include <net/if_tun.h>
#ifndef NOALIAS
#include <alias.h>
@@ -53,7 +52,6 @@
#include "defs.h"
#include "timer.h"
#include "fsm.h"
-#include "lcpproto.h"
#include "hdlc.h"
#include "loadalias.h"
#include "vars.h"
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c
index 2677cd5..72c8eb1 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.48 1998/01/18 20:49:18 brian Exp $
+ * $Id: ipcp.c,v 1.49 1998/01/20 22:47:38 brian Exp $
*
* TODO:
* o More RFC1772 backwoard compatibility
@@ -30,11 +30,9 @@
#include <sys/socket.h>
#include <netdb.h>
-#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <time.h>
#include <unistd.h>
#include "command.h"
@@ -88,7 +86,6 @@ struct fsm IpcpFsm = {
ST_INITIAL,
0, 0, 0,
- 0,
{0, 0, 0, NULL, NULL, NULL}, /* FSM timer */
{0, 0, 0, NULL, NULL, NULL}, /* Open timer */
{0, 0, 0, NULL, NULL, NULL}, /* Stopped timer */
@@ -126,7 +123,7 @@ static const char *cftypes128[] = {
#define NCFTYPES128 (sizeof cftypes128/sizeof cftypes128[0])
-struct pppThroughput throughput;
+static struct pppThroughput throughput;
void
IpcpAddInOctets(int n)
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index bc7b518..815d00b 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lcp.c,v 1.53 1998/01/11 17:53:19 brian Exp $
+ * $Id: lcp.c,v 1.54 1998/01/20 22:47:40 brian Exp $
*
* TODO:
* o Validate magic number received from peer.
@@ -25,12 +25,11 @@
*/
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/select.h>
#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
#include <net/if.h>
#include <net/if_tun.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
#include <signal.h>
#include <stdarg.h>
@@ -123,7 +122,6 @@ struct fsm LcpFsm = {
1, /* Open mode delay */
ST_INITIAL, /* State of machine */
0, 0, 0,
- 0,
{0, 0, 0, NULL, NULL, NULL}, /* FSM timer */
{0, 0, 0, NULL, NULL, NULL}, /* Open timer */
{0, 0, 0, NULL, NULL, NULL}, /* Stopped timer */
diff --git a/usr.sbin/ppp/log.c b/usr.sbin/ppp/log.c
index 65bb26b..6affad5 100644
--- a/usr.sbin/ppp/log.c
+++ b/usr.sbin/ppp/log.c
@@ -23,12 +23,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: log.c,v 1.23 1997/12/21 12:11:07 brian Exp $
+ * $Id: log.c,v 1.24 1997/12/24 09:29:05 brian Exp $
*/
#include <sys/param.h>
#include <netinet/in.h>
-#include <sys/socket.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/usr.sbin/ppp/lqr.c b/usr.sbin/ppp/lqr.c
index 1ea3ecc..2820f10 100644
--- a/usr.sbin/ppp/lqr.c
+++ b/usr.sbin/ppp/lqr.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lqr.c,v 1.20 1997/11/22 03:37:37 brian Exp $
+ * $Id: lqr.c,v 1.21 1998/01/11 17:50:40 brian Exp $
*
* o LQR based on RFC1333
*
@@ -42,9 +42,11 @@
#include "lcp.h"
#include "loadalias.h"
#include "vars.h"
-#include "main.h"
-struct pppTimer LqrTimer;
+struct lqrdata MyLqrData, HisLqrData;
+struct lqrsave HisLqrSave;
+
+static struct pppTimer LqrTimer;
static u_long lastpeerin = (u_long) - 1;
diff --git a/usr.sbin/ppp/lqr.h b/usr.sbin/ppp/lqr.h
index 29e99a8..fe85d3e 100644
--- a/usr.sbin/ppp/lqr.h
+++ b/usr.sbin/ppp/lqr.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: lqr.h,v 1.10 1997/11/22 03:37:38 brian Exp $
+ * $Id: lqr.h,v 1.11 1998/01/11 17:50:42 brian Exp $
*
* TODO:
*/
@@ -46,8 +46,8 @@ struct lqrsave {
u_int32_t SaveInOctets;
};
-struct lqrdata MyLqrData, HisLqrData;
-struct lqrsave HisLqrSave;
+extern struct lqrdata MyLqrData, HisLqrData;
+extern struct lqrsave HisLqrSave;
/*
* We support LQR and ECHO as LQM method
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index b526658..0c9d89b 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: main.c,v 1.117 1998/01/11 17:53:21 brian Exp $
+ * $Id: main.c,v 1.118 1998/01/20 22:47:41 brian Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -27,13 +27,12 @@
#include <sys/time.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <net/if.h>
+#include <net/if_tun.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
-#include <netdb.h>
-#include <net/if.h>
-#include <net/if_tun.h>
#include <errno.h>
#include <fcntl.h>
@@ -44,7 +43,6 @@
#include <string.h>
#include <sys/time.h>
#include <sys/wait.h>
-#include <sysexits.h>
#include <termios.h>
#include <unistd.h>
@@ -69,7 +67,6 @@
#include "ip.h"
#include "sig.h"
#include "server.h"
-#include "lcpproto.h"
#include "main.h"
#include "vjcomp.h"
#include "async.h"
diff --git a/usr.sbin/ppp/mbuf.c b/usr.sbin/ppp/mbuf.c
index 0d72e1c..0b1c2df 100644
--- a/usr.sbin/ppp/mbuf.c
+++ b/usr.sbin/ppp/mbuf.c
@@ -17,11 +17,10 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: mbuf.c,v 1.11 1997/11/22 03:37:40 brian Exp $
+ * $Id: mbuf.c,v 1.12 1997/12/28 02:56:42 brian Exp $
*
*/
#include <sys/param.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
@@ -36,7 +35,7 @@
#include "vars.h"
#include "server.h"
-struct memmap {
+static struct memmap {
struct mbuf *queue;
int count;
} MemMap[MB_MAX + 2];
diff --git a/usr.sbin/ppp/mbuf.h b/usr.sbin/ppp/mbuf.h
index 6877126..da6255c 100644
--- a/usr.sbin/ppp/mbuf.h
+++ b/usr.sbin/ppp/mbuf.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: mbuf.h,v 1.9 1997/11/22 03:37:40 brian Exp $
+ * $Id: mbuf.h,v 1.10 1997/12/03 10:23:50 brian Exp $
*
* TODO:
*/
@@ -36,8 +36,6 @@ struct mqueue {
int qlen;
};
-#define NULLBUFF ((struct mbuf *)0)
-
#define MBUF_CTOP(bp) (bp->base + bp->offset)
#define MB_ASYNC 1
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c
index 54ce7fb..d19b6fb 100644
--- a/usr.sbin/ppp/modem.c
+++ b/usr.sbin/ppp/modem.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: modem.c,v 1.74 1998/01/10 01:55:10 brian Exp $
+ * $Id: modem.c,v 1.75 1998/01/20 22:47:42 brian Exp $
*
* TODO:
*/
@@ -35,8 +35,6 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
-#include <termios.h>
-#include <time.h>
#include <unistd.h>
#include <utmp.h>
@@ -293,7 +291,7 @@ StartModemTimer(void)
StartTimer(&ModemTimer);
}
-struct parity {
+static struct parity {
const char *name;
const char *name1;
int set;
diff --git a/usr.sbin/ppp/modem.h b/usr.sbin/ppp/modem.h
index 3419a6f..e4b6dbb 100644
--- a/usr.sbin/ppp/modem.h
+++ b/usr.sbin/ppp/modem.h
@@ -15,14 +15,12 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: modem.h,v 1.14 1997/11/22 03:37:41 brian Exp $
+ * $Id: modem.h,v 1.15 1998/01/10 01:55:11 brian Exp $
*
* TODO:
*/
extern int RawModem(void);
-extern void UpModem(int);
-extern void DownModem(int);
extern void WriteModem(int, const char *, int);
extern void ModemStartOutput(int);
extern int OpenModem(void);
diff --git a/usr.sbin/ppp/nat_cmd.c b/usr.sbin/ppp/nat_cmd.c
index 15f3a94..d79ff32 100644
--- a/usr.sbin/ppp/nat_cmd.c
+++ b/usr.sbin/ppp/nat_cmd.c
@@ -2,11 +2,10 @@
* The code in this file was written by Eivind Eklund <perhaps@yes.no>,
* who places it in the public domain without restriction.
*
- * $Id: alias_cmd.c,v 1.10 1997/12/21 14:28:23 brian Exp $
+ * $Id: alias_cmd.c,v 1.11 1997/12/24 10:28:37 brian Exp $
*/
#include <sys/param.h>
-#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c
index b2b268e..5cdb70c 100644
--- a/usr.sbin/ppp/os.c
+++ b/usr.sbin/ppp/os.c
@@ -17,17 +17,14 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: os.c,v 1.40 1998/01/11 17:53:25 brian Exp $
+ * $Id: os.c,v 1.41 1998/01/19 02:59:33 brian Exp $
*
*/
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/select.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
-#include <net/if_tun.h>
-#include <net/route.h>
#include <arpa/inet.h>
#include <errno.h>
@@ -54,7 +51,6 @@
#include "route.h"
#include "lcp.h"
#include "ccp.h"
-#include "modem.h"
char *IfDevName;
@@ -215,7 +211,6 @@ OsSetIpaddress(struct in_addr myaddr, struct in_addr hisaddr)
}
static struct in_addr peer_addr;
-struct in_addr defaddr;
void
OsLinkup()
diff --git a/usr.sbin/ppp/phase.h b/usr.sbin/ppp/phase.h
index e3f3b1c..1ed568e 100644
--- a/usr.sbin/ppp/phase.h
+++ b/usr.sbin/ppp/phase.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: phase.h,v 1.7 1997/08/25 00:29:25 brian Exp $
+ * $Id: phase.h,v 1.8 1997/10/26 01:03:32 brian Exp $
*
* TODO:
*/
@@ -25,7 +25,6 @@
#define PHASE_AUTHENTICATE 2 /* Being authenticated */
#define PHASE_NETWORK 3
#define PHASE_TERMINATE 4 /* Terminating link */
-#define PHASE_OSLINKED 5 /* The OS is linked up */
extern int phase; /* Curent phase */
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index 2aa2709..bf705b3 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: route.c,v 1.40 1998/01/11 04:45:36 brian Exp $
+ * $Id: route.c,v 1.41 1998/01/19 02:59:33 brian Exp $
*
*/
@@ -27,7 +27,6 @@
#include <net/if_types.h>
#include <net/route.h>
#include <net/if.h>
-#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if_dl.h>
@@ -252,7 +251,7 @@ p_sockaddr(struct sockaddr *phost, struct sockaddr *pmask, int width)
fprintf(VarTerm, "%-*s ", width-1, buf);
}
-struct bits {
+static struct bits {
u_long b_mask;
char b_val;
} bits[] = {
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c
index 0ed96a7..a3d9fbe 100644
--- a/usr.sbin/ppp/server.c
+++ b/usr.sbin/ppp/server.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: server.c,v 1.14 1997/12/21 12:11:08 brian Exp $
+ * $Id: server.c,v 1.15 1997/12/24 09:29:14 brian Exp $
*/
#include <sys/param.h>
@@ -31,7 +31,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in_systm.h>
-#include <netinet/ip.h>
#include <errno.h>
#include <stdio.h>
diff --git a/usr.sbin/ppp/systems.c b/usr.sbin/ppp/systems.c
index c9a9925..0c975b7 100644
--- a/usr.sbin/ppp/systems.c
+++ b/usr.sbin/ppp/systems.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: systems.c,v 1.33 1997/12/21 03:41:23 brian Exp $
+ * $Id: systems.c,v 1.34 1997/12/24 09:29:17 brian Exp $
*
* TODO:
*/
@@ -39,11 +39,9 @@
#include "timer.h"
#include "fsm.h"
#include "loadalias.h"
-#include "ipcp.h"
#include "pathnames.h"
#include "vars.h"
#include "server.h"
-#include "chat.h"
#include "systems.h"
#define issep(ch) ((ch) == ' ' || (ch) == '\t')
diff --git a/usr.sbin/ppp/timer.c b/usr.sbin/ppp/timer.c
index ac7b089..fa53b39 100644
--- a/usr.sbin/ppp/timer.c
+++ b/usr.sbin/ppp/timer.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: timer.c,v 1.25 1997/12/28 21:55:04 brian Exp $
+ * $Id: timer.c,v 1.26 1997/12/29 22:23:52 brian Exp $
*
* TODO:
*/
@@ -27,17 +27,15 @@
#include <errno.h>
#endif
#include <sys/time.h>
-#include <stdio.h>
#include <unistd.h>
#include "command.h"
#include "mbuf.h"
#include "log.h"
-#include "defs.h"
#include "sig.h"
#include "timer.h"
-struct pppTimer *TimerList = NULL;
+static struct pppTimer *TimerList = NULL;
static void StopTimerNoBlock(struct pppTimer *);
static void InitTimerService(void);
@@ -143,7 +141,7 @@ StopTimerNoBlock(struct pppTimer * tp)
tp->state = TIMER_STOPPED;
}
-void
+static void
TimerService()
{
struct pppTimer *tp, *exp, *wt;
diff --git a/usr.sbin/ppp/timer.h b/usr.sbin/ppp/timer.h
index ca9bba2..e8df9b9 100644
--- a/usr.sbin/ppp/timer.h
+++ b/usr.sbin/ppp/timer.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: timer.h,v 1.3 1997/11/22 03:37:52 brian Exp $
+ * $Id: timer.h,v 1.4 1997/12/28 21:55:05 brian Exp $
*
* TODO:
*/
@@ -37,11 +37,8 @@ struct pppTimer {
#define TIMER_RUNNING 1
#define TIMER_EXPIRED 2
-extern struct pppTimer *TimerList;
-
extern void StartTimer(struct pppTimer *);
extern void StopTimer(struct pppTimer *);
-extern void TimerService(void);
extern void TermTimerService(void);
extern void ShowTimers(void);
diff --git a/usr.sbin/ppp/tun.c b/usr.sbin/ppp/tun.c
index 9959c37..5b94c8e 100644
--- a/usr.sbin/ppp/tun.c
+++ b/usr.sbin/ppp/tun.c
@@ -23,12 +23,11 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: tun.c,v 1.4 1997/12/21 12:11:09 brian Exp $
+ * $Id: tun.c,v 1.5 1998/01/11 17:53:27 brian Exp $
*/
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/select.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <net/if.h>
diff --git a/usr.sbin/ppp/vars.c b/usr.sbin/ppp/vars.c
index c0e3257..7cbd3b8 100644
--- a/usr.sbin/ppp/vars.c
+++ b/usr.sbin/ppp/vars.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vars.c,v 1.43 1998/01/10 01:55:11 brian Exp $
+ * $Id: vars.c,v 1.44 1998/01/20 22:47:48 brian Exp $
*
*/
#include <sys/param.h>
@@ -39,12 +39,9 @@
#include "auth.h"
char VarVersion[] = "PPP Version 1.65";
-char VarLocalVersion[] = "$Date: 1998/01/10 01:55:11 $";
+char VarLocalVersion[] = "$Date: 1998/01/20 22:47:48 $";
int Utmp = 0;
-int ipInOctets = 0;
-int ipOutOctets = 0;
int ipKeepAlive = 0;
-int ipConnectSecs = 0;
int reconnectState = RECON_UNKNOWN;
int reconnectCount = 0;
diff --git a/usr.sbin/ppp/vars.h b/usr.sbin/ppp/vars.h
index 43c1000..70a406a 100644
--- a/usr.sbin/ppp/vars.h
+++ b/usr.sbin/ppp/vars.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vars.h,v 1.40 1998/01/11 17:50:44 brian Exp $
+ * $Id: vars.h,v 1.41 1998/01/20 22:47:48 brian Exp $
*
* TODO:
*/
@@ -156,10 +156,7 @@ extern char VarVersion[];
extern char VarLocalVersion[];
extern int Utmp; /* Are we in /etc/utmp ? */
-extern int ipInOctets;
-extern int ipOutOctets;
extern int ipKeepAlive;
-extern int ipConnectSecs;
extern int reconnectState;
extern int reconnectCount;
diff --git a/usr.sbin/ppp/vjcomp.c b/usr.sbin/ppp/vjcomp.c
index 1445bbd..f9ef60d 100644
--- a/usr.sbin/ppp/vjcomp.c
+++ b/usr.sbin/ppp/vjcomp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: vjcomp.c,v 1.14 1997/12/03 10:23:54 brian Exp $
+ * $Id: vjcomp.c,v 1.15 1998/01/11 17:50:46 brian Exp $
*
* TODO:
*/
@@ -32,7 +32,6 @@
#include "command.h"
#include "mbuf.h"
#include "log.h"
-#include "defs.h"
#include "timer.h"
#include "fsm.h"
#include "lcpproto.h"
@@ -43,7 +42,7 @@
#define MAX_VJHEADER 16 /* Maximum size of compressed header */
-struct slcompress cslc;
+static struct slcompress cslc;
void
VjInit(int max_state)
@@ -103,7 +102,7 @@ VjUncompressTcp(struct mbuf * bp, u_char type)
len = sl_uncompress_tcp(&bufp, len, type, &cslc);
if (len <= 0) {
pfree(bp);
- bp = NULLBUFF;
+ bp = NULL;
}
return (bp);
}
@@ -121,7 +120,7 @@ VjUncompressTcp(struct mbuf * bp, u_char type)
len = sl_uncompress_tcp(&bufp, olen, type, &cslc);
if (len <= 0) {
pfree(bp);
- return NULLBUFF;
+ return NULL;
}
len -= olen;
len += rlen;
OpenPOWER on IntegriCloud