質問

I was trying to write a test bridge between two ethernet adapters using the NDIS proto example given in the WDK for Win 7. So far just got the driver and prototest built. Now I was wondering how to proceeed? Is there any way to bind to only a couple of adapters at one time?

役に立ちましたか?

解決

An NDIS protocol automatically binds to all supported adapters. So you don't need to do extra work to get NDISPROT to bind over two Ethernet NICs.

Once you've built the driver, all you need to do is:

  1. Install the driver (use INetCfgClassSetup::Install as illustrated in the bindview sample; or for casual experimentation, the NIC properties GUI has an Add... button that lets you install protocols with a GUI).
  2. Start the driver service (use StartService API; or for casual experimentation, net start ndisprot will do).

That's it. NDIS will call your protocol's ProtocolBindAdpaterEx handler for each Ethernet NIC on the system. This callback is named NdisprotBindAdapter in the sample.

Use !ndiskd.protocol to verify that your protocol is now bound to multiple miniports.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top