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


Address testing macros

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

The macros listed in Table 1 can be used to test for special IPv6 addresses.

Table 1. Address testing macros
Macros Assembler Callable services C/C++ using Language Environment® IP CICS® C sockets REXX Socket Extended macro/call (includes CICS EZASOKET)
IN6_IS_ADDR_UNSPECIFIED No Yes Yes No No
IN6_IS_ADDR_LOOPBACK No Yes Yes No No
IN6_IS_ADDR_MULTICAST No Yes Yes No No
IN6_IS_ADDR_LINKLOCAL No Yes Yes No No
IN6_IS_ADDR_V4MAPPED No Yes Yes No No
IN6_IS_ADDR_V4COMPAT No Yes Yes No No
IN6_IS_ADDR_MC_NODELOCAL No Yes Yes No No
IN6_IS_ADDR_MC_LINKLOCAL No Yes Yes No No
IN6_IS_ADDR_MC_SITELOCAL No Yes Yes No No
IN6_IS_ADDR_MC_ORGLOCAL No Yes Yes No No
IN6_IS_ADDR_MC_GLOBAL No Yes Yes No No
The macros function in the following ways:
  • The first six macros return true if the address is of the specified type, or false otherwise.
  • The last five macros test the scope of a multicast address and return true if the address is a multicast address of the specified scope, or false if the address is either not a multicast address or not of the specified scope.
  • IN6_IS_ADDR_LINKLOCAL returns true only for IPv6 link-local unicast addresses, and therefore the IN6_IS_ADDR_LINKLOCAL macro returns false for the IPv6 loopback address (::1). This macro does not return true for IPv6 multicast addresses of link-local scope.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014