Costmetic updates to comments
This commit is contained in:
parent
0e23712db4
commit
553b93cd23
@ -89,10 +89,6 @@ struct icmpv6_neighbor_s
|
|||||||
net_ipv6addr_t snd_ipaddr; /* The IPv6 address to be queried */
|
net_ipv6addr_t snd_ipaddr; /* The IPv6 address to be queried */
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -130,7 +126,7 @@ static uint16_t icmpv6_neighbor_interrupt(FAR struct net_driver_s *dev,
|
|||||||
* we will just have to wait for the next polling cycle.
|
* we will just have to wait for the next polling cycle.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (dev->d_sndlen > 0 || (flags & PKT_NEWDATA) != 0)
|
if (dev->d_sndlen > 0 || (flags & ICMPv6_NEWDATA) != 0)
|
||||||
{
|
{
|
||||||
/* Another thread has beat us sending data or the buffer is busy,
|
/* Another thread has beat us sending data or the buffer is busy,
|
||||||
* Check for a timeout. If not timed out, wait for the next
|
* Check for a timeout. If not timed out, wait for the next
|
||||||
@ -147,8 +143,8 @@ static uint16_t icmpv6_neighbor_interrupt(FAR struct net_driver_s *dev,
|
|||||||
|
|
||||||
icmpv6_solicit(dev, state->snd_ipaddr);
|
icmpv6_solicit(dev, state->snd_ipaddr);
|
||||||
|
|
||||||
/* Make sure no additional Neighbor Solicitation overwrites this one. This
|
/* Make sure no additional Neighbor Solicitation overwrites this one.
|
||||||
* flag will be cleared in icmpv6_out().
|
* This flag will be cleared in icmpv6_out().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
IFF_SET_NOARP(dev->d_flags);
|
IFF_SET_NOARP(dev->d_flags);
|
||||||
@ -321,10 +317,12 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
|
|||||||
#ifdef CONFIG_NETDEV_MULTINIC
|
#ifdef CONFIG_NETDEV_MULTINIC
|
||||||
/* Remember the routing device name */
|
/* Remember the routing device name */
|
||||||
|
|
||||||
strncpy((FAR char *)state.snd_ifname, (FAR const char *)dev->d_ifname, IFNAMSIZ);
|
strncpy((FAR char *)state.snd_ifname, (FAR const char *)dev->d_ifname,
|
||||||
|
IFNAMSIZ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Now loop, testing if the address mapping is in the Neighbor Table and re-sending the ARP request if it is not.
|
/* Now loop, testing if the address mapping is in the Neighbor Table and
|
||||||
|
* re-sending the Neighbor Solicitation if it is not.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ret = -ETIMEDOUT; /* Assume a timeout failure */
|
ret = -ETIMEDOUT; /* Assume a timeout failure */
|
||||||
@ -346,7 +344,9 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set up the ARP response wait BEFORE we send the ARP request */
|
/* Set up the Neighbor Advertisement wait BEFORE we send the Neighbor
|
||||||
|
* Solicitation.
|
||||||
|
*/
|
||||||
|
|
||||||
icmpv6_wait_setup(lookup, ¬ify);
|
icmpv6_wait_setup(lookup, ¬ify);
|
||||||
|
|
||||||
@ -377,8 +377,8 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
|
|||||||
}
|
}
|
||||||
while (!state.snd_sent);
|
while (!state.snd_sent);
|
||||||
|
|
||||||
/* Now wait for response to the ARP response to be received. The
|
/* Now wait for response to the Neighbor Advertisement to be received.
|
||||||
* optimal delay would be the work case round trip time.
|
* The optimal delay would be the work case round trip time.
|
||||||
* NOTE: The network is locked.
|
* NOTE: The network is locked.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -395,8 +395,8 @@ int icmpv6_neighbor(const net_ipv6addr_t ipaddr)
|
|||||||
irqrestore(flags);
|
irqrestore(flags);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* icmpv6_wait will return OK if and only if the matching ARP response
|
/* icmpv6_wait will return OK if and only if the matching Neighbor
|
||||||
* is received. Otherwise, it will return -ETIMEDOUT.
|
* Advertisement is received. Otherwise, it will return -ETIMEDOUT.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (ret == OK)
|
if (ret == OK)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user