44#ifndef _NETGRAPH_NG_PPPOE_H_
45#define _NETGRAPH_NG_PPPOE_H_
51#define NG_PPPOE_NODE_TYPE "pppoe"
53#define NGM_PPPOE_COOKIE 1089893072
54#define NGM_PPPOE_SETMAXP_COOKIE 1441624322
55#define NGM_PPPOE_PADM_COOKIE 1488405822
57#define PPPOE_SERVICE_NAME_SIZE 64
58#define PPPOE_PADM_VALUE_SIZE 128
61#define NG_PPPOE_HOOK_ETHERNET "ethernet"
62#define NG_PPPOE_HOOK_DEBUG "debug"
65#define NG_PPPOE_STANDARD "standard"
66#define NG_PPPOE_3COM "3Com"
67#define NG_PPPOE_NONSTANDARD NG_PPPOE_3COM
68#define NG_PPPOE_DLINK "D-Link"
106#define NG_PPPOESTAT_TYPE_INFO { \
107 { "packets_in", &ng_parse_uint_type }, \
108 { "packets_out", &ng_parse_uint_type }, \
137#define NG_PPPOE_INIT_DATA_TYPE_INFO { \
138 { "hook", &ng_parse_hookbuf_type }, \
139 { "data", &ng_parse_sizedstring_type }, \
153#define NG_PPPOE_STS_TYPE_INFO { \
154 { "hook", &ng_parse_hookbuf_type }, \
177#define PPPOE_TIMEOUT_LIMIT 64
178#define PPPOE_OFFER_TIMEOUT 16
179#define PPPOE_INITIAL_TIMEOUT 2
182#define PADI_CODE 0x09
183#define PADO_CODE 0x07
184#define PADR_CODE 0x19
185#define PADS_CODE 0x65
186#define PADT_CODE 0xa7
187#define PADM_CODE 0xd3
190#if BYTE_ORDER == BIG_ENDIAN
191#define PTT_EOL (0x0000)
192#define PTT_SRV_NAME (0x0101)
193#define PTT_AC_NAME (0x0102)
194#define PTT_HOST_UNIQ (0x0103)
195#define PTT_AC_COOKIE (0x0104)
196#define PTT_VENDOR (0x0105)
197#define PTT_RELAY_SID (0x0110)
198#define PTT_HURL (0x0111)
199#define PTT_MOTM (0x0112)
200#define PTT_MAX_PAYL (0x0120)
201#define PTT_SRV_ERR (0x0201)
202#define PTT_SYS_ERR (0x0202)
203#define PTT_GEN_ERR (0x0203)
205#define ETHERTYPE_PPPOE_DISC 0x8863
206#define ETHERTYPE_PPPOE_SESS 0x8864
207#define ETHERTYPE_PPPOE_3COM_DISC 0x3c12
208#define ETHERTYPE_PPPOE_3COM_SESS 0x3c13
210#define PTT_EOL (0x0000)
211#define PTT_SRV_NAME (0x0101)
212#define PTT_AC_NAME (0x0201)
213#define PTT_HOST_UNIQ (0x0301)
214#define PTT_AC_COOKIE (0x0401)
215#define PTT_VENDOR (0x0501)
216#define PTT_RELAY_SID (0x1001)
217#define PTT_HURL (0x1101)
218#define PTT_MOTM (0x1201)
219#define PTT_MAX_PAYL (0x2001)
220#define PTT_SRV_ERR (0x0102)
221#define PTT_SYS_ERR (0x0202)
222#define PTT_GEN_ERR (0x0302)
224#define ETHERTYPE_PPPOE_DISC 0x6388
225#define ETHERTYPE_PPPOE_SESS 0x6488
226#define ETHERTYPE_PPPOE_3COM_DISC 0x123c
227#define ETHERTYPE_PPPOE_3COM_SESS 0x133c
244 struct ether_header
eh;
struct pppoe_tag __packed
#define PPPOE_SERVICE_NAME_SIZE
#define PPPOE_PADM_VALUE_SIZE
u_int8_t data[PPPOE_SERVICE_NAME_SIZE]
char msg[PPPOE_PADM_VALUE_SIZE]
struct pppoe_full_hdr pkt_header