* $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 <stdio.h> /* for FILE */
#include <stdlib.h> /* for encrypt */
#include <stdarg.h>
#include <stdint.h>
#include <sys/types.h> /* for u_int32_t, if defined */
+#if defined(SOL2)
#include <net/ppp_defs.h>
+#else
+#include <linux/ppp_defs.h>
+#endif
#ifdef PPP_WITH_IPV6CP
-#include "eui64.h"
+#if defined(SOL2)
+#include <netinet/in.h>
+
+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
/*
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 */
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)
#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 */
/* 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 *);
/*
#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
/*
#define offsetof(type, member) ((size_t) &((type *)0)->member)
#endif
-#endif /* __PPP_H__ */
+#endif /* PPP_PPPD_H */