3 |
* Address Resolution Protocol module for IP over Ethernet |
* Address Resolution Protocol module for IP over Ethernet |
4 |
* |
* |
5 |
* $Log$ |
* $Log$ |
6 |
|
* Revision 1.11 2002/11/18 10:31:05 likewise |
7 |
|
* Conditionally have ARP queue outgoing pbufs. |
8 |
|
* |
9 |
* Revision 1.10 2002/11/18 08:41:31 jani |
* Revision 1.10 2002/11/18 08:41:31 jani |
10 |
* Move etharp packed structures to the header file. |
* Move etharp packed structures to the header file. |
11 |
* |
* |
685 |
ip_addr_set(&arp_table[i].ipaddr, ipaddr); |
ip_addr_set(&arp_table[i].ipaddr, ipaddr); |
686 |
arp_table[i].ctime = ctime; |
arp_table[i].ctime = ctime; |
687 |
arp_table[i].state = ETHARP_STATE_PENDING; |
arp_table[i].state = ETHARP_STATE_PENDING; |
688 |
/* remember pbuf to queue, if any */ |
#if ARP_QUEUEING |
|
arp_table[i].p = q; |
|
689 |
/* any pbuf to queue? */ |
/* any pbuf to queue? */ |
690 |
if (q != NULL) { |
if (q != NULL) { |
691 |
|
/* copy PBUF_REF referenced payloads to PBUF_RAM */ |
692 |
|
q = pbuf_unref(q); |
693 |
/* pbufs are queued, increase the reference count */ |
/* pbufs are queued, increase the reference count */ |
694 |
pbuf_ref_chain(q); |
pbuf_ref_chain(q); |
695 |
} |
} |
696 |
|
/* remember pbuf to queue, if any */ |
697 |
|
arp_table[i].p = q; |
698 |
|
#else |
699 |
|
arp_table[i].p = NULL; |
700 |
|
#endif |
701 |
} |
} |
702 |
/* could not allocate pbuf for ARP request */ |
/* could not allocate pbuf for ARP request */ |
703 |
else { |
else { |