summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/bundle.h
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2004-11-29 17:11:15 +0000
committerBrian Somers <brian@FreeBSD.org>2004-11-29 17:11:15 +0000
commit0508c09a41d7c9d8efecd4b42c0db72eec1d84d3 (patch)
tree3671250bedfb9a3ce78a425c8c972746dddfb609 /usr.sbin/ppp/bundle.h
parent669f5ef94f7581c5b9a9062e16a5a0b57f359f45 (diff)
downloadsrc-test2-0508c09a41d7c9d8efecd4b42c0db72eec1d84d3.tar.gz
src-test2-0508c09a41d7c9d8efecd4b42c0db72eec1d84d3.zip
Notes
Diffstat (limited to 'usr.sbin/ppp/bundle.h')
-rw-r--r--usr.sbin/ppp/bundle.h53
1 files changed, 29 insertions, 24 deletions
diff --git a/usr.sbin/ppp/bundle.h b/usr.sbin/ppp/bundle.h
index f34e9bf3d3d2..e2f9e7fb3400 100644
--- a/usr.sbin/ppp/bundle.h
+++ b/usr.sbin/ppp/bundle.h
@@ -33,27 +33,32 @@
#define PHASE_TERMINATE 4 /* Terminating link */
/* cfg.opt bit settings */
-#define OPT_FILTERDECAP 0x0001
-#define OPT_FORCE_SCRIPTS 0x0002 /* force chat scripts */
-#define OPT_IDCHECK 0x0004
-#define OPT_IFACEALIAS 0x0008
+#define OPT_FILTERDECAP 1
+#define OPT_FORCE_SCRIPTS 2 /* force chat scripts */
+#define OPT_IDCHECK 3
+#define OPT_IFACEALIAS 4
#ifndef NOINET6
-#define OPT_IPCP 0x0010
-#define OPT_IPV6CP 0x0020
+#define OPT_IPCP 5
+#define OPT_IPV6CP 6
#endif
-#define OPT_KEEPSESSION 0x0040
-#define OPT_LOOPBACK 0x0080
-#define OPT_PASSWDAUTH 0x0100
-#define OPT_PROXY 0x0200
-#define OPT_PROXYALL 0x0400
-#define OPT_SROUTES 0x0800
-#define OPT_TCPMSSFIXUP 0x1000
-#define OPT_THROUGHPUT 0x2000
-#define OPT_UTMP 0x4000
+#define OPT_KEEPSESSION 7
+#define OPT_LOOPBACK 8
+#define OPT_NAS_IP_ADDRESS 9
+#define OPT_NAS_IDENTIFIER 10
+#define OPT_PASSWDAUTH 11
+#define OPT_PROXY 12
+#define OPT_PROXYALL 13
+#define OPT_SROUTES 14
+#define OPT_TCPMSSFIXUP 15
+#define OPT_THROUGHPUT 16
+#define OPT_UTMP 17
+#define OPT_MAX 17
#define MAX_ENDDISC_CLASS 5
-#define Enabled(b, o) ((b)->cfg.opt & (o))
+#define Enabled(b, o) ((b)->cfg.optmask & (1ull << (o)))
+#define opt_enable(b, o) ((b)->cfg.optmask |= (1ull << (o)))
+#define opt_disable(b, o) ((b)->cfg.optmask &= ~(1ull << (o)))
/* AutoAdjust() values */
#define AUTO_UP 1
@@ -98,19 +103,19 @@ struct bundle {
struct {
struct {
- unsigned timeout; /* NCP Idle timeout value */
- unsigned min_timeout; /* Don't idle out before this */
+ unsigned timeout; /* NCP Idle timeout value */
+ unsigned min_timeout; /* Don't idle out before this */
} idle;
struct {
- char name[AUTHLEN]; /* PAP/CHAP system name */
- char key[AUTHLEN]; /* PAP/CHAP key */
+ char name[AUTHLEN]; /* PAP/CHAP system name */
+ char key[AUTHLEN]; /* PAP/CHAP key */
} auth;
- unsigned opt; /* Uses OPT_ bits from above */
- char label[50]; /* last thing `load'ed */
- u_short ifqueue; /* Interface queue size */
+ unsigned long long optmask; /* Uses OPT_ bits from above */
+ char label[50]; /* last thing `load'ed */
+ u_short ifqueue; /* Interface queue size */
struct {
- unsigned timeout; /* How long to leave the output queue choked */
+ unsigned timeout; /* How long to leave the output queue choked */
} choked;
} cfg;