[Winpcap-users] problem using winpcap 3.1 with windows service

Gianluca Varenni gianluca.varenni at gmail.com
Fri Sep 9 11:16:43 GMT 2005

Replies quoted with --GV--

Have a nice day

----- Original Message ----- 
From: "Bryan Kadzban" <bryan at kadzban.is-a-geek.net>
To: <winpcap-users at winpcap.org>
Sent: Wednesday, September 07, 2005 3:18 PM
Subject: Re: [Winpcap-users] problem using winpcap 3.1 with windows service

Michael Ryan wrote:
> Hello,
> I have a service that uses winpcap. The service is set to start
> automatically.
> With winpcap 3.1 Beta 4 the service starts as expected each time the
> computer boots.
> However, with the final version of winpcap 3.1 the service does not
> start automatically with each boot. Interestingly, once the computer
> boots you can start my service manually and it works as expected. It
> just does not start automatically.
> I am not sure what is happening here. One possibility is that winpcap
> is dependent on a third service that has not launched itself when my
> service starts( which is why you can launch my service manually
> after the boot is complete), but there is probably some other reason.
> Any input would be appreciated.

Your service uses winpcap directly, right?  It links right to the DLLs,
so that if you open your service's EXE in dependency viewer, you see
wpcap.dll, packet.dll and friends?

I've written a wrapper service around the Windows port of wpa_supplicant
(which uses winpcap), and have run into a few issues with service
dependencies and whatnot with that setup; I would assume the same issues
apply in a case like yours.

What group is your service a member of, if any?  (Your service registry
key can have a Group value, a REG_SZ, but it's not required.  Group
membership defines which services start first, then dependencies within
and outside those groups.)

Have you tried to set the start type on the "NetGroup Packet Filter"
driver to "automatic" or "system"?

This is not needed: the netgroup packet filter (NPF) is started on request 
by packet.dll using OpenService/StartService.

What about the "Network Monitor
driver" driver?  (On 2K Pro, both are shown if you select "View
nonpresent devices" in device manager, then expand "Non-PnP devices".)
NPF is installed by WinPcap to do the kernel side of packet capturing
over NDIS devices, and NM is installed by Microsoft to do the kernel
side of packet capturing over PPP or VPN connections.  WinPcap's DLLs
start NM for sure; I think they also start NPF but I'm not positive on

WinPcap starts NPF automatically, but not NM (it should be started 
automatically by the MS NetMon COM component). It seems that the NetMon 
driver (NM) has some bug (or similar) that causes it to take a *long* time 
to load, causing all these problems. However, I'm still investigating the 

 During boot, this service-start takes a LONG time (more than 30
seconds, in the case of NM, which is long enough for the OS to say "this
service isn't responding" and kill the process).

Is there anything in the system log after the machine boots, to the
effect of your service "failed to respond to a start request"?  That's
the evidence that the above scenario happened.

> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users

More information about the Winpcap-users mailing list