3.1.4.2.94 ApiGetNetInterfaceState (Opnum 94)

(Protocol Version 3) The ApiGetNetInterfaceState method returns the current state of the designated cluster network interface.

The server SHOULD detect changes in cluster network interface state and use that information accordingly to determine if it is best suited to continue hosting its resources.

The server SHOULD accept an ApiGetNetInterfaceState request if its protocol server state is read-only, and the server MUST accept the request for processing if it is in the read/write state, as specified in section 3.1.1.

The server SHOULD accept an ApiGetNetInterfaceState request if the access level associated with the hNetInterface context handle is at least "Read" (section 3.1.4).

 error_status_t ApiGetNetInterfaceState(
   [in] HNETINTERFACE_RPC hNetInterface,
   [out] DWORD *State,
   [out] error_status_t *rpc_status
 );

hNetInterface: An HNETINTERFACE_RPC context handle that was obtained in a previous ApiOpenNetInterface method or ApiOpenNetInterfaceEx method call.

State: The current state of the cluster network interface, which is written by the server after successful completion of this method. If the method fails, this parameter MUST be ignored. If the method succeeds, this field MUST be set to one of the following values.

Value

Meaning

ClusterNetInterfaceFailed

0x00000000

The cluster network interface cannot communicate with any other cluster network interface.

ClusterNetInterfaceUnreachable

0x00000001

The cluster network interface cannot communicate with at least one other cluster network interface whose state is not ClusterNetInterfaceFailed or ClusterNetInterfaceUnavailable.

ClusterNetInterfaceUnavailable

0x00000002

The node on which this cluster network interface is installed is not in either the ClusterNodeUp state or the ClusterNodePaused state.

ClusterNetInterfaceUp

0x00000003

The cluster network interface can communicate with all other cluster network interfaces whose state is not ClusterNetInterfaceFailed or ClusterNetInterfaceUnavailable.

ClusterNetInterfaceStateUnknown

0xFFFFFFFF

The operation to retrieve cluster network interface state was not successful.

rpc_status: A 32-bit integer used to indicate success or failure. The RPC runtime MUST indicate, by writing to this parameter, whether it succeeded in executing this method on the server. The encoding of the value passed in this parameter MUST conform to encoding for comm_status and fault_status, as specified in Appendix E of [C706].

Return Values: The method MUST return the following error codes for the specified conditions.

Return value/code

Description

0x00000000

ERROR_SUCCESS

Success.

0x00000006

ERROR_INVALID_HANDLE

The data that is pointed to by the hNetInterface parameter does not represent a valid HNETINTERFACE_RPC context handle.

For any other condition, this method MUST return a value that is not one of the values listed in the preceding table. The client MUST behave in one consistent, identical manner for all values that are not listed in the preceding table. The client SHOULD treat errors specified in section 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.