79 #ifdef PACK_STRUCT_USE_INCLUDES 80 # include "arch/bpstruct.h" 90 #ifdef PACK_STRUCT_USE_INCLUDES 91 # include "arch/epstruct.h" 94 #ifdef PACK_STRUCT_USE_INCLUDES 95 # include "arch/bpstruct.h" 103 #ifdef PACK_STRUCT_USE_INCLUDES 104 # include "arch/epstruct.h" 108 #define PPPOE_STATE_INITIAL 0 109 #define PPPOE_STATE_PADI_SENT 1 110 #define PPPOE_STATE_PADR_SENT 2 111 #define PPPOE_STATE_SESSION 3 112 #define PPPOE_STATE_CLOSING 4 114 #define PPPOE_STATE_PADO_SENT 1 116 #define PPPOE_HEADERLEN sizeof(struct pppoehdr) 117 #define PPPOE_VERTYPE 0x11 119 #define PPPOE_TAG_EOL 0x0000 120 #define PPPOE_TAG_SNAME 0x0101 121 #define PPPOE_TAG_ACNAME 0x0102 122 #define PPPOE_TAG_HUNIQUE 0x0103 123 #define PPPOE_TAG_ACCOOKIE 0x0104 124 #define PPPOE_TAG_VENDOR 0x0105 125 #define PPPOE_TAG_RELAYSID 0x0110 126 #define PPPOE_TAG_SNAME_ERR 0x0201 127 #define PPPOE_TAG_ACSYS_ERR 0x0202 128 #define PPPOE_TAG_GENERIC_ERR 0x0203 130 #define PPPOE_CODE_PADI 0x09 131 #define PPPOE_CODE_PADO 0x07 132 #define PPPOE_CODE_PADR 0x19 133 #define PPPOE_CODE_PADS 0x65 134 #define PPPOE_CODE_PADT 0xA7 137 #define ETHERMTU 1500 141 #define PPPOE_MAXMTU (ETHERMTU-PPPOE_HEADERLEN-2) 143 #ifndef PPPOE_MAX_AC_COOKIE_LEN 144 #define PPPOE_MAX_AC_COOKIE_LEN 64 148 struct pppoe_softc *next;
149 struct netif *sc_ethif;
151 void (*sc_linkStatusCB)(
int pd,
int up);
154 struct eth_addr sc_dest;
158 char *sc_service_name;
159 char *sc_concentrator_name;
161 u8_t sc_ac_cookie[PPPOE_MAX_AC_COOKIE_LEN];
162 size_t sc_ac_cookie_len;
165 size_t sc_hunique_len;
174 err_t pppoe_create(
struct netif *ethif,
int pd,
void (*linkStatusCB)(
int pd,
int up),
struct pppoe_softc **scptr);
177 int pppoe_connect(
struct pppoe_softc *sc);
178 void pppoe_disconnect(
struct pppoe_softc *sc);
183 err_t pppoe_xmit(
struct pppoe_softc *sc,
struct pbuf *pb);
186 #define PPPOE_HDRLEN (sizeof(struct eth_hdr) + PPPOE_HEADERLEN)
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_FIELD(x)