lwip中etharp_query函数
如果ip地址在arp表中有相应的表项存在,且表项处于stable状态,此时如果给定的数据包为空为什么还要向该ip地址发送一个arp请求? /* create an ARP query for the offered IP address, expecting that no hostresponds, as the IP address should not be in use. */
result = etharp_query(netif, &dhcp->offered_ip_addr, NULL);
err_t
etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q)
{
/* do we have a pending entry? or an implicit query request? */
if ((arp_table.state == ETHARP_STATE_PENDING) || (q == NULL)) {
aozima 发表于 2014-3-29 21:26
懂了谢谢啦
页:
[1]