Remove unused #includes.

Make various bits static.
Remove unused variables.
Submitted by: eivind
This commit is contained in:
Brian Somers 1998-01-21 02:15:33 +00:00
parent 764d8cef56
commit aa8e05197c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=32663
35 changed files with 69 additions and 138 deletions

View File

@ -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>

View File

@ -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

View File

@ -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()

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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 */

View File

@ -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) {
/*

View File

@ -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 *);

View File

@ -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

View File

@ -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"

View File

@ -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)

View File

@ -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 */

View File

@ -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>

View File

@ -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;

View File

@ -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

View File

@ -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"

View File

@ -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];

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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>

View File

@ -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()

View File

@ -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 */

View File

@ -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[] = {

View File

@ -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>

View File

@ -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')

View File

@ -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;

View File

@ -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);

View File

@ -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>

View File

@ -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;

View File

@ -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;

View File

@ -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;