Querying the Port State

Overlying drivers can issue an OID_GEN_PORT_STATE OID query request to get the current state of the port that is specified in the PortNumber member of an NDIS_OID_REQUEST structure. NDIS handles this OID, and miniport drivers do not receive this OID query. NDIS receives port state information in the NDIS_PORT_CHARACTERISTICS structure.

The OID_GEN_PORT_STATE OID is supported in NDIS 6.0 and later versions.

Overlying drivers should avoid using OID_GEN_PORT_STATE when possible and should instead rely on the NDIS_STATUS_PORT_STATE status indication. For more information about port-related status indications, see Handling NDIS Ports Status Indications.

If the OID_GEN_PORT_STATE query succeeds, NDIS returns the port state information in an NDIS_PORT_STATE structure.