<div>I set DependOnService npf and nm service followed your suggestion.</div>
<div>It still wait about 30 seconds,</div>
<div>My log info followed:</div>
<div>2007-12-11 08:56:25 Power on my computer,Windows start,<br>2007-12-11 08:56:41 Windows XP Display login dialog and enter my password to login in<br>2007-12-11 08:56:46 start my network authorized program......
<br>2007-12-11 08:56:46 look up used network card......<br>2007-12-11 08:57:16 Use Network card:Intel(R) PRO/1000 MT Network Connection (Microsoft's Packet Scheduler) <br>2007-12-11 08:57:16 send EAPOL_START packet
<br>2007-12-11 08:57:17 receive server message<br>2007-12-11 08:57:18 already authorized,Through DHCP get ip address and enter into the corparation local network.</div>
<div>Can I speed up npf and nm service ?</div>
<div>Or set to start these service after windows display login dialog as fast as possible?<br> </div>
<div>Thank you!<br><br> </div>
<div><span class="gmail_quote">2007/12/10, Bryan Kadzban <<a href="mailto:bryan@kadzban.is-a-geek.net">bryan@kadzban.is-a-geek.net</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: RIPEMD160<br><br>¹¤ÉÌÒøÐÐ wrote:<br>> I found that the pcap_findalldevs function consume about 34 seconds.
<br>> My question is how long does the winpcap driver loaded ?<br><br>The driver loads in a few milliseconds, usually.<br><br>> Does it loaded earlier than the network interface loaded?<br><br>If it does load before the network card does, winpcap handles the
<br>dynamic addition of the card. As long as your program does a<br>pcap_findalldevs* after that new card is present, and you're using a<br>new-enough winpcap (4.0 should be fine), that will work fine. (It also<br>won't cause an extra delay.)
<br><br>> My program is put into the windows system service.auto started.<br><br>Oh, you're writing a service. Well that's different then. I'm guessing<br>that you're calling pcap_findalldevs in either ServiceMain or in your
<br>service's START control handler? Whenever you make your first winpcap<br>driver call (and pcap_findalldevs is one of those), the DLL tries to<br>start the "npf" driver. But if the service control manager is in the
<br>middle of starting your service, it won't go start another one. (The<br>winpcap DLL also used to require the "nm" service to be running; I don't<br>know if this is true anymore, but I believe it still is.)
<br><br>What you need to do is use service dependencies to make the service<br>control manager start the "npf" and "nm" services *before* it starts<br>yours. When you call the API that installs your service, there should
<br>be a parameter for dependencies (or you can add a REG_MULTI_SZ named<br>"DependOnService" to your service's registry key, but you have to reboot<br>for that to take effect). Add both "npf" and "nm" as dependencies.
<br>-----BEGIN PGP SIGNATURE-----<br>Version: GnuPG v1.4.7 (GNU/Linux)<br>Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org">http://enigmail.mozdev.org</a><br><br>iD8DBQFHXSxKS5vET1Wea5wRA4rFAJ4t/BmfYGXG2RDQyVOz6L3zPx8ZfgCgxsL/
<br>UacLZ64+/wipzWv/sjA6ZB0=<br>=rKwm<br>-----END PGP SIGNATURE-----<br>_______________________________________________<br>Winpcap-users mailing list<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org
</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br></blockquote></div><br>