// ntddndis.h
typedef struct _NDIS_PORT_STATE {
NDIS_OBJECT_HEADER Header;
NDIS_MEDIA_CONNECT_STATE MediaConnectState;
ULONG64 XmitLinkSpeed;
ULONG64 RcvLinkSpeed;
NET_IF_DIRECTION_TYPE Direction;
NDIS_PORT_CONTROL_STATE SendControlState;
NDIS_PORT_CONTROL_STATE RcvControlState;
NDIS_PORT_AUTHORIZATION_STATE SendAuthorizationState;
NDIS_PORT_AUTHORIZATION_STATE RcvAuthorizationState;
ULONG Flags;
} NDIS_PORT_STATE, *PNDIS_PORT_STATE;
View the official Windows Driver Kit DDI referenceNo description available.
The NDIS_PORT_STATE structure specifies the port state information for an NDIS port.
HeaderThe NDIS_OBJECT_HEADER structure for the NDIS_PORT_STATE structure. Set the Type member of the structure that Header specifies to NDIS_OBJECT_TYPE_ DEFAULT, the Revision member to NDIS_PORT_STATE_REVISION_1, and the Size member to NDIS_SIZEOF_PORT_STATE_REVISION_1.
MediaConnectStateThe media connection state of the port. This state is the same information that the OID_GEN_MEDIA_CONNECT_STATUS_EX OID returns.
XmitLinkSpeedThe transmit link speed of the port, in bits per second. A value of -1 in this member indicates that the transmit link speed is unknown.
RcvLinkSpeedThe receive link speed of the port, in bits per second. A value of -1 in this member indicates that the receive link speed is unknown.
DirectionA NET_IF_DIRECTION_TYPE NDIS network interface direction type.
SendControlStateThe current control state of the port for send operations. This member must contain one of the following values:
The port's control state for send operations is unknown.
The port is in a controlled state for send operations. That is, the port requires authorization.
The port is in an uncontrolled state for send operations. That is, the port does not require authorization.
RcvControlStateThe current control state of the port for receive operations. This member must contain one of the following values:
The port's control state for receive operations is unknown.
The port is in a controlled state for receive operations. That is, the port requires authorization.
The port is in an uncontrolled state for receive operations. That is, the port does not require authorization.
SendAuthorizationStateThe current authorization state of the port for send operations. Ignore this member if the SendControlState member is set to NdisPortControlStateUncontrolled.
SendAuthorizationState must contain one of the following values:
The port's authorization state for send operations is unknown.
The port is authorized for send operations.
The port is not authorized for send operations.
The port is re-authorizing for send operations.
RcvAuthorizationStateThe current authorization state of the port for receive operations. Ignore this member if the RcvControlState member is set to NdisPortControlStateUncontrolled.
RcvAuthorizationState must contain one of the following values:
The port's authorization state for receive operations is unknown.
The port is authorized for receive operations.
The port is not authorized for receive operations.
The port is re-authorizing for receive operations.
FlagsReserved for NDIS.
The NDIS_PORT_STATE structure is used in the NDIS_STATUS_PORT_STATE status indication to indicate a change in the state of a port and is used in response to an OID_GEN_PORT_STATE OID query.
OID_GEN_MEDIA_CONNECT_STATUS_EX