X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fpppd.h;h=d4bc043500a1781966d1fe35fb0e580ca52f7fd1;hb=76016e1b948b7d9675b4e0750d1f943d96d9523b;hp=c5f9b6d5e4c41c19937a79648d1ba2bb94faa8ac;hpb=d2330632fd4bdab5cf89bfdcce45eefd6fe34b97;p=ppp.git diff --git a/pppd/pppd.h b/pppd/pppd.h index c5f9b6d..d4bc043 100644 --- a/pppd/pppd.h +++ b/pppd/pppd.h @@ -42,14 +42,10 @@ * $Id: pppd.h,v 1.96 2008/06/23 11:47:18 paulus Exp $ */ -#include "pppdconf.h" - -/* - * TODO: - */ +#ifndef PPP_PPPD_H +#define PPP_PPPD_H -#ifndef __PPPD_H__ -#define __PPPD_H__ +#include "pppdconf.h" #include /* for FILE */ #include /* for encrypt */ @@ -57,10 +53,43 @@ #include #include #include /* for u_int32_t, if defined */ +#if defined(SOL2) #include +#else +#include +#endif #ifdef PPP_WITH_IPV6CP -#include "eui64.h" +#if defined(SOL2) +#include + +typedef union { + uint8_t e8[8]; /* lower 64-bit IPv6 address */ + uint32_t e32[2]; /* lower 64-bit IPv6 address */ +} eui64_t; + +/* + * Declare the two below, since in.h only defines them when _KERNEL + * is declared - which shouldn't be true when dealing with user-land programs + */ +#define s6_addr8 _S6_un._S6_u8 +#define s6_addr32 _S6_un._S6_u32 + +#else /* else if not defined(SOL2) */ + +/* + * TODO: + * + * Maybe this should be done by processing struct in6_addr directly... + */ +typedef union +{ + u_int8_t e8[8]; + u_int16_t e16[4]; + u_int32_t e32[2]; +} eui64_t; + +#endif /* defined(SOL2) */ #endif /* @@ -329,6 +358,7 @@ extern bool multilink; /* enable multilink operation */ extern bool noendpoint; /* don't send or accept endpt. discrim. */ extern char *bundle_name; /* bundle name for multilink */ extern bool dump_options; /* print out option values */ +extern bool show_options; /* show all option names and descriptions */ extern bool dryrun; /* check everything, print options, exit */ extern int child_wait; /* # seconds to wait for children at end */ @@ -357,7 +387,6 @@ extern char *tls_verify_method; extern char *pkcs12_file; #endif /* PPP_WITH_EAPTLS */ -#ifdef PPP_WITH_MAXOCTETS extern unsigned int maxoctets; /* Maximum octetes per session (in bytes) */ extern int maxoctets_dir; /* Direction : 0 - in+out (default) @@ -371,7 +400,6 @@ extern int maxoctets_timeout; /* Timeout for check of octets limit */ #define PPP_OCTETS_DIRECTION_MAXOVERAL 3 /* same as previos, but little different on RADIUS side */ #define PPP_OCTETS_DIRECTION_MAXSESSION 4 -#endif #ifdef PPP_WITH_FILTER extern struct bpf_program pass_filter; /* Filter for pkts to pass */ @@ -749,7 +777,8 @@ int override_value(char *, int, const char *); /* override value if permitted by priority */ void print_options(printer_func, void *); /* print out values of all options */ - +void showopts(void); + /* show all option names and description */ int parse_dotted_ip(char *, u_int32_t *); /* @@ -866,9 +895,7 @@ extern void (*snoop_send_hook)(unsigned char *p, int len); #define EXIT_LOOPBACK 17 #define EXIT_INIT_FAILED 18 #define EXIT_AUTH_TOPEER_FAILED 19 -#ifdef PPP_WITH_MAXOCTETS #define EXIT_TRAFFIC_LIMIT 20 -#endif #define EXIT_CNID_AUTH_FAILED 21 /* @@ -962,4 +989,4 @@ extern void (*snoop_send_hook)(unsigned char *p, int len); #define offsetof(type, member) ((size_t) &((type *)0)->member) #endif -#endif /* __PPP_H__ */ +#endif /* PPP_PPPD_H */