summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-01-10 21:28:04 +0000
committerphk <phk@FreeBSD.org>1996-01-10 21:28:04 +0000
commit525e36ce3e9516d50c97f25c011550e6cfec1edc (patch)
treeefa94c4341ade4773e54c6aeb6ee691faaf4f071 /usr.sbin/ppp
parentb0a5a520276679c2b26968f7d92736114c95cc30 (diff)
downloadFreeBSD-src-525e36ce3e9516d50c97f25c011550e6cfec1edc.zip
FreeBSD-src-525e36ce3e9516d50c97f25c011550e6cfec1edc.tar.gz
A random bunch of cleanup changes.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/arp.c7
-rw-r--r--usr.sbin/ppp/ccp.c7
-rw-r--r--usr.sbin/ppp/chap.c6
-rw-r--r--usr.sbin/ppp/command.c6
-rw-r--r--usr.sbin/ppp/filter.c6
-rw-r--r--usr.sbin/ppp/hdlc.c3
-rw-r--r--usr.sbin/ppp/ip.c3
-rw-r--r--usr.sbin/ppp/main.c6
-rw-r--r--usr.sbin/ppp/modem.c8
-rw-r--r--usr.sbin/ppp/os.h4
-rw-r--r--usr.sbin/ppp/pred.c3
-rw-r--r--usr.sbin/ppp/timer.c9
-rw-r--r--usr.sbin/ppp/uucplock.c8
-rw-r--r--usr.sbin/ppp/vars.c7
14 files changed, 47 insertions, 36 deletions
diff --git a/usr.sbin/ppp/arp.c b/usr.sbin/ppp/arp.c
index 4969f2d..8ff7d8b 100644
--- a/usr.sbin/ppp/arp.c
+++ b/usr.sbin/ppp/arp.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: arp.c,v 1.1 1995/02/26 12:17:09 amurai Exp $
+ * $Id: arp.c,v 1.2 1995/05/30 03:50:23 rgrimes Exp $
*
*/
@@ -27,9 +27,12 @@
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <sys/uio.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/errno.h>
+#include <unistd.h>
+#include <string.h>
#include <net/if.h>
#include <net/route.h>
@@ -83,7 +86,6 @@ sifproxyarp(unit, hisaddr)
u_long hisaddr;
{
int routes;
- int l;
/*
* Get the hardware address of an interface on the same subnet
@@ -237,7 +239,6 @@ get_ether_addr(s, ipaddr, hwaddr)
struct ifreq ifreq;
struct ifconf ifc;
struct ifreq ifs[MAX_IFS];
- struct ifreq ifx;
ifc.ifc_len = sizeof(ifs);
ifc.ifc_req = ifs;
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index eb7287b..4574247 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.2 1995/02/26 12:17:14 amurai Exp $
+ * $Id: ccp.c,v 1.3 1995/05/30 03:50:27 rgrimes Exp $
*
* TODO:
* o Support other compression protocols
@@ -86,7 +86,7 @@ ReportCcpStatus()
printf("%s [%s]\n", fp->name, StateNames[fp->state]);
printf("myproto = %s, hisproto = %s\n",
cftypes[icp->want_proto], cftypes[icp->his_proto]);
- printf("Input: %d --> %d, Output: %d --> %d\n",
+ printf("Input: %ld --> %ld, Output: %ld --> %ld\n",
icp->orgin, icp->compin, icp->orgout, icp->compout);
}
@@ -214,9 +214,6 @@ int plen;
int mode;
{
int type, length;
- u_long *lp, compproto;
- struct compreq *pcomp;
- struct in_addr ipaddr, dstipaddr;
char tbuff[100];
ackp = AckBuff;
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
index adc43af..42d9846 100644
--- a/usr.sbin/ppp/chap.c
+++ b/usr.sbin/ppp/chap.c
@@ -17,10 +17,12 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: chap.c,v 1.2 1995/02/26 12:17:17 amurai Exp $
+ * $Id: chap.c,v 1.3 1995/05/30 03:50:28 rgrimes Exp $
*
* TODO:
*/
+#include <sys/types.h>
+#include <time.h>
#include "fsm.h"
#include "chap.h"
#include "lcpproto.h"
@@ -73,7 +75,7 @@ void
SendChapChallenge(chapid)
int chapid;
{
- int keylen, len, i;
+ int len, i;
char *cp;
srandom(time(NULL));
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c
index 4a21bb6..8fbf826 100644
--- a/usr.sbin/ppp/command.c
+++ b/usr.sbin/ppp/command.c
@@ -17,11 +17,14 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: command.c,v 1.9 1995/09/02 17:20:50 amurai Exp $
+ * $Id: command.c,v 1.10 1995/10/08 14:57:27 amurai Exp $
*
*/
+#include <sys/types.h>
#include <ctype.h>
#include <termios.h>
+#include <wait.h>
+#include <time.h>
#include "fsm.h"
#include "phase.h"
#include "lcp.h"
@@ -756,7 +759,6 @@ struct cmdtab *list;
int argc;
char **argv;
{
- int width;
DefMyAddress.ipaddr.s_addr = DefHisAddress.ipaddr.s_addr = 0L;
if (argc > 0) {
diff --git a/usr.sbin/ppp/filter.c b/usr.sbin/ppp/filter.c
index b459ff6..8c2ff001 100644
--- a/usr.sbin/ppp/filter.c
+++ b/usr.sbin/ppp/filter.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: filter.c,v 1.4 1995/05/30 03:50:31 rgrimes Exp $
+ * $Id: filter.c,v 1.5 1995/09/17 16:14:45 amurai Exp $
*
* TODO: Shoud send ICMP error message when we discard packets.
*/
@@ -200,8 +200,6 @@ int argc;
char **argv;
int proto;
{
- int port;
- char *cp;
if (argc == 0) {
/* permit/deny all tcp traffic */
@@ -249,7 +247,7 @@ int proto;
return(0);
}
if (argc > 0)
- printf("bad %s src/dst port syntax: %s\n", *argv);
+ printf("bad src/dst port syntax: %s\n", *argv);
return(0);
}
diff --git a/usr.sbin/ppp/hdlc.c b/usr.sbin/ppp/hdlc.c
index d1e59dd..74fc55c 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.4 1995/07/08 17:46:49 amurai Exp $
+ * $Id: hdlc.c,v 1.5 1995/07/30 15:18:29 gpalmer Exp $
*
* TODO:
*/
@@ -196,6 +196,7 @@ HdlcOutput(int pri, u_short proto, struct mbuf *bp)
AsyncOutput(pri, mhp, proto);
}
+void
DecodePacket(proto, bp)
u_short proto;
struct mbuf *bp;
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index 16cdf1f..1fbba1a 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.4 1995/05/30 03:50:37 rgrimes Exp $
+ * $Id: ip.c,v 1.5 1995/09/17 16:14:46 amurai Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@@ -200,7 +200,6 @@ direction, cproto, fp->opt.srcop, fp->opt.dstop, estab);
}
fp++;
}
-drop:
return(A_DENY); /* No rule is mached. Deny this packet */
}
return(A_PERMIT); /* No rule is given. Permit this packet */
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 42ef92e..f771766 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.10 1995/09/18 12:41:52 bde Exp $
+ * $Id: main.c,v 1.11 1995/10/08 14:57:29 amurai Exp $
*
* TODO:
* o Add commands for traffic summary, version display, etc.
@@ -65,7 +65,7 @@ static void TerminalStop();
static struct termios oldtio; /* Original tty mode */
static struct termios comtio; /* Command level tty mode */
static int TermMode;
-static int server, update;
+static int server;
struct sockaddr_in ifsin;
char pid_filename[128];
@@ -145,7 +145,6 @@ void
Cleanup(excode)
int excode;
{
- int stat;
OsLinkdown();
OsCloseLink(1);
@@ -251,7 +250,6 @@ int argc;
char **argv;
{
int tunno;
- int on = 1;
argc--; argv++;
diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c
index 8c90251..1adca25 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.7 1995/06/30 19:53:04 dfr Exp $
+ * $Id: modem.c,v 1.9 1995/09/02 17:20:53 amurai Exp $
*
* TODO:
*/
@@ -27,6 +27,7 @@
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <errno.h>
+#include <time.h>
#include "hdlc.h"
#include "lcp.h"
#include "modem.h"
@@ -39,6 +40,7 @@
#endif
extern int DoChat();
+extern void CloseModem();
static int mbits; /* Current DCD status */
static int connect_time; /* connection time */
@@ -80,7 +82,8 @@ struct mqueue *queue;
#ifdef QDEBUG
logprintf("Dequeue: len = %d\n", queue->qlen);
#endif
- if (bp = queue->top) {
+ bp = queue->top;
+ if (bp) {
queue->top = queue->top->pnext;
queue->qlen--;
if (queue->top == NULL) {
@@ -600,6 +603,7 @@ int flag;
}
}
+void
CloseModem()
{
if (modem >= 3)
diff --git a/usr.sbin/ppp/os.h b/usr.sbin/ppp/os.h
index 507f8a3..c518c5e 100644
--- a/usr.sbin/ppp/os.h
+++ b/usr.sbin/ppp/os.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: os.h,v 1.1.1.1 1995/01/31 06:29:56 amurai Exp $
+ * $Id: os.h,v 1.2 1995/02/26 12:17:49 amurai Exp $
*
* TODO:
*/
@@ -32,4 +32,6 @@ void OsCloseLink __P((int flag));
void OsLinkup __P((void)), OsLinkdown __P((void));
void OsSetRoute __P((int, struct in_addr, struct in_addr, struct in_addr));
void DeleteIfRoutes __P((int));
+void OsAddInOctets __P((int cnt));
+void OsAddOutOctets __P((int cnt));
#endif
diff --git a/usr.sbin/ppp/pred.c b/usr.sbin/ppp/pred.c
index d0bffb5..6cac683 100644
--- a/usr.sbin/ppp/pred.c
+++ b/usr.sbin/ppp/pred.c
@@ -5,7 +5,7 @@
/*
*
- * $Id: pred.c,v 1.2 1995/02/26 12:17:55 amurai Exp $
+ * $Id: pred.c,v 1.3 1995/05/30 03:50:55 rgrimes Exp $
*
* pred.c -- Test program for Dave Rand's rendition of the
* predictor algorithm
@@ -57,7 +57,6 @@ SyncTable(source, dest, len)
unsigned char *source, *dest;
int len;
{
- int i;
while (len--) {
if (InputGuessTable[iHash] != *source) {
diff --git a/usr.sbin/ppp/timer.c b/usr.sbin/ppp/timer.c
index d76ab14..10e1d2c 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.3 1995/03/11 15:18:51 amurai Exp $
+ * $Id: timer.c,v 1.4 1995/05/30 03:50:59 rgrimes Exp $
*
* TODO:
*/
@@ -146,7 +146,8 @@ TimerService()
#ifdef DEBUG
ShowTimers();
#endif
- if (tp = TimerList) {
+ tp = TimerList;
+ if (tp) {
tp->rest--;
if (tp->rest == 0) {
/*
@@ -204,7 +205,8 @@ ShowTimers()
}
#ifdef SIGALRM
-u_int sleep( u_int sec )
+u_int
+sleep( u_int sec )
{
struct timeval to,st,et;
long sld, nwd, std;
@@ -231,6 +233,7 @@ u_int sleep( u_int sec )
to.tv_usec = sld % 1000000;
}
}
+ return (0L);
}
void usleep( u_int usec)
diff --git a/usr.sbin/ppp/uucplock.c b/usr.sbin/ppp/uucplock.c
index 2a9e384..f6a029f 100644
--- a/usr.sbin/ppp/uucplock.c
+++ b/usr.sbin/ppp/uucplock.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uucplock.c,v 1.4 1995/03/11 15:18:53 amurai Exp $
+ * $Id: uucplock.c,v 1.5 1995/05/30 03:51:00 rgrimes Exp $
*
*/
@@ -39,9 +39,14 @@ static char sccsid[] = "@(#)uucplock.c 5.5 (Berkeley) 6/1/90";
#endif /* not lint */
#include <sys/types.h>
+#include <sys/uio.h>
#include <sys/file.h>
#include <sys/dir.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <stdlib.h>
#include <errno.h>
+#include <signal.h>
#include "pathnames.h"
/*
@@ -50,6 +55,7 @@ static char sccsid[] = "@(#)uucplock.c 5.5 (Berkeley) 6/1/90";
* -1 - failure
*/
+int
uu_lock(ttyname)
char *ttyname;
{
diff --git a/usr.sbin/ppp/vars.c b/usr.sbin/ppp/vars.c
index 4ebe682..7f5a651 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.5 1995/09/02 17:20:54 amurai Exp $
+ * $Id: vars.c,v 1.6 1995/10/08 14:57:31 amurai Exp $
*
*/
#include "fsm.h"
@@ -29,7 +29,7 @@
#include "defs.h"
char VarVersion[] = "Version 0.94";
-char VarLocalVersion[] = "$Date: 1995/09/02 17:20:54 $";
+char VarLocalVersion[] = "$Date: 1995/10/08 14:57:31 $";
/*
* Order of conf option is important. See vars.h.
@@ -180,9 +180,8 @@ struct cmdtab *list;
int argc;
char **argv;
{
- char *p;
if (argc < 1) {
- printf("Please Enter passwd for manupilating.\n");
+ printf("Please Enter passwd for manipulating.\n");
return(1);
}
OpenPOWER on IntegriCloud