70 struct eth_addr *ethaddr;
75 static void ethernetif_input(
struct netif *
netif);
87 struct ethernetif *ethernetif = netif->
state;
126 struct ethernetif *ethernetif = netif->
state;
135 for(q = p; q !=
NULL; q = q->
next) {
142 signal that packet should be sent();
162 low_level_input(
struct netif *netif)
164 struct ethernetif *ethernetif = netif->
state;
187 for(q = p; q !=
NULL; q = q->
next) {
198 acknowledge that packet has been
read();
224 ethernetif_input(
struct netif *netif)
226 struct ethernetif *ethernetif;
227 struct eth_hdr *ethhdr;
230 ethernetif = netif->
state;
233 p = low_level_input(netif);
235 if (p ==
NULL)
return;
239 switch (
htons(ethhdr->type)) {
245 case ETHTYPE_PPPOEDISC:
276 ethernetif_init(
struct netif *netif)
278 struct ethernetif *ethernetif;
282 ethernetif =
mem_malloc(
sizeof(
struct ethernetif));
283 if (ethernetif ==
NULL) {
288 #if LWIP_NETIF_HOSTNAME
290 netif->hostname =
"lwip";
300 netif->
state = ethernetif;
307 netif->
output = etharp_output;
310 ethernetif->ethaddr = (
struct eth_addr *)&(netif->
hwaddr[0]);
313 low_level_init(netif);