[Winpcap-users] why pcap_findalldevs run about 30 seconds

Bryan Kadzban bryan at kadzban.is-a-geek.net
Tue Dec 11 02:16:18 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

工商银行 wrote:
> Can I speed up npf and nm service ?

Nope.  nm is written by Microsoft, and npf is the kernel-mode half of
WinPcap.  You can't really change either of them.

(Plus your problem isn't that those drivers start slowly.  Your problem
is -- or at least, I think your problem is -- that you have two services
/ drivers (they're the same in windows) trying to start at the same
time.  This is illegal, and causes a very long wait before the second
(nested) start command ends up timing out.  I think that's the delay
that you're seeing.)

> Or set to start these service after windows display login dialog as
> fast as possible?

You don't want to do what you're asking here.  You need npf and nm to be
started *before* your service starts, and your service starts before the
desktop comes up (because all services do).

The dependency is the only guaranteed way to get another service (or
driver) to start before your service, but the following also works on XP
SP2 (it may change with SP3, and it may not work in Vista):

Bring up device manager.  Go into the view menu and find the "show
hidden devices" option -- turn it on.  Then expand the "non plug and
play drivers" node in the tree, and bring up the properties on the
"network monitor" item.  One of the tabs in the property sheet dialog
will have options for when the driver should start, and it's probably
set to "Demand".  Set it to either "automatic" or "system"; system runs
before auto.  Then hit OK, and go find the "NetGroup Packet Filter"
driver: do the same thing to it (set it to either auto or system).

If you set both of them to system and that still doesn't help, then
something else is wrong -- go set everything back (including the
dependencies that you set on nm and npf) and hope somebody else has some
other ideas.  Because unfortunately, I don't...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHXfLxS5vET1Wea5wRA83lAKC+BShG6l29OdcqDDFFSCSSEftUTgCgq9uW
kAzlVXPpiIqb/nxmhIC/CoQ=
=pTt2
-----END PGP SIGNATURE-----


More information about the Winpcap-users mailing list