summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_pppoe.h
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-11-16 23:14:53 +0000
committerbrian <brian@FreeBSD.org>2000-11-16 23:14:53 +0000
commit5d83d171df44f3eeea633909f60d663b281955df (patch)
treebb54eddf2ccaaba216b60b60fc7e740eac92361a /sys/netgraph/ng_pppoe.h
parent282d572dc01fd60b8231fd60e70fbbc9e015d440 (diff)
downloadFreeBSD-src-5d83d171df44f3eeea633909f60d663b281955df.zip
FreeBSD-src-5d83d171df44f3eeea633909f60d663b281955df.tar.gz
Go back to using data_len in struct ngpppoe_init_data after discussions
with Julian and Archie. Implement a new ``sizedstring'' parse type for dealing with field pairs consisting of a uint16_t followed by a data field of that size, and use this to deal with the data_len and data fields. Written by: Archie with some input by me Agreed in principle by: julian
Diffstat (limited to 'sys/netgraph/ng_pppoe.h')
-rw-r--r--sys/netgraph/ng_pppoe.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/netgraph/ng_pppoe.h b/sys/netgraph/ng_pppoe.h
index c357ecd..94cb95b 100644
--- a/sys/netgraph/ng_pppoe.h
+++ b/sys/netgraph/ng_pppoe.h
@@ -49,7 +49,7 @@
/* Node type name. This should be unique among all netgraph node types */
#define NG_PPPOE_NODE_TYPE "pppoe"
-#define NGM_PPPOE_COOKIE 939032004
+#define NGM_PPPOE_COOKIE 939032003
/* Number of active sessions we can handle */
#define PPPOE_NUM_SESSIONS 16 /* for now */
@@ -114,15 +114,16 @@ struct ngpppoestat {
* and begin negotiation.
*/
struct ngpppoe_init_data {
- char hook[NG_HOOKLEN + 1]; /* hook to monitor on */
- char data[1]; /* init data goes here */
+ char hook[NG_HOOKLEN + 1]; /* hook to monitor on */
+ u_int16_t data_len; /* Length of the service name */
+ char data[0]; /* init data goes here */
};
/* Keep this in sync with the above structure definition */
#define NG_PPPOE_INIT_DATA_TYPE_INFO { \
{ \
{ "hook", &ng_parse_hookbuf_type }, \
- { "data", &ng_parse_string_type }, \
+ { "data", &ng_parse_sizedstring_type }, \
{ NULL } \
} \
}
OpenPOWER on IntegriCloud