Below and at
Alan Nishioka snipped-for-privacy@nishioka.com
$ diff -Naur xemacif.c-orig xemacif.c
--- xemacif.c-orig 2007-12-18 22:59:57.893585600 -0800
+++ xemacif.c 2007-12-18 12:01:08.242739200 -0800 @@ -305,9 +305,12 @@ struct pbuf *p, struct ip_addr *ipaddr) {- err_t status;
- XEmacIf_Config *xemacif_ptr = xemacif_ptr = netif_ptr->state;
- p = etharp_output(netif_ptr, ipaddr, p);
- status = etharp_output(netif_ptr, ipaddr, p);
- if( status != ERR_OK ) return status;
if (p != NULL) { /* send the frame */ @@ -329,7 +332,7 @@ struct netif * netif_ptr = (struct netif *) CallBackRef; XEmacIf_Config * xemacif_ptr; struct eth_hdr * ethernet_header;
- struct pbuf *p, *q;
- struct pbuf *p;
xemacif_ptr = netif_ptr->state;
@@ -338,25 +341,19 @@ if (p != NULL) { ethernet_header = p->payload;
- q = NULL; switch (htons(ethernet_header->type)) { case ETHTYPE_IP:
- q = etharp_ip_input(netif_ptr, p);
- etharp_ip_input(netif_ptr, p); pbuf_header(p, -14); netif_ptr->input(p, netif_ptr); break; case ETHTYPE_ARP:
- q = etharp_arp_input(netif_ptr, &(xemacif_ptr->ethaddr), p);
- etharp_arp_input(netif_ptr, &(xemacif_ptr->ethaddr), p); break; default: pbuf_free(p); break; }
- if (q != NULL) {
- low_level_output(netif_ptr, q);
- pbuf_free(q);
- } }
return ERR_OK;