Conditionally have ARP queue outgoing pbufs.

This commit is contained in:
likewise 2002-11-18 10:30:02 +00:00
parent 1b798ed6d3
commit 29f5968c23
4 changed files with 15 additions and 2 deletions

View File

@ -120,6 +120,7 @@ a lot of data that needs to be copied, this should be set high. */
/* ---------- ARP options ---------- */
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 0
/* ---------- IP options ---------- */
/* Define IP_FORWARD to 1 if you wish to have the ability to forward

View File

@ -123,6 +123,7 @@ a lot of data that needs to be copied, this should be set high. */
/* ---------- ARP options ---------- */
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1
/* ---------- IP options ---------- */
/* Define IP_FORWARD to 1 if you wish to have the ability to forward

View File

@ -123,6 +123,8 @@ a lot of data that needs to be copied, this should be set high. */
/* ---------- ARP options ---------- */
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1
/* ---------- IP options ---------- */
/* Define IP_FORWARD to 1 if you wish to have the ability to forward

View File

@ -3,6 +3,9 @@
* Address Resolution Protocol module for IP over Ethernet
*
* $Log: etharp.c,v $
* Revision 1.11 2002/11/18 10:31:05 likewise
* Conditionally have ARP queue outgoing pbufs.
*
* Revision 1.10 2002/11/18 08:41:31 jani
* Move etharp packed structures to the header file.
*
@ -682,13 +685,19 @@ struct pbuf *etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pb
ip_addr_set(&arp_table[i].ipaddr, ipaddr);
arp_table[i].ctime = ctime;
arp_table[i].state = ETHARP_STATE_PENDING;
/* remember pbuf to queue, if any */
arp_table[i].p = q;
#if ARP_QUEUEING
/* any pbuf to queue? */
if (q != NULL) {
/* copy PBUF_REF referenced payloads to PBUF_RAM */
q = pbuf_unref(q);
/* pbufs are queued, increase the reference count */
pbuf_ref_chain(q);
}
/* remember pbuf to queue, if any */
arp_table[i].p = q;
#else
arp_table[i].p = NULL;
#endif
}
/* could not allocate pbuf for ARP request */
else {