summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_l2tp.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2004-08-03 06:45:38 +0000
committerbz <bz@FreeBSD.org>2004-08-03 06:45:38 +0000
commit3fbdc1b5aae3aa923dacb0fe39d145634773d164 (patch)
tree76b973445c982d543b8fc1e5e160439272adb623 /sys/netgraph/ng_l2tp.h
parentf953a8bf192d15b2e06c34f625e961a8c5ab5a3f (diff)
downloadFreeBSD-src-3fbdc1b5aae3aa923dacb0fe39d145634773d164.zip
FreeBSD-src-3fbdc1b5aae3aa923dacb0fe39d145634773d164.tar.gz
add a new control message to set sequence numbers on an uninitialized node.
Reviewed by: archie Approved by: pjd (mentor)
Diffstat (limited to 'sys/netgraph/ng_l2tp.h')
-rw-r--r--sys/netgraph/ng_l2tp.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/netgraph/ng_l2tp.h b/sys/netgraph/ng_l2tp.h
index 4fe1d50..9ceb343 100644
--- a/sys/netgraph/ng_l2tp.h
+++ b/sys/netgraph/ng_l2tp.h
@@ -45,7 +45,7 @@
/* Node type name and magic cookie */
#define NG_L2TP_NODE_TYPE "l2tp"
-#define NGM_L2TP_COOKIE 1011392401
+#define NGM_L2TP_COOKIE 1091448040
/* Hook names */
#define NG_L2TP_HOOK_CTRL "ctrl" /* control channel hook */
@@ -55,6 +55,21 @@
#define NG_L2TP_HOOK_SESSION_P "session_" /* session data hook (prefix) */
#define NG_L2TP_HOOK_SESSION_F "session_%04x" /* session data hook (format) */
+/* Set intial sequence numbers to not yet enabled node. */
+struct ng_l2tp_seq_config {
+ u_int16_t ns; /* sequence number to send next */
+ u_int16_t nr; /* sequence number to be recved next */
+ u_int16_t rack; /* last 'nr' received */
+ u_int16_t xack; /* last 'nr' sent */
+};
+
+/* Keep this in sync with the above structure definition. */
+#define NG_L2TP_SEQ_CONFIG_TYPE_INFO { \
+ { "ns", &ng_parse_uint16_type }, \
+ { "nr", &ng_parse_uint16_type }, \
+ { NULL } \
+}
+
/* Configuration for a node */
struct ng_l2tp_config {
u_char enabled; /* enables traffic flow */
@@ -156,6 +171,7 @@ enum {
NGM_L2TP_CLR_STATS, /* clears stats */
NGM_L2TP_GETCLR_STATS, /* returns & clears stats */
NGM_L2TP_ACK_FAILURE, /* sent *from* node after ack timeout */
+ NGM_L2TP_SET_SEQ /* supply a struct ng_l2tp_seq_config */
};
#endif /* _NETGRAPH_NG_L2TP_H_ */
OpenPOWER on IntegriCloud