2 * Copyright 2003-2004, Waldemar Kornewald <wkornew@gmx.net>
3 * Distributed under the terms of the MIT License.
9 #include <SupportDefs.h>
13 #include <ether_driver.h>
14 #include <net_stack.h>
18 #define B_NET_FRAME_TYPE_PPPOE B_NET_FRAME_TYPE(IFT_ETHER, ETHER_TYPE_PPPOE)
19 #define B_NET_FRAME_TYPE_PPPOE_DISCOVERY B_NET_FRAME_TYPE(IFT_ETHER, ETHER_TYPE_PPPOE_DISCOVERY)
21 #define PPPoE_QUERY_REPORT_SIZE 2048
22 #define PPPoE_QUERY_REPORT 'PoEQ'
23 // the code value used for query reports
25 #define PPPoE_HEADER_SIZE 6
26 // without ethernet header
27 #define PPPoE_TIMEOUT 3000000
29 #define PPPoE_MAX_ATTEMPTS 2
30 // maximum number of PPPoE's connect-retries
32 #define PPPoE_VERSION 0x1
33 #define PPPoE_TYPE 0x1
35 #define PPPoE_INTERFACE_KEY "Interface"
36 #define PPPoE_AC_NAME_KEY "ACName"
37 #define PPPoE_SERVICE_NAME_KEY "ServiceName"
44 typedef struct pppoe_query_request
{
45 const char *interfaceName
;
47 } pppoe_query_request
;
49 extern struct core_module_info
*core
;
52 typedef struct pppoe_header
{
59 } _PACKED pppoe_header
;
61 typedef struct complete_pppoe_header
{
62 struct ether_header ethernetHeader
;
63 pppoe_header pppoeHeader
;
64 } complete_pppoe_header
;
67 // defined in pppoe.cpp
68 extern net_device
*FindPPPoEInterface(const char *name
);
69 extern uint32
NewHostUniq();
70 extern void add_device(PPPoEDevice
*device
);
71 extern void remove_device(PPPoEDevice
*device
);
74 // defined in PPPoEDevice.cpp
75 extern void dump_packet(net_buffer
*packet
);