2 * Copyright 2003-2004, Waldemar Kornewald <wkornew@gmx.net>
3 * Distributed under the terms of the MIT License.
9 #include <SupportDefs.h>
11 #include <netinet/if_ether.h>
16 #define PPPoE_QUERY_REPORT_SIZE 2048
17 #define PPPoE_QUERY_REPORT 'PoEQ'
18 // the code value used for query reports
20 #define PPPoE_HEADER_SIZE 6
21 // without ethernet header
22 #define PPPoE_TIMEOUT 3000000
24 #define PPPoE_MAX_ATTEMPTS 2
25 // maximum number of PPPoE's connect-retries
27 #define PPPoE_VERSION 0x1
28 #define PPPoE_TYPE 0x1
30 #define PPPoE_INTERFACE_KEY "Interface"
31 #define PPPoE_AC_NAME_KEY "ACName"
32 #define PPPoE_SERVICE_NAME_KEY "ServiceName"
39 typedef struct pppoe_query_request
{
40 const char *interfaceName
;
42 } pppoe_query_request
;
44 extern struct core_module_info
*core
;
47 typedef struct pppoe_header
{
54 } _PACKED pppoe_header
;
56 typedef struct complete_pppoe_header
{
57 struct ether_header ethernetHeader
;
58 pppoe_header pppoeHeader
;
59 } complete_pppoe_header
;
62 // defined in pppoe.cpp
63 extern ifnet
*FindPPPoEInterface(const char *name
);
64 extern uint32
NewHostUniq();
65 extern void add_device(PPPoEDevice
*device
);
66 extern void remove_device(PPPoEDevice
*device
);
69 // defined in PPPoEDevice.cpp
70 extern void dump_packet(struct mbuf
*packet
);