sockaddr_storage

Gary E. Miller gem at rellim.com
Fri Jan 27 20:16:11 UTC 2017


Yo Eric!

On Fri, 27 Jan 2017 15:01:19 -0500
"Eric S. Raymond" <esr at thyrsus.com> wrote:

> Gary E. Miller <gem at rellim.com>:
> > Yes, but NTP does not have to.  NTP can just open an IPv6 socket and
> > shove all IPv6 and IPv4 in through that socket.  Apache does this, 
> > sendmail does this, nginx does this, postfix does this.  Very
> > standard and very easy.  
> 
> That's interesting.  Does this mean we could throw out all
> IPV4-specific code and use IPV6 logic everywhere?

Yes.

> I didn't think an IPv6 accept() would take incoming IPv4 connections

Yes.

> - is there a way to make it take both?

It does by default, if you only open an IPv6 socket.

Look at 'man 7 ipv6'

Or here: http://man7.org/linux/man-pages/man7/ipv6.7.html

    "IPv4 connections can be handled with the v6 API by using the
    v4-mapped-on-v6 address type; thus a program needs to support
    only this API type to support both protocols.  This is handled
    transparently by the address handling functions in the C library."


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170127/68785a54/attachment.bin>


More information about the devel mailing list