/[lwip]/lwip/src/netif/etharp.c
ViewVC logotype

Diff of /lwip/src/netif/etharp.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by davidhaas, Tue Mar 18 14:48:40 2003 UTC revision 1.33 by davidhaas, Wed Mar 19 22:14:49 2003 UTC
# Line 235  update_arp_entry(struct netif *netif, st Line 235  update_arp_entry(struct netif *netif, st
235  {  {
236    u8_t i, k;    u8_t i, k;
237  #if ARP_QUEUEING  #if ARP_QUEUEING
238      struct pbuf *p;
239    struct eth_hdr *ethhdr;    struct eth_hdr *ethhdr;
240  #endif  #endif
241    DEBUGF(ETHARP_DEBUG, ("update_arp_entry()"));    DEBUGF(ETHARP_DEBUG, ("update_arp_entry()"));
# Line 270  update_arp_entry(struct netif *netif, st Line 271  update_arp_entry(struct netif *netif, st
271          arp_table[i].ctime = 0;          arp_table[i].ctime = 0;
272  #if ARP_QUEUEING  #if ARP_QUEUEING
273          /* queued packet present? */          /* queued packet present? */
274          if(arp_table[i].p != NULL) {              if((p = arp_table[i].p) != NULL) {
275              /* Null out attached buffer immediately */
276              arp_table[i].p = NULL;
277            /* fill-in Ethernet header */            /* fill-in Ethernet header */
278            ethhdr = arp_table[i].p->payload;            ethhdr = p->payload;
279            for(k = 0; k < 6; ++k) {            for(k = 0; k < 6; ++k) {
280              ethhdr->dest.addr[k] = ethaddr->addr[k];              ethhdr->dest.addr[k] = ethaddr->addr[k];
281            }            }
282            ethhdr->type = htons(ETHTYPE_IP);                                  ethhdr->type = htons(ETHTYPE_IP);                      
283            DEBUGF(ETHARP_DEBUG, ("update_arp_entry: sending queued IP packet.\n"));            DEBUGF(ETHARP_DEBUG, ("update_arp_entry: sending queued IP packet.\n"));
284            /* send the queued IP packet */            /* send the queued IP packet */
285            netif->linkoutput(netif, arp_table[i].p);            netif->linkoutput(netif, p);
286            /* free the queued IP packet */            /* free the queued IP packet */
287            pbuf_free(arp_table[i].p);            pbuf_free(p);
           /* remove queued packet from ARP entry (must be freed by the caller) */  
           arp_table[i].p = NULL;          
288          }          }
289  #endif  #endif
290          return NULL;          return NULL;

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26