Address Differences between UDP and SCTP

Doug Hardie bc979 at lafn.org
Tue Sep 8 00:18:04 UTC 2020


> On 7 September 2020, at 13:57, Michael Tuexen <michael.tuexen at lurchi.franken.de> wrote:
> 
> For UDP and TCP you always get IPv6 addresses on AF_INET6 sockets. If you are actually using IPv4, IPv4-mapped IPv6 addresses are used. For SCTP you an choose if you want IPv4-mapped IPv6 addresses or IPv4 address. It is controlled by
> the socket option specified in https://tools.ietf.org/html/rfc6458#section-8.1.15

I used:

        optval = 1;
        rc = setsockopt (recv_fd, IPPROTO_IPV6, SCTP_I_WANT_MAPPED_V4_ADDR,
                                &optval, sizeof(optval));

FreeBSD 12.1.  Result was "Operation not supported"

-- Doug



More information about the freebsd-net mailing list