freeaddrinfo (BPX1FAI, BPX4FAI) — Free Addr_Info structures

Function

The freeaddrinfo callable service frees the Addr_Info structures that are obtained by the getaddrinfo callable service (getaddrinfo (BPX1GAI, BPX4GAI) — Get the IP address and information for a service name or location).

Requirements

Operation Environment
Authorization: Supervisor state or problem state, any PSW key
Dispatchable unit mode: Task
Cross memory mode: PASN = HASN
AMODE (BPX1FAI): 31-bit
AMODE (BPX4FAI): 64-bit
ASC mode: Primary mode
Interrupt status: Enabled for interrupts
Locks: Unlocked
Control parameters: All parameters must be addressable by the caller and in the primary address space.

Format

The syntax format is as follows:

AMODE 64 callers use BPX4FAI with the same parameters.

Parameters

Addr_Info_Ptr
Supplied parameter
Type:
Pointer
Length:
Fullword

The name of a fullword field that contains a pointer to an Addr_Info structure or a linked list of Addr_Info structures returned by the getaddrinfo callable service. See Addr_Info – AddrInfo Data Structure in the EZBREHST assembler macro for more information about the format of this structure. The EZBREHST macro is shipped in the installation's MACLIB SMP/E DDEF location.

Return_value
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the freeaddrinfo service returns one of the following:
  • 0, if the request is successful.
  • -1, if the request is not successful.
Return_code
Returned parameter
Type:
Integer
Length:
Fullword
The name of a fullword in which the freeaddrinfo service stores the return code. The freeaddrinfo service returns Return_code only if Return_value is -1. For a complete list of possible return code values, see z/OS Communications Server: IP and SNA Codes. The freeaddrinfo service can return one of the following values in the Return_code parameter:
Return_code Explanation
EAI_AGAIN The resolver address space has not been started. Try the request later.
EAI_FAIL An unrecoverable error occurred.
Reason_code
Returned parameter
Type:
Integer
Length:
Fullword

The name of a fullword in which the freeaddrinfo service stores the reason code. The freeaddrinfo service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS Communications Server: IP and SNA Codes.

Usage notes

  1. The freeadrinfo service supports a thread-safe environment.
  2. The pointer that is returned in the Results_Ptr parameter of the getaddrinfo callable service can be specified with the Addr_Info_Ptr parameter on the freeaddrinfo callable service.
  3. When the Addr_Info_Ptr parameter points to a linked list of Addr_Info structures, the linked list of Addr_Info structures is freed with one invocation of the freeaddrinfo callable service.

Characteristics and restrictions

None.

Examples

For an example using this callable service, see BPX1FAI (freeaddrinfo) example.