mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 06:35:57 +00:00
etharp_*_input() return value (pbuf) removed; it has not been used since the packet queue
implementation. Packets are always sent to the network interface on behalf of ARP.
This commit is contained in:
parent
b217b020a5
commit
015cb1a35d
|
@ -95,8 +95,8 @@ struct ethip_hdr {
|
||||||
|
|
||||||
void etharp_init(void);
|
void etharp_init(void);
|
||||||
void etharp_tmr(void);
|
void etharp_tmr(void);
|
||||||
struct pbuf *etharp_ip_input(struct netif *netif, struct pbuf *p);
|
void etharp_ip_input(struct netif *netif, struct pbuf *p);
|
||||||
struct pbuf *etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr,
|
void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr,
|
||||||
struct pbuf *p);
|
struct pbuf *p);
|
||||||
struct pbuf *etharp_output(struct netif *netif, struct ip_addr *ipaddr,
|
struct pbuf *etharp_output(struct netif *netif, struct ip_addr *ipaddr,
|
||||||
struct pbuf *q);
|
struct pbuf *q);
|
||||||
|
|
|
@ -356,7 +356,7 @@ update_arp_entry(struct netif *netif, struct ip_addr *ipaddr, struct eth_addr *e
|
||||||
*
|
*
|
||||||
* @see pbuf_free()
|
* @see pbuf_free()
|
||||||
*/
|
*/
|
||||||
struct pbuf *
|
void
|
||||||
etharp_ip_input(struct netif *netif, struct pbuf *p)
|
etharp_ip_input(struct netif *netif, struct pbuf *p)
|
||||||
{
|
{
|
||||||
struct ethip_hdr *hdr;
|
struct ethip_hdr *hdr;
|
||||||
|
@ -367,13 +367,12 @@ etharp_ip_input(struct netif *netif, struct pbuf *p)
|
||||||
/* source is on local network? */
|
/* source is on local network? */
|
||||||
if (!ip_addr_maskcmp(&(hdr->ip.src), &(netif->ip_addr), &(netif->netmask))) {
|
if (!ip_addr_maskcmp(&(hdr->ip.src), &(netif->ip_addr), &(netif->netmask))) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
return NULL;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_ip_input: updating ETHARP table.\n"));
|
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_ip_input: updating ETHARP table.\n"));
|
||||||
/* update ARP table, ask to insert entry */
|
/* update ARP table, ask to insert entry */
|
||||||
update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), ARP_INSERT_FLAG);
|
update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), ARP_INSERT_FLAG);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -392,7 +391,7 @@ etharp_ip_input(struct netif *netif, struct pbuf *p)
|
||||||
*
|
*
|
||||||
* @see pbuf_free()
|
* @see pbuf_free()
|
||||||
*/
|
*/
|
||||||
struct pbuf *
|
void
|
||||||
etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
||||||
{
|
{
|
||||||
struct etharp_hdr *hdr;
|
struct etharp_hdr *hdr;
|
||||||
|
@ -405,7 +404,7 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
||||||
if (p->tot_len < sizeof(struct etharp_hdr)) {
|
if (p->tot_len < sizeof(struct etharp_hdr)) {
|
||||||
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE | 1, ("etharp_arp_input: packet dropped, too short (%d/%d)\n", p->tot_len, sizeof(struct etharp_hdr)));
|
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE | 1, ("etharp_arp_input: packet dropped, too short (%d/%d)\n", p->tot_len, sizeof(struct etharp_hdr)));
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
return NULL;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdr = p->payload;
|
hdr = p->payload;
|
||||||
|
@ -492,9 +491,6 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
||||||
}
|
}
|
||||||
/* free ARP packet */
|
/* free ARP packet */
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
p = NULL;
|
|
||||||
/* nothing to send, we did it! */
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user