NET_PNP_EVENT (NDIS 5.1) structure

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.

The NET_PNP_EVENT structure describes a Plug and Play event or a power management event.

Syntax

typedef struct _NET_PNP_EVENT {
  NET_PNP_EVENT_CODE NetEvent;
  PVOID              Buffer;
  ULONG              BufferLength;
  ULONG_PTR          NdisReserved[4];
  ULONG_PTR          TransportReserved[4];
  ULONG_PTR          TdiReserved[4];
  ULONG_PTR          TdiClientReserved[4];
} PNET_PNP_EVENT, *PNET_PNP_EVENT;

Members

  • NetEvent
    An event code that describes the Plug and Play or power management event as one of the following:

    • NetEventSetPower
      Indicates that the power manager has sent a Set Power request, which specifies a transition to a system power state. NDIS translates this state to an appropriate device power state for the device.

    • NetEventQueryPower
      Indicates that the power manager has sent a Query Power request, which requests a transition to a system power state. NDIS translates this state to an appropriate device power state for the device.

    • NetEventQueryRemoveDevice
      Indicates that the Plug and Play Manager has sent a Query Remove Device request. The Plug and Play Manager sends this request to query whether a device can be removed without disrupting operations.

    • NetEventCancelRemoveDevice
      Indicates that the Plug and Play Manager has sent a Cancel Remove Device request. The PnP Manager sends this request after sending an a Query Remove Device request to cancel the removal of the device.

    • NetEventReconfigure
      Indicates that the configuration has changed for a network component. For example, if a user, through the Network and Dial-up Connections folder, changes the IP address for TCP/IP, NDIS indicates this event to the TCP/IP protocol with the NetEventReconfigure code.

    • NetEventBindList
      Indicates to a protocol driver that its bind list processing order has been reconfigured. This list indicates a relative order to be applied to the protocol's bindings when processing, for example, a user request that might be routed to one of several bindings. The buffer passed with this event contains a list of device names formatted as NULL-terminated Unicode strings. The format of each device name is identical to the DeviceName parameter passed to a call to ProtocolBindAdapter.

    • NetEventBindsComplete
      Indicates that a protocol driver has bound to all the NICs that it can bind to. NDIS will not indicate any more NICs to the protocol unless a Plug and Play NIC is plugged into the system.

    • NetEventPnPCapabilities
      Indicates whether the wake-up capabilities of the NIC on the specified binding have changed. (The binding is specified by the ProtocolBindingContext passed to ProtocolPnPEvent.)

  • Buffer
    Specifies the address of a buffer that contains information specific to the Plug and Play or power management event indicated by NetEvent.

    • NetEventSetPower
      The buffer contains the device power state to which the device is transitioning.

      When NDIS calls a protocol's ProtocolPnPEvent function, the device state is an NDIS_DEVICE_POWER_STATE, which can be one of the following values:

      NdisDeviceStateUnspecified

      The network device does not support power management.

      NdisDeviceStateD0

      The fully powered state, in which the device delivers full functionality and performance.

      NdisDeviceStateD1

      A low-power state, in which transmit requests from the host are not honored by the device, data received by the device is not transferred to host memory, and no interrupts can occur. Some device context may be lost. Depending on the capabilities of the NIC and its miniport driver, the device may be able to generate a wake-up signal.

      NdisDeviceStateD2

      A low-power state similar to NdisDeviceStateD1, except that usually more power and less context are saved, and more time is required to transition to the fully powered state.

      NdisDeviceStateD3

      The off state, in which power has been fully removed from the device.

    As far as a protocol is concerned, NdisDeviceStateD0 means that the NIC is fully powered and is available for sending and receiving packets. Any other device state means that the device is not fully powered and is not available for sending and receiving packets.

    • NetEventQueryPower
      The buffer contains the device power state requested for the device. The device state is an NDIS_DEVICE_POWER_STATE (described above).

    • NetEventQueryRemoveDevice
      The buffer contents are NULL.

    • NetEventCancelRemoveDevice
      The buffer contents are NULL.

    • NetEventReconfigure
      The buffer can contain protocol-specific data. The protocol driver is responsible for validating this data.

    • NetEventBindList
      The buffer contains a revised binding list for the network component to which the NET_PNP_EVENT structure is being passed. The bind list, which is a series of NULL-terminated Unicode strings, has a REG_MULTI_SZ format. Each of these strings is an adapter name. TDI clients bound to a protocol use this bind list to reorder their bindings. The protocol driver is responsible for validating this data.

    • NetEventBindsComplete
      The buffer contents are NULL.

    • NetEventPnPCapbilities
      The buffer contains a ULONG that contains the NdisDeviceWakeUpEnable flag. When set to 1, this flag indicates that the wake-up capabilities of the NIC on the specified binding are enabled. (The binding is specified by the ProtocolBindingContext passed to ProtocolPnPEvent.) When set to zero, this flag indicates that the NIC's wake-up capabilities are disabled.

  • BufferLength
    The number of bytes of event-specific information at Buffer.

  • NdisReserved
    An area reserved for used by NDIS.

  • TransportReserved
    An area reserved for used by the transport driver.

  • TdiReserved
    An area reserved for used by TDI.

  • TdiClientReserved
    An area reserved for used by a TDI client.

Remarks

When the operating system issues a Plug and Play event or a power management event to a target device object that represents a NIC, NDIS intercepts the event, translates it into a NET_PNP_EVENT structure, and passes a pointer to this structure to each protocol bound to the NIC by calling the protocol's ProtocolPnPEvent function. The protocol should save this pointer, because the pointer is an input parameter to NdisCompletePnPEvent, which the driver calls to complete the call to ProtocolPnPEvent asynchronously.

NDIS can also call the ProtocolPnPEvent function of a particular protocol driver to notify that driver of a NetEventBindsComplete event. This event indicates to the protocol driver that it has bound to all the NICs that it can bind to in the system.

The NetEvent code in the structure identifies the type of Plug and Play or power management event. The Buffer contains information specific to the type of event.

Transports typically use the TransportReserved area to maintain state concerning the Plug and Play event or power management event.

Requirements

Version

See NET_PNP_EVENT.

Header

Ndis.h (include Ndis.h)

See also

NdisCompletePnPEvent

ProtocolPnPEvent

 

 

Send comments about this topic to Microsoft