lib/socket-util.c
/* Returns the IPv4 or IPv6 address in 'sa'.  Returns IPv4 addresses as
 * v6-mapped. */
Returns the IPv4 or IPv6 address in 'sa'.  Returns IPv4 addresses as
v6-mapped.
Returns the IPv4 or IPv6 address in ' sa ' . Returns IPv4 addresses as v6 - mapped .
struct in6_addr
sa_get_address(const struct sockaddr *sa)
{
    ovs_assert(sa_is_ip(sa));
    return (sa->sa_family == AF_INET
            ? in6_addr_mapped_ipv4(sin_cast(sa)->sin_addr.s_addr)
            : sin6_cast(sa)->sin6_addr);
}
struct in6_addr sa_get_address ( const struct sockaddr * sa ) { ovs_assert ( sa_is_ip ( sa ) ) ; return ( sa -> sa_family == AF_INET ? in6_addr_mapped_ipv4 ( sin_cast ( sa ) -> sin_addr . s_addr ) : sin6_cast ( sa ) -> sin6_addr ) ; }
Returns the IPv4 or IPv6 address in 'sa'.
Returns the IPv4 or IPv6 address in ' sa ' .