<div>I set DependOnService npf and nm service followed your suggestion.</div>
<div>It still wait about 30 seconds,</div>
<div>My&nbsp;&nbsp;log info followed:</div>
<div>2007-12-11 08:56:25&nbsp;&nbsp; Power on my computer,Windows start,<br>2007-12-11 08:56:41&nbsp;&nbsp; Windows XP Display login dialog and enter my password to login in<br>2007-12-11 08:56:46&nbsp;&nbsp; start my network authorized program......
<br>2007-12-11 08:56:46&nbsp;&nbsp; look up used network card......<br>2007-12-11 08:57:16&nbsp;&nbsp; Use Network card:Intel(R) PRO/1000 MT Network Connection (Microsoft&#39;s Packet Scheduler) <br>2007-12-11 08:57:16&nbsp;&nbsp; send EAPOL_START packet
<br>2007-12-11 08:57:17&nbsp;&nbsp; receive server message<br>2007-12-11 08:57:18&nbsp;&nbsp; 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&nbsp;to start these service&nbsp;after windows display login dialog as fast as possible?<br>&nbsp;</div>
<div>Thank you!<br><br>&nbsp;</div>
<div><span class="gmail_quote">2007/12/10, Bryan Kadzban &lt;<a href="mailto:bryan@kadzban.is-a-geek.net">bryan@kadzban.is-a-geek.net</a>&gt;:</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>&gt; I found that&nbsp;&nbsp;the pcap_findalldevs function consume about 34 seconds.
<br>&gt; My question is how long does the winpcap driver loaded ?<br><br>The driver loads in a few milliseconds, usually.<br><br>&gt; 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.&nbsp;&nbsp;As long as your program does a<br>pcap_findalldevs* after that new card is present, and you&#39;re using a<br>new-enough winpcap (4.0 should be fine), that will work fine.&nbsp;&nbsp;(It also<br>won&#39;t cause an extra delay.)
<br><br>&gt; My program is put into the windows system service.auto started.<br><br>Oh, you&#39;re writing a service.&nbsp;&nbsp;Well that&#39;s different then.&nbsp;&nbsp;I&#39;m guessing<br>that you&#39;re calling pcap_findalldevs in either ServiceMain or in your
<br>service&#39;s START control handler?&nbsp;&nbsp;Whenever you make your first winpcap<br>driver call (and pcap_findalldevs is one of those), the DLL tries to<br>start the &quot;npf&quot; driver.&nbsp;&nbsp;But if the service control manager is in the
<br>middle of starting your service, it won&#39;t go start another one.&nbsp;&nbsp;(The<br>winpcap DLL also used to require the &quot;nm&quot; service to be running; I don&#39;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 &quot;npf&quot; and &quot;nm&quot; services *before* it starts<br>yours.&nbsp;&nbsp;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>&quot;DependOnService&quot; to your service&#39;s registry key, but you have to reboot<br>for that to take effect).&nbsp;&nbsp;Add both &quot;npf&quot; and &quot;nm&quot; 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>