Queries and Sets from Connectionless Protocol Drivers (NDIS 5.1)

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

A connectionless protocol driver calls NdisRequestto retrieve (query) or set the characteristics of an underlying miniport driver. The type of information in the request is specified by an object identifier (OID). For a complete listing of general OIDs, see General Objects.

A connectionless protocol driver uses OID_GEN_MAXIMUM_FRAME_SIZEto query the maximum frame size, in bytes, supported by an underlying miniport driver. The size returned does not include the packet header.

A connectionless protocol driver uses OID_GEN_MAXIMUM_TOTAL_SIZEto request an underlying miniport driver to report the largest packet that the miniport driver supports on the NIC that it manages. The protocol driver must restrict the size of the packets it subsequently sends to this size. It is an error for a protocol driver to submit a packet that is larger than the size supported by the underlying miniport driver.

A connectionless protocol driver should use OID_GEN_MAXIMUM_SEND_PACKETSto determine the number of send packets that an underlying driver can accept each time the protocol calls NdisSendPackets. For a discussion of how this request can affect the protocol driver's subsequent send operations, see Sending Protocol Driver-Originated Packets.

A connectionless protocol driver can make a query request and a set request concerning the size of the lookahead data buffer that the underlying driver supplies whenever the protocol driver's ProtocolReceivefunction is called. The OID used is OID_GEN_CURRENT_LOOKAHEAD. If the protocol driver issues this as a query request, NDIS returns the current lookahead buffer size for the given binding to the underlying miniport driver. If the protocol driver makes a set request with this OID code, this set request indicates the protocol driver's preferred lookahead buffer size, but the protocol driver is not assured that an underlying driver will conform to this request.

A connectionless protocol driver can query the underlying miniport driver for its link speed with OID_GEN_LINK_SPEEDand use the results to set any internal time-out values it maintains. If the protocol driver is bound to NDISWAN, it cannot determine the link speed until it receives a line-up indication from the WAN miniport driver, indicating that a connection has been established between the local node and a remote node.

A connectionless protocol driver must issue an OID_GEN_MAC_OPTIONSquery to determine the operating characteristics of the underlying miniport driver. This query returns information such as, whether the underlying driver supports 802.1 priority.

If required, a connectionless protocol driver issues a set request to inform NDIS of its own operating characteristics, passing OID_GEN_PROTOCOL_OPTIONS.

Protocol drivers should support 64-bit statistics OID query requests. In a statistics OID query request, the protocol driver sets the InformationBufferLengthmember of the NDIS_REQUESTstructure to four (bytes) to indicate a 32-bit statistics request or to eight (bytes) to indicate a 64-bit statistics request. In its response, the miniport driver sets the BytesNeededmember to the size of the statistics supported by the miniport driver (four for 32-bits or eight for 64-bits). The miniport driver sets the BytesWrittenmember to the smaller of these two values: the InformationBufferLength, or the size of statistics supported by the miniport driver. For more information about statistics OIDs, see General Statistics.

 

 

Send comments about this topic to Microsoft