X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-NeXT.c;h=8df34e55b9f51be0ae96aeb7e69a36f63ecbf4bb;hp=7db81d4a43038954cccde98426018319232680b6;hb=bcfa20820fc9ff3b25bcf62308e3e737c1897dc6;hpb=ab7cff041f1b8054ae5691df236fe18c1d23bfe6 diff --git a/pppd/sys-NeXT.c b/pppd/sys-NeXT.c index 7db81d4..8df34e5 100644 --- a/pppd/sys-NeXT.c +++ b/pppd/sys-NeXT.c @@ -19,9 +19,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#ifndef lint -static char rcsid[] = "$Id: sys-NeXT.c,v 1.16 1999/03/19 04:23:46 paulus Exp $"; -#endif +#define RCSID "$Id: sys-NeXT.c,v 1.20 1999/08/13 06:46:17 paulus Exp $" #include #include @@ -58,6 +56,8 @@ static char rcsid[] = "$Id: sys-NeXT.c,v 1.16 1999/03/19 04:23:46 paulus Exp $"; #include "pppd.h" +static const char rcsid[] = RCSID; + static int initdisc = -1; /* Initial TTY discipline */ static int initfdflags = -1; /* Initial file descriptor flags for fd */ static int ppp_fd = -1; /* fd which is set to PPP discipline */ @@ -73,8 +73,6 @@ extern int errno; static int restore_term; /* 1 => we've munged the terminal */ static struct termios inittermios; /* Initial TTY termios */ -static char *lock_file; - static int sockfd; /* socket for doing interface ioctls */ static int pppdev; /* +++ */ @@ -1178,7 +1176,7 @@ int have_route_to(u_int32_t addr) return -1; } - +#if 0 /* * daemon - Detach us from the terminal session. */ @@ -1202,7 +1200,7 @@ daemon(nochdir, noclose) } return 0; } - +#endif char * strdup(s) @@ -1246,9 +1244,9 @@ logwtmp(line, name, host) if ((fd = open(WTMPFILE, O_WRONLY|O_APPEND, 0)) < 0) return; if (!fstat(fd, &buf)) { - strlcpy(ut.ut_line, line, sizeof(ut.ut_line)); - strlcpy(ut.ut_name, name, sizeof(ut.ut_name)); - strlcpy(ut.ut_host, host, sizeof(ut.ut_host)); + strncpy(ut.ut_line, line, sizeof(ut.ut_line)); + strncpy(ut.ut_name, name, sizeof(ut.ut_name)); + strncpy(ut.ut_host, host, sizeof(ut.ut_host)); (void)time(&ut.ut_time); if (write(fd, (char *)&ut, sizeof(struct utmp)) != sizeof(struct utmp)) (void)ftruncate(fd, buf.st_size); @@ -1256,6 +1254,7 @@ logwtmp(line, name, host) close(fd); } +#if 0 /* * Routines for locking and unlocking the serial device, moved here * from chat.c. @@ -1263,6 +1262,8 @@ logwtmp(line, name, host) #define LOCK_PREFIX "/usr/spool/uucp/LCK/LCK.." +static char *lock_file; + /* * lock - create a lock file for the named device */ @@ -1331,6 +1332,7 @@ unlock() lock_file = NULL; } } +#endif #if defined(i386) && defined(HAS_BROKEN_IOCTL) int @@ -1455,7 +1457,7 @@ get_idle_time(u, ip) int get_ppp_stats(u, stats) int u; - struct ppp_stats *stats; + struct pppd_stats *stats; { struct ifpppstatsreq req; @@ -1465,7 +1467,8 @@ get_ppp_stats(u, stats) error("Couldn't get PPP statistics: %m"); return 0; } - *stats = req.stats; + stats->bytes_in = req.stats.p.ppp_ibytes; + stats->bytes_out = req.stats.p.ppp_obytes; return 1; }