mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-07 15:04:39 +08:00
Conditionally have ARP queue outgoing pbufs.
This commit is contained in:
parent
1b798ed6d3
commit
29f5968c23
@ -120,6 +120,7 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
|
|
||||||
/* ---------- ARP options ---------- */
|
/* ---------- ARP options ---------- */
|
||||||
#define ARP_TABLE_SIZE 10
|
#define ARP_TABLE_SIZE 10
|
||||||
|
#define ARP_QUEUEING 0
|
||||||
|
|
||||||
/* ---------- IP options ---------- */
|
/* ---------- IP options ---------- */
|
||||||
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
||||||
|
@ -123,6 +123,7 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
|
|
||||||
/* ---------- ARP options ---------- */
|
/* ---------- ARP options ---------- */
|
||||||
#define ARP_TABLE_SIZE 10
|
#define ARP_TABLE_SIZE 10
|
||||||
|
#define ARP_QUEUEING 1
|
||||||
|
|
||||||
/* ---------- IP options ---------- */
|
/* ---------- IP options ---------- */
|
||||||
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
||||||
|
@ -123,6 +123,8 @@ a lot of data that needs to be copied, this should be set high. */
|
|||||||
|
|
||||||
/* ---------- ARP options ---------- */
|
/* ---------- ARP options ---------- */
|
||||||
#define ARP_TABLE_SIZE 10
|
#define ARP_TABLE_SIZE 10
|
||||||
|
#define ARP_QUEUEING 1
|
||||||
|
|
||||||
|
|
||||||
/* ---------- IP options ---------- */
|
/* ---------- IP options ---------- */
|
||||||
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
* Address Resolution Protocol module for IP over Ethernet
|
* Address Resolution Protocol module for IP over Ethernet
|
||||||
*
|
*
|
||||||
* $Log: etharp.c,v $
|
* $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
|
* Revision 1.10 2002/11/18 08:41:31 jani
|
||||||
* Move etharp packed structures to the header file.
|
* 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);
|
ip_addr_set(&arp_table[i].ipaddr, ipaddr);
|
||||||
arp_table[i].ctime = ctime;
|
arp_table[i].ctime = ctime;
|
||||||
arp_table[i].state = ETHARP_STATE_PENDING;
|
arp_table[i].state = ETHARP_STATE_PENDING;
|
||||||
/* remember pbuf to queue, if any */
|
#if ARP_QUEUEING
|
||||||
arp_table[i].p = q;
|
|
||||||
/* any pbuf to queue? */
|
/* any pbuf to queue? */
|
||||||
if (q != NULL) {
|
if (q != NULL) {
|
||||||
|
/* copy PBUF_REF referenced payloads to PBUF_RAM */
|
||||||
|
q = pbuf_unref(q);
|
||||||
/* pbufs are queued, increase the reference count */
|
/* pbufs are queued, increase the reference count */
|
||||||
pbuf_ref_chain(q);
|
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 */
|
/* could not allocate pbuf for ARP request */
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user