z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


INET6_IS_SRCADDR

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

The INET6_IS_SRCADDR call verifies whether the input IP address matches an IP address in the node that conforms to all IPV6_ADDR_PREFERENCES flags specified in the call. You can use this call with IPv6 addresses or with IPv4-mapped IPv6 addresses.

You can use this call to test local IP addresses to verify whether these addresses have the characteristics that are required by your application.

See RFC 5014 IPv6 Socket API for Source Address Selection for more information about the INET6_IS_SRCADDR call. See Related protocol specifications for information about accessing RFCs.

The following requirements apply to this call:

Figure 1 shows an example of INET6_IS_SRCADDR call instructions.

Figure 1. INET6_IS_SRCADDR call instruction example
    WORKING-STORAGE SECTION.
             01  SOC-FUNCTION    PIC X(16)  VALUE IS 'INET6_IS_SRCADDR'.
             * IPv6 socket address structure.
             01  NAME.
                 03  FAMILY      PIC 9(4) BINARY.
                 03  PORT        PIC 9(4) BINARY.
                 03  FLOWINFO    PIC 9(8) BINARY.
                 03  IP-ADDRESS.
                     10 FILLER   PIC 9(16) BINARY.
                     10 FILLER   PIC 9(16) BINARY.
                 03  SCOPE-ID    PIC 9(8) BINARY.
             01  FLAGS           PIC 9(8) BINARY
                 88 IPV6-PREFER-SRC-HOME         PIC 9(8) BINARY VALUE 1.
                 88 IPV6-PREFER-SRC-COA          PIC 9(8) BINARY VALUE 2.
                 88 IPV6-PREFER-SRC-TMP          PIC 9(8) BINARY VALUE 4.
                 88 IPV6-PREFER-SRC-PUBLIC       PIC 9(8) BINARY VALUE 8.
                 88 IPV6-PREFER-SRC-CGA          PIC 9(8) BINARY VALUE 16.
                 88 IPV6-PREFER-SRC-NONCGA       PIC 9(8) BINARY VALUE 32.
             01  ERRNO           PIC 9(8) BINARY.
             01  RETCODE         PIC S9(8) BINARY.

         PROCEDURE DIVISION.
              CALL 'EZASOKET' USING SOC-FUNCTION NAME FLAGS ERRNO RETCODE.

For equivalent PL/I and assembler language declarations, see Converting parameter descriptions.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014