Ethereal-dev: Re: [ethereal-dev] Ethereal Win32 libpcap patch.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 3 Feb 2000 01:02:16 -0800
> Is there no way to
> dredge out of the registry, or out of the SNMPish database NDIS drivers
> provide, the *real* netmask of the interface?

There is a way.

If the interface's name is XXX (which shows up in one of the registry
keys - "Bind", or "Bindings", or something such as that - for the
packet-capture-driver service, albeit with "\Device\" in front of it),
then

	\HKLM\SYSTEM\CurrentControlSet\Services\XXX\Parameters\TcpIp

has in it "IPAddress" and "SubnetMask", both of which are REG_MULTI_SZ
strings containing, I presume, lists of IP addresses and corresponding
subnet masks for the interface, in dotted-quad string format.

I may look at making the Politecnico "pcap_lookupnet()" use that at some
point.