Re: service listener for both IPv4 and IPv6
- From: Casper H.S. *** <Casper.***@xxxxxxx>
- Date: 19 Feb 2008 09:14:41 GMT
Panduranga Chary <pr.chary@xxxxxxxxx> writes:
How do we make service both listening to ipv4 and ipv6 in unix.
In Solaris, you create a single IPv6 socket and it will accept
both IPv4 and IPv6 traffice destined for that specific port.
we are putting 2 entries (1 for v4 and 1 for v6) though the binary is
same. only single socket opened and address binds to first accepted
address from a call to getaddrinfo().
/etc/services
tcp service #v4
tcp6 service
/etc/services does not distinguish between IPv6 and IPv4 ports; for
all intents and purposes they are the same.
/etc/inetd.conf
service stream tcp nowait root service_path service
service stream tcp6 nowait root service_path service
No, just:
service stream tcp6 nowait root service_path service
though it is posisble to use both (in which case separate daemons get
started.
Note that when you use the single socket approach all IPv4 connections
will appear as "IPv4 mapped" addresses.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.
- Follow-Ups:
- Re: service listener for both IPv4 and IPv6
- From: James Carlson
- Re: service listener for both IPv4 and IPv6
- References:
- service listener for both IPv4 and IPv6
- From: Panduranga Chary
- service listener for both IPv4 and IPv6
- Prev by Date: service listener for both IPv4 and IPv6
- Next by Date: Re: service listener for both IPv4 and IPv6
- Previous by thread: service listener for both IPv4 and IPv6
- Next by thread: Re: service listener for both IPv4 and IPv6
- Index(es):