X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fpppd.h;h=e38687d7ac175e492f40d5bd25e928789c7e2d36;hp=c5ea8b61a1c9da9f69d10e80879b37143c3ad13a;hb=f9e81f0e97fc9a4258ee0fada70a008adf781a26;hpb=0b63a24d54ba4708c88e31bdd74b0145956c1478 diff --git a/pppd/pppd.h b/pppd/pppd.h index c5ea8b6..e38687d 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -16,7 +16,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: pppd.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ + * $Id: pppd.h,v 1.3 1994/05/26 06:43:42 paulus Exp $ */ /* @@ -39,6 +39,9 @@ #define MAXNAMELEN 256 /* max length of hostname or name for auth */ #define MAXSECRETLEN 256 /* max length of password or secret */ +/* + * Global variables. + */ extern int debug; /* Debug flag */ extern int ifunit; /* Interface unit number */ extern char ifname[]; /* Interface name */ @@ -46,7 +49,20 @@ extern int fd; /* Device file descriptor */ extern int s; /* socket descriptor */ extern char hostname[]; /* hostname */ extern u_char outpacket_buf[]; /* buffer for outgoing packets */ +extern int phase; /* See values below */ +/* + * Values for phase. + */ +#define PHASE_DEAD 0 +#define PHASE_ESTABLISH 1 +#define PHASE_AUTHENTICATE 2 +#define PHASE_NETWORK 3 +#define PHASE_TERMINATE 4 + +/* + * Prototypes. + */ void quit __ARGS((void)); /* Cleanup and exit */ void timeout __ARGS((void (*)(), caddr_t, int)); /* Look-alike of kernel's timeout() */ @@ -73,7 +89,7 @@ u_long GetMask __ARGS((u_long)); /* get netmask for address */ (c) = *(cp)++; \ } #define PUTCHAR(c, cp) { \ - *(cp)++ = (c); \ + *(cp)++ = (u_char) (c); \ } @@ -82,8 +98,8 @@ u_long GetMask __ARGS((u_long)); /* get netmask for address */ (s) |= *(cp)++; \ } #define PUTSHORT(s, cp) { \ - *(cp)++ = (s) >> 8; \ - *(cp)++ = (s); \ + *(cp)++ = (u_char) ((s) >> 8); \ + *(cp)++ = (u_char) (s); \ } #define GETLONG(l, cp) { \ @@ -93,10 +109,10 @@ u_long GetMask __ARGS((u_long)); /* get netmask for address */ (l) |= *(cp)++; \ } #define PUTLONG(l, cp) { \ - *(cp)++ = (l) >> 24; \ - *(cp)++ = (l) >> 16; \ - *(cp)++ = (l) >> 8; \ - *(cp)++ = (l); \ + *(cp)++ = (u_char) ((l) >> 24); \ + *(cp)++ = (u_char) ((l) >> 16); \ + *(cp)++ = (u_char) ((l) >> 8); \ + *(cp)++ = (u_char) (l); \ } #define INCPTR(n, cp) ((cp) += (n))