SIOCGSRCIPADDR obtains the associated source address (by Source
Address Selection algorithm, which is part of RFC 3484 (Default Address
Selection)) for each of the IPv6 addresses passed in an array. The
label and precedence of each source and destination address are also
returned. This information is ultimately used to sort the IPv6 and
IPv4 destination addresses, using the algorithm described in the RFC
3484 (Default Address Selection) for destination addresses.
Argument: An array of IPv6 and IPv4 destination addresses,
with a total count of the addresses being passed. The IPv4 destination
addresses must be passed in as IPv4-mapped IPv6 addresses. The only
SisPreferences currently recognized by the z/OS® Communications Server IP stack are SisSrcPreferPublic
and SisSrcPreferTmp. Upon return from the IOCTL invocation, the array
structure is to include a source IP address for each of the array
elements associated with the destination address that is being passed.
This source address is determined by the stack, using the Source Address
Selection algorithm defined in RFC 3484 (Default Address Selection).
If a source address cannot be determined for a specific destination
IP address (for example, if there is no route to the destination),
a null value is placed in the array element's IP source address field
(SisSrcIPaddr).
DCL 1 SrcIpSelect Based Bdy(Word),
2 SisHeader,
3 SisVersion Fixed(8), /* Version of the IOCTL interface
This should be SrcIpSelect_V2*/
3 SisPreferences Bit(8), /* IPv6_ADDR_PREFERENCES_FLAGS
byte-4 (see BPXYSOCK) */
/* The following mapping of SisPreferences must */
/* match the mapping of IPv6_ADDR_PREFERENCES_FLAGS */
/* in BPXYSOCK (see BPXYSOCK) */
5 * Bit(2), /* Invalid flags */
5 SisSrcPreferNoncga Bit(1), /* IPV6_PREFER_SRC_NONCGA
Prefer non-crypto */
5 SisSrcPreferCga Bit(1), /* IPV6_PREFER_SRC_CGA
Prefer cryptographic */
5 SisSrcPreferPublic Bit(1), /* IPV6_PREFER_SRC_PUBLIC
Prefer public addr */
5 SisSrcPreferTmp Bit(1), /* IPV6_PREFER_SRC_TMP
Prefer temp address */
5 SisSrcPreferCoa Bit(1), /* IPV6_PREFER_SRC_COA
Prefer care-of addr */
5 SisSrcPreferHome Bit(1), /* IPV6_PREFER_SRC_HOME
Prefer home address */
3 SisSrcAddrFlagsIn Bit(8), /* Source IP address flags
(input to IOCTL) */
5 SisIgnoreSourceVIPA Bit(1), /* B'1' indicates that
source VIPA should be ignored */
5 * Bit(7), /* */
3 * Char(1), /* Available */
3 SisNumEntries Fixed(32), /* Number of destination
addresses for which a source
address must be selected */
2 SisIpAddrs(*),
3 SisDestInfo, /* Destination IPaddr data */
4 SisDestIPaddr Char(16), /* Destination IP address. Can
contain a native IPv6 address,
or a mapped IPv4 address */
5 SisIpV4prefix Char(12), /* IP address prefix */
7 SisIpV4nulls Char(10), /* Always nulls for IPv6
mapped addresses */
7 SisIpV4mapped Char(2), /* IPv6 mapped prefix */
5 SisV4DestIPaddr Char(4), /* IPv4 address */
4 SisDestLabel Fixed(16), /* Dest IP addr label */
4 SisDestPrecedence Fixed(16), /* Destaddr precedence */
4 * Char(4),
3 SisSrcInfo, /* Source IP address data */
4 SisSrcIPaddr Char(16), /* Associated Source IP address
(output from IOCTL) */
4 SisSrcLabel Fixed(16), /* Src IP address label */
4 SisSrcPrecedence Fixed(16), /* Src Ipadr precedence */
4 SisSrcScopeID Fixed(32),
3 SisReturnInfo, /* Other IOCTL output */
4 SisRetcode Fixed(32), /* Return code from attempt to
obtain a source address */
4 SisSrcAddrFlags Bit(8), /* Source IP address flags
(output from IOCTL */
5 SisSrcDeprecated Bit(1), /* B'1' indicates address is
deprecated (only applicable for
native IPv6 addresses */
5 * Bit(7),
4 * Char(3); /* Available */
DCL SrcIpSelect_V2 Fixed(8) Constant(2);
DCL SrcIpSelect_Version Fixed(8) Constant(2);