NDIS Port States
NDIS ports have operating states that include initialization states and states that are specified in the NDIS_PORT_STATE structure. Port states fit into the following categories:
NDIS port initialization states are associated with startup initialization and Plug and Play (PnP) events. When NDIS or a miniport driver first allocates a port, the port is in the allocated state. After NDIS or the miniport driver activates a port, the port is in the activated state. Inactive ports cannot send or receive data, make status indications, receive OID requests, or initiate PnP events.
NDIS port link states are similar to link states that are associated with a miniport adapter and that are specified in an NDIS_LINK_STATE structure. The port link states indicate the media link connection state and link speeds. The link state of a port can be different from the link state of the associated miniport adapter.
NDIS port authentication states indicate if a port is controlled (requires authorization), the direction of data transmission (send, receive, or both), and the authorization state of a port (authorized, or not authorized). If a port is not controlled, the authenticated and not authenticated states are ignored.
Overlying drivers use the OID_GEN_PORT_STATE OID to get the current state of the port that is specified in the PortNumber member of the NDIS_OID_REQUEST structure. NDIS handles this OID, and miniport drivers do not receive this OID query.
Miniport drivers that support NDIS ports must use the NDIS_STATUS_PORT_STATE status indication to indicate changes in the state of an NDIS port. Miniport drivers must set the port number in the PortNumber member of the NDIS_STATUS_INDICATION structure.
NDIS and overlying drivers use the OID_GEN_PORT_AUTHENTICATION_PARAMETERS OID to set the current authentication states of an NDIS port. Miniport drivers that support NDIS ports must support this OID.