[Winpcap-users] Windows service dependency issue

Bryan Kadzban bryan at kadzban.is-a-geek.net
Sun Oct 29 00:01:56 GMT 2006


shiva ankam wrote:
> I have a service that is using Winpcap 3.1. I added nm (Nework
> Monitor) service to its dependencies so that it will not timeout when
> starting up.

You will need to add "npf" also.  ;-)

> But, this is not even sarting the service on windows versions which
> do not have the 'nm' service (for eg. Windows NT 4.0).

Does winpcap even work on NT4?

Either way, yeah, that makes sense.  If a service doesn't exist, then
any services depending on it won't start.

> Is there any known workaround for this issue?

I'd just skip adding nm to the dependency list if
HKLM\SYSTEM\CurrentControlSet\Services\nm (the service key for nm)
doesn't exist at install time.

> Is there anyway I can get around this whole dependency issue?

Not using winpcap in a service, or using a version that doesn't support
PPP/VPN devices, is the only way I can think of.

In order to use winpcap, the winpcap driver *MUST* be loaded.  Services
and drivers both act the same way; you can't load one while another is
starting.  So you have to make your service depend on npf; there's no
no way around that.  (Of course, npf will always exist, so you won't
have that problem with it.)

Now, nm is required for PPP/VPN support; there's no other way to do
that.  And current winpcap binaries always load the DLL that tries to
start the nm driver.  You could change the sources so they don't load
that DLL (it's named "npp/ndisnpp.dll", I think), recompile the whole
thing, and use your version instead of the binaries.  Or you could just
check for nm before adding it as a dependency.  That would certainly be
easier.  ;-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://www.winpcap.org/pipermail/winpcap-users/attachments/20061029/d6a7ec6d/signature.pgp


More information about the Winpcap-users mailing list