Retrieve Network File System Export Entries (QZNFRTVE) API


  Required Parameter Group:

1 Receiver variable Output Char(*)
2 Length of receiver variable in bytes Input Binary(4)
3 Returned records feedback information Output Char(16)
4 Format name Input Char(8)
5 Object path name Input Char(*)
6 Length of object path name in bytes Input Binary(4)
7 CCSID of object path name given Input Binary(4)
8 Desired CCSID of the object path
names returned
Input Binary(4)
9 Handle Input Binary(4)
10 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Retrieve Network File System Export Entries (QZNFRTVE) API returns the list of Network File System (NFS) export entries for objects currently exported to NFS clients or for objects referenced in the /etc/exports file.


Authorities and Locks

Note: Adopted authority is not used.


Usage Notes

If none of the required parameters are passed to this API, then all of the entries that are currently exported will be returned to the joblog by messages (CPIB41A). If there are no entries currently exported, then message CPIB41B will be returned.


Required Parameter Group

The following parameters are required.

Receiver variable
OUTPUT; CHAR(*)

The receiver variable that receives the information requested. The API returns only data that the area can hold.


Length of receiver variable
INPUT; BINARY(4)

The length of the receiver variable provided. The length of the receiver variable parameter may be specified up to the size of the receiver variable area specified by the user program.

No partial entries will be returned. If the length of the receiver variable is less than what is required by the format selected, then an error is returned (CPFB419) and the size required will be indicated in the feedback structure.


Returned records feedback information
OUTPUT; CHAR(16)

Information about the entries that are returned in the receiver variable.

For a detailed description of this format, see Format of Returned Records Feedback Information.


Format name
INPUT; CHAR(8)

The name of the format that is used to retrieve NFS export entries.

You can specify one of the following formats:

EXPE0100
Returns information about export entries that are currently exported. These are sometimes called temporary exports. For a detailed description of this format, see EXPE0100 and EXPE0200 Format.
EXPE0200
Returns information about export entries that are in the /etc/exports file. These are sometimes called permanent exports. For a detailed description of this format, see EXPE0100 and EXPE0200 Format.

Object path name
INPUT; CHAR(*)

The object path name at which to start listing NFS export entries. Possible values follow:

*FIRST
NFS export entries are returned starting with the first object path name in the NFS export entry list.
*HANDLE
NFS export entries are returned starting with the object path name that corresponds to the specified handle.

When the receiver variable is not large enough to hold all of the entries in the NFS export entry list, the API returns a non-zero handle in the returned records feedback information parameter. This handle can be used on a subsequent call to the API to continue retrieving NFS export entries with the next object path name in the NFS export entry list.

There is no implied order to the export entries that are returned. While no sorting or sequencing has been done on the returned entries, a complete list will eventually be returned if the *HANDLE option is used.

Object path name
The NFS export entry for the specified object path name is returned.

Length of object path name
INPUT; BINARY(4)

The length of the object path name in bytes. If one of the special values is given for the object path name, then the length should be given for that special value.


CCSID of object path name given
INPUT; BINARY(4)

The CCSID of the object path name given as an input parameter. Possible values follow:

0
The current Default Job CCSID should be used.
value
A valid CCSID number.

Desired CCSID of object the path names returned.
INPUT; BINARY(4)

The Desired CCSID of the object path names returned. The output structure will contain the actual CCSID of the returned object path names. This will match the Desired CCSID given as input, if possible. Possible values follow:

0
The current Default Job CCSID should be used.
value
A valid CCSID number.

Handle of starting object path name
INPUT; BINARY(4)

The handle returned from a previous call to the QZNFRTVE API.

This parameter should be 0 if *HANDLE was NOT specified for the object path name parameter.


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Receiver Variable Description

The following table describes the order and format of the data returned in the receiver variable. For a detailed description of each field, see Field Descriptions.


EXPE0100 and EXPE0200 Format

This structure is used to return NFS export information for a single object path name for both the EXPE0100 and the EXPE0200 formats.

Offset Type Field
Dec Hex
0 0 BINARY(4) Length of entry
4 4 BINARY(4) Displacement to object path name
8 8 BINARY(4) Length of object path name
12 C BINARY(4) CCSID of object path name
16 10 BINARY(4) Read-only flag
20 14 BINARY(4) NOSUID flag
24 18 BINARY(4) Displacement to read-write host names
28 1C BINARY(4) Number of read-write host names
32 20 BINARY(4) Displacement to root host names
36 24 BINARY(4) Number of root host names
40 28 BINARY(4) Displacement to access host names
44 2C BINARY(4) Number of access host names
48 30 BINARY(4) Displacement to host options
52 34 BINARY(4) Number of host options
56 38 BINARY(4) Anonymous user ID
60 3C CHAR(10) Anonymous User Profile
70 46 BINARY(4) NFS version flag
74 4A BINARY(4) Displacement to NFS security flavors
78 4E BINARY(4) Number of security flavors
82 52 BINARY(4) NFS Root export flag
86 56 BINARY(4) Public export flag
90 5A BINARY(4) Displacement to export name
94 5E BINARY(4) Length of export name
98 62 BINARY(4) CCSID of export name
* * CHAR(*) Object path name
* * CHAR(*) Export name
These fields repeat for each NFS security flavor. BINARY(4) Security flavor
These fields repeat for each host name in the read-write access list. BINARY(4) Length of host name entry
BINARY(4) Length of host name
CHAR(*) Host name
These fields repeat for each host name in the root access list. BINARY(4) Length of host name entry
BINARY(4) Length of host name
CHAR(*) Host name
These fields repeat for each host name in the access list. BINARY(4) Length of host name entry
BINARY(4) Length of host name
CHAR(*) Host name
These fields repeat for each host name in the host options list. BINARY(4) Length of host name options entry
BINARY(4) Network data file CCSID
BINARY(4) Network path name CCSID
BINARY(4) Write mode flag
BINARY(4) Length of host name
CHAR(*) Host name


Returned Records Feedback Information Description

The following table describes the order and format of the data returned in the returned records feedback information parameter. For a detailed description of each field, see Field Descriptions.


Format of Returned Records Feedback Information

Offset Type Field
Dec Hex
0 0 BINARY(4) Bytes returned
4 4 BINARY(4) Bytes available
8 8 BINARY(4) Number of NFS export entries
12 C BINARY(4) Handle


Field Descriptions

Anonymous User ID. The user ID used as the effective user ID for requests from unknown users. Hex value 0xFFFFFFFF (a value of -1 if this were a signed integer) indicates requests from unknown users are not allowed.

Anonymous User Profile. This is the IBM® i User Profile name that is associated with the Anonymous User ID returned. If the Anonymous User ID has the special value of hex value 0xFFFFFFFF (a value of -1 if this were a signed integer), then the Anonymous User Profile will be set to the special value of *NONE.

Bytes available. The number of bytes of data available to be returned to the user in the receiver variable. If all data is returned, bytes available is the same as the number of bytes returned. If the receiver variable was not large enough to contain all of the data, this value is estimated based on the total number of entries in the NFS export entry list that could be returned.

Bytes returned. The number of bytes of data returned to the user in the receiver variable.

CCSID of object path name. The CCSID of the object path name.

CCSID of export name. The CCSID of the export name.

Object path name. The path name of the object for which export information is to be returned.

Displacement to access host names. The offset (in bytes) from the beginning of the NFS export entry to the host names in the access list.

Displacement to export name. The offset (in bytes) from the beginning of the NFS export entry to the external export name for the object path name.

Displacement to host options. The offset (in bytes) from the beginning of the NFS export entry to the host options list.

Displacement to NFS security flavors. The offset (in bytes) from the beginning of the NFS export entry to the security flavors.

Displacement to object path name. The offset (in bytes) from the beginning of the NFS export entry to the object path name.

Displacement to read-write host names. The offset (in bytes) from the beginning of the NFS export entry to the host names in the read-write access list.

Displacement to root host names. The offset (in bytes) from the beginning of the NFS export entry to the host names in the root access list.

Export name. The external path name for the object seen by NFS version 4 clients when accessing the exported namespace.

Handle. The handle to be used on a subsequent call to the API to continue retrieving NFS export entries with the next object path name in the NFS export entry list. 0 indicates all remaining NFS export entries have been returned.

Host name. The host name.

Length of entry. The length (in bytes) of the current NFS export entry. The length can be used to access the next entry.

Length of export name. The length (in bytes) of the export name.

Length of host name. The length (in bytes) of the host name.

Length of host name entry. The length (in bytes) of this host name entry.

Length of host name options entry. The length (in bytes) of this host name options entry.

Length of object path name. The length (in bytes) of the object path name.

Network data file CCSID. The CCSID used for data of the files sent to and received from the specified host name.

Network path name CCSID. The CCSID used for path name components of the files sent to and received from the specified host name.

NFS Root export flag. Whether this export has been specified as the root export. Possible values follow:

0
The object is not exported as the root of the NFS server's exported namespace.
1
The object is exported as the root of the server's NFS version 4 exported namespace. NFS version 4 client requests for the root file handle will receive a file handle to this path.

NFS security flavors. The security flavors that can be used to connect to this export. The possible values are:

NFS Security Flavor
Value (Hex)
Description
0x00000001 sys, Unix style (uids, gids)
0x00000002 krb5, Kerberos 5 no integrity or privacy
0x00000004 krb5i, Kerberos 5 with integrity
0x00000008 krb5p, Kerberos 5 with privacy

NFS version flag. The version of NFS clients that can connect to this export. The possible values are:

NFS Version Flag
Value (Hex)
Description
0x00000001 NFS version 2
0x00000002 NFS version 3
0x00000004 NFS version 4

NOSUID flag. Whether an attempt by the client to enable bits other than the permission bits will be ignored. Possible values follow:

0
An attempt to set bits other than the permission bits will be carried out.
1
An attempt to set bits other than the permission bits will be ignored.

Number of access host names. The number of host names in the access list.

Number of host options. The number of entries in the host options list.

Number of NFS export entries. The number of complete entries returned in the list of NFS export entries. A value of zero is returned if the list is empty relative to the requested starting position.

Number of read-write host names. The number of host names in the read-write access list.

Number of root host names. The number of host names in the root access list.

Number of security flavors. The number of security flavors specified for the entry.

Object path name. The path name of the object for which export information is to be returned.

Public export flag. Whether this export has been specified as the publicly exported path for NFS version 4. Possible values follow:

0
The object is not exported as the publicly available path.
1
The object is exported as the publicly available path. NFS version 4 client requests for the public file handle will receive a file handle to this path.

Read-only flag. Whether the object is exported allowing only read access. Possible values follow:

0
The object is exported allowing read-write access for all client hosts that are not specifically indicated to have read-only access.
1
The object is exported allowing read-only access for all client hosts that are not specifically indicated to have read-write access.

Write mode flag. Whether write requests are handled synchronously or asynchronously. Synchronously means that data will be written to disk immediately. Asynchronously does not guarantee that data is written to disk immediately, and can be used to improve server performance. Possible values follow:

0
Write requests are performed synchronously.
1
Write requests are performed asynchronously.

Error Messages

The following messages may be sent from this function:

Message ID Error Message Text
CPE3418 E Possible APAR condition or hardware failure.
CPFA0D4 E File system error occurred. Error number &1.
CPF3CF2 E Error(s) occurred during running of &1 API.
CPF3C90 E Literal value cannot be changed.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.


API introduced: V4R3

[ Back to top | UNIX-Type APIs | APIs by category ]