lwIP
2.1.0
Lightweight IP stack
|
Modules | |
DHCPv6 | |
MLD6 | |
IPv6 Zones | |
Functions | |
const ip_addr_t * | ip6_select_source_address (struct netif *netif, const ip6_addr_t *dest) |
const ip_addr_t* ip6_select_source_address | ( | struct netif * | netif, |
const ip6_addr_t * | dest | ||
) |
Select the best IPv6 source address for a given destination IPv6 address.
This implementation follows RFC 6724 Sec. 5 to the following extent:
For Rule 2, we deliberately deviate from RFC 6724 Sec. 3.1 by considering ULAs to be of smaller scope than global addresses, to avoid that a preferred ULA is picked over a deprecated global address when given a global address as destination, as that would likely result in broken two-way communication.
As long as temporary addresses are not supported (as used in Rule 7), a proper implementation of Rule 8 would obviate the need to implement Rule 6.
netif | the netif on which to send a packet |
dest | the destination we are trying to reach (possibly not properly zoned) |