For querying and setting NIC binding information, the transport driver must fill in an NDIS_REQUEST structure and pass it in a call to MacRequest through NdisRequest as Figure A.3.7 shows. The driver places an OID in the structure for an object in the NIC driver MIB that it wants to query or set. Depending on the substructure of NDIS_REQUEST the transport driver has filled in, MacRequest either queries or sets the object that corresponds to the transport driver-provided OID. The function fills in related fields of NDIS_REQUEST and passes the structure back to the transport driver, returning an appropriate status code.
MacRequest is another potentially asynchronous function. If it behaves synchronously, the function returns immediately with a status code other than NDIS_STATUS_PENDING. If it behaves asynchronously, the function returns NDIS_STATUS_PENDING, and the NIC driver later completes the request operation by a call to NdisCompleteRequest. This function forwards the call to ProtocolRequestComplete for postprocessing.