GetClusterNetInterfaceState function (clusapi.h)

Returns the current state of a network interface. The PCLUSAPI_GET_CLUSTER_NET_INTERFACE_STATE type defines a pointer to this function.

Syntax

CLUSTER_NETINTERFACE_STATE GetClusterNetInterfaceState(
  [in] HNETINTERFACE hNetInterface
);

Parameters

[in] hNetInterface

Handle to the network interface for which state information should be returned.

Return value

GetClusterNetInterfaceState returns the current state of the network interface, which is represented by one of the following values enumerated by the CLUSTER_NETINTERFACE_STATE enumeration.

Return code/value Description
ClusterNetInterfaceFailed
1
The network interface cannot communicate with any other network interface.
ClusterNetInterfaceUnreachable
2
The network interface cannot communicate with at least one other network interface whose state is not ClusterNetInterfaceFailed or ClusterNetInterfaceUnavailable.
ClusterNetInterfaceUp
3
The network interface can communicate with all other network interfaces whose state is not ClusterNetInterfaceFailed or ClusterNetInterfaceUnavailable.
ClusterNetInterfaceUnavailable
0
The node that owns the network interface is down.
ClusterNetInterfaceStateUnknown
-1
The operation was not successful. For more information about the error, call the function GetLastError.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See also

CLUSTER_NETINTERFACE_STATE

OpenClusterNetInterface

State Property of the ClusNetInterface Object