3.1.4.2.83 ApiGetNetworkState (Opnum 83)

(Protocol Version 3) The ApiGetNetworkState method returns the current state of the specified cluster network.

A cluster network has a state that is calculated from the configuration and state of its cluster interfaces that are installed on that cluster network. The state of a cluster network and its associated cluster network interfaces can change according to implementation-specific mechanisms between servers, such as when the server detects that an interface on that cluster network has failed.

The server SHOULD accept an ApiGetNetworkState request if its protocol server state is read-only and 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 ApiGetNetworkState request if the access level associated with the hNetwork context handle is at least "Read" (section 3.1.4).

 error_status_t ApiGetNetworkState(
   [in] HNETWORK_RPC hNetwork,
   [out] DWORD *State,
   [out] error_status_t *rpc_status
 );

hNetwork: An HNETWORK_RPC context handle that was obtained in a previous ApiOpenNetwork or ApiOpenNetworkEx method.

State: The current state of the cluster network, 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

ClusterNetworkUnavailable

0x00000000

All cluster network interfaces on the network are in the ClusterNetInterfaceUnavailable state.

ClusterNetworkDown

0x00000001

All cluster network interfaces on the network are in either the ClusterNetInterfaceFailed state or the ClusterNetInterfaceUnreachable state.

ClusterNetworkPartitioned

0x00000002

One or more cluster network interfaces are in the ClusterNetInterfaceUnreachable state, and at least two interfaces are in the ClusterNetInterfaceUp state.

ClusterNetworkUp

0x00000003

All cluster network interfaces are in the ClusterNetInterfaceUp state.

ClusterNetworkStateUnknown

0xFFFFFFFF

The operation to retrieve cluster network 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 returns 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 hNetwork parameter does not represent a valid HNETWORK_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 3.2.4.6 as recoverable errors and initiate the reconnect procedure as specified in section 3.2.4.6.