0

In Miniport drivers we have two status indications(NDIS_STATUS_MEDIA_CONNECT/NDIS_STATUS_MEDIA_DISCONNECT) to know whether LAN is disconnected or not.

Can we use the same indications in LWF to know the status of Media associated with LAN. I have two scenarios that I want get the indications or handles for.

  1. When Wire connected to NIC is pulled and re-connected.
  2. When two PC's are connected through a wire, I will power down the other PC where LWF is not running.

Appreciate your help.

Thanks

Rami
  • 5
  • 3

1 Answers1

0

Drivers written in the last 10 years should not use NDIS_STATUS_MEDIA_CONNECT or NDIS_STATUS_MEDIA_DISCONECT. Those were retired with NDIS 5.x. Instead, use NDIS_STATUS_LINK_STATE.

Filter drivers may listen for NDIS_STATUS_LINK_STATE. They can also query the current link state at any time, by issuing OID_GEN_LINK_STATE.

If your filter originates NBLs, I encourage you to monitor the link state. It's just a waste of CPU cycles to try and originate NBLs when the link is down -- the packets will just get returned to you.

Jeffrey Tippet
  • 3,146
  • 1
  • 14
  • 15