Function
The vfs_gethost operation gets
the ID or the name of the socket host.
Input parameter format
vfs_gethost (Token_structure,
OSI_structure,
Audit_structure
Name_length,
Name,
Return_value,
Return_code,
Reason_code)
Parameters
- Token_structure
- Supplied parameter
- Type:
- TOKSTR
- Length:
- Specified by TOKSTR.ts_hdr.cblen.
The Token_structure represents the file system (VFS)
that is being operated on. It contains the PFS's initialization token
and mount token. Refer to LFS/PFS control block structure for a discussion
of this structure, and to the TOKSTR typedef in BPXYPFSI in Interface structures for C language servers and clients for its mapping.
- OSI_structure
- Supplied and returned parameter
- Type:
- OSI
- Length:
- Specified by OSI.osi_hdr.cblen.
The OSI_structure contains information that is used
by the OSI operations that may be called by the PFS. See OSI services for more information.
It also contains
MVS-specific information that needs to be passed to the PFS, including
SMF accounting fields, a work area, a recovery area, and an optional
pointer to an output ATTR structure. For more details on the OSI structure,
see The OSI structure.
This area is mapped by
the OSI typedef in BPXYPFSI in Interface structures for C language servers and clients.
- Audit_structure
- Supplied parameter
- Type:
- CRED
- Length:
- Specified by CRED.cred_hdr.cblen.
The Audit_structure contains information that is
used by the security product for access checks and auditing. It is
passed to most SAF routines that are invoked by the PFS.
Refer
to Security responsibilities and considerations for a discussion of security processing,
and to the CRED typedef in BPXYPFSI in Interface structures for C language servers and clients for
the mapping of this structure.
- Name_length
- Supplied and returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword that contains the length of the name.
If this value is zero, the request is for the host ID. Otherwise,
this is the length of the buffer to hold the name. On return, for
host name, this field contains the length of the name plus one for
the null.
- Name
- Returned parameter
- Type:
- String
- Length:
- Specified by Name_length
An area that contains the name on return, if the
host name was requested. This name must be null-terminated by the
PFS.
- Return_value
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the vfs_gethost operation returns
the results of the operation, as one of the following:
- Return_value
- Meaning
- -1
- The operation was not successful. The Return_code and Reason_Code
values must be filled in by the PFS when Return_value is -1.
- 0
- The operation was successful (for getting the host name).
- Greater than 0
- The operation was successful (for getting the host ID) and is
the identifier of the current host.
- Return_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the vfs_gethost operation stores
the return code. The vfs_gethost operation returns Return_code only
if Return_value is -1. For a complete list of supported
return code values, see z/OS UNIX System Services Messages and Codes.
- Reason_code
- Returned parameter
- Type:
- Integer
- Length:
- Fullword
A fullword in which the vfs_gethost operation stores
the reason code. The vfs_gethost operation returns Reason_code only
if Return_value is -1. Reason_code further qualifies
the Return_code value. These reason codes are documented by the PFS.
Implementation notes
- Overview of vfs_gethost processing
- For more information about the semantics of this operation, refer
to the publications mentioned in Finding more information about sockets for
the gethostid() and gethostname() functions.
- Specific processing notes
- The PFS determines whether to get the host name or host ID depending
on Name_length. A zero length indicates a gethostid() request.
- Serialization provided by the LFS
- The vfs_gethost operation is invoked with an exclusive latch held
on the domain of the PFS.
- Security calls to be made by the PFS
- None.