GetClusterNetInterfaceState function

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(
  HNETINTERFACE hNetInterface
);

Parameters

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

   
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