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


Socket options and ancillary data to support IPv6 (IPPROTO_IPV6 level)

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

An application can use socket options to enable or disable a function for a socket. An application can also provide a value to be used for a function with a socket option. After an option is enabled, it remains in effect for the socket until it is disabled.

An application can also use ancillary data on the sendmsg() API to enable a function or provide a value for the packet being sent by way of sendmsg(). The value of the ancillary data is in effect for that packet only. Note that the value of the ancillary data can override a socket option value. For a detailed explanation of ancillary data, see Using ancillary data on sendmsg() and recvmsg().

An application can also receive ancillary data on the recvmsg() API. The returned ancillary data is enabled for any socket options that return data on recvmsg.

A group of advanced socket options and ancillary data is defined to support IPv6. They are defined with a level of IPPROTO_IPV6 or IPPROTO_ICMPV6. The individual options begin with IPV6_ and ICMP6_. These options are allowed on AF_INET6 sockets only. In most cases, these options can be set on an AF_INET6 socket that is using IPv4-mapped IPv6 addresses, but have no effect. For example, the IPV6_HOPLIMIT ancillary data option is used to set a hop limit value in the IPv6 header. Because IPv4 packets are used with IPv4-mapped IPv6 addresses, the hop limit value is not used. The following options are the only advanced socket options that have an effect on an AF_INET6 socket that is using IPv4–mapped IPv6 addresses:
  • IPV6_PKTINFO
  • IPV6_RECVPKTINFO
  • IPV6_TCLASS
  • IPV6_RECVTCLASS
Table 1. Sockets options at the IPPROTO_IPV6 level
Socket options getsockopt() setsockopt() z/OS® UNIX Assembler Callable Services C/C++ using Language Environment® REXX Communications Server Sockets Extended macro/call
IPV6_CHECKSUM Y Y N N
IPV6_DONTFRAG Y Y N N
IPV6_DSTOPTS Y Y N N
IPV6_HOPOPTS Y Y N N
IPV6_NEXTHOP Y Y N N
IPV6_PATHMTU[valid only on getsockopt()] Y Y N N
IPV6_PKTINFO Y Y N N
IPV6_RECVDSTOPTS Y Y N N
IPV6_RECVHOPLIMIT Y Y N N
IPV6_RECVHOPOPTS Y Y N N
IPV6_RECVPATHMTU Y Y N N
IPV6_RECVPKTINFO Y Y N N
IPV6_RECVRTHDR Y Y N N
IPV6_RECVTCLASS Y Y N N
IPV6_RTHDR Y Y N N
IPV6_RTHDRDSTOPTS Y Y N N
IPV6_TCLASS Y Y N N
IPV6_USE_MIN_MTU Y using BPX1 Y N N

Table 2. Ancillary data on sendmsg() (Level = IPPROTO_IPV6)
Ancillary data on sendmsg() Assembler Callable Services C/C++ using Language Environment REXX Sockets Extended macro/call
IP_QOS_ CLASSIFICATION1 Y Y N N
IPV6_DONTFRAG Y Y N N
IPV6_DSTOPTS Y Y N N
IPV6_HOPLIMIT1 Y Y N N
IPV6_HOPOPTS Y Y N N
IPV6_NEXTHOP Y Y N N
IPV6_PKTINFO1 Y Y N N
IPV6_RTHDR Y Y N N
IPV6_RTHDRDSTOPTS Y Y N N
IPV6_TCLASS Y Y N N
IPV6_USE_MIN_MTU Y Y N N
Table 3. Ancillary data on recvmsg() (Level = IPPROTO_IPV6)
Ancillary data on recvmsg() Assembler Callable Services C/C++ using Language Environment REXX Sockets Extended macro/call
IPV6_DSTOPTS Y Y N N
IPV6_HOPLIMIT Y Y N N
IPV6_HOPOPTS Y Y N N
IPV6_PATHMTU Y Y N N
IPV6_PKTINFO Y Y N N
IPV6_RTHDR Y Y N N
IPV6_TCLASS Y Y N N
1 This option is supported as ancillary data for UDP and RAW protocols. It is not possible to use ancillary data to transmit options for TCP because there is not a one-to-one mapping between send operations and the TCP segments being transmitted.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014