z/OS Communications Server: IPv6 Network and Application Design Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Socket option to control IPv4 and IPv6 communications

z/OS Communications Server: IPv6 Network and Application Design Guide
SC27-3663-00

Use the following option to control IPv4 and IPv6 communications:

IPV6_V6ONLY
An AF_INET6 socket can be used for IPv6 communications, IPv4 communications, or a mix of IPv6 and IPv4 communications. The IPV6_V6ONLY socket option allows an application to limit an AF_INET6 socket to IPv6 communications only. A nonzero socket option value enables the option; a value of 0 disables the option.

A getsockopt() with this option returns the value set by a setsockopt(). If a setsockopt() has not been done, the default value of 0 (disabled) is returned.

If an application wants to enable this option, the setsockopt() must be set before binding the socket, connecting the socket, or sending data over the socket. This option cannot be changed (either enabled or disabled) after the socket has been bound. (An implicit bind is done for datagram sockets on connect or send operations if the socket is not already bound.)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014