- Vista - Getting IP Address Through NDIS_WAN_LINE_UP
- Posted by Soquel Dude on September 21st, 2007
Hi!
There used to be a way to glean the IP address over a WAN connection through
the ProtocolBuffer field of the NDIS_WAN_LINE_UP structure. For XP and W2K,
ProtocolBuffer pointed to the following opaque structure:
typedef struct _WAN_IP_INFO
{
ULONG AdapterType; // defined below
ULONG SeverData;
ULONG LocalIpAddress;
ULONG IpSubnetMask;
ULONG RemoteIpAddress;
ULONG Unused[2];
} WAN_IP_INFO, *PWAN_IP_INFO;
This has (not surprisingly) changed with Vista. The data referenced through
the ProtocolBuffer field no longer maps to this structure
Does anyone know how an NDIS filter driver can glean the IP address of a WAN
connection? Is it still possible to do this through the NDIS_WAN_LINE_UP
structure?
Thanks!
- Posted by chris.aseltine@gmail.com on September 24th, 2007
On Sep 21, 4:29 pm, "Soquel Dude" <ImInSoq...@nospam.nospam> wrote:
In my NDIS miniport I watch for OID_GEN_NETWORK_LAYER_ADDRESSES. I
have absolutely no idea if this helps you.
- Posted by mirage2k2 on September 26th, 2007
Can you get this information from an ip packet? If you have an IM driver you
will see WAN packet twice - first on the NIC as ip packet containing
encapsulated ip packet and then on the WAN device (NDIS_WAN) as ip packet.
I'm basing this on VPN, the first packet you see is on the NIC and is GRE -
this packet contains ip address of VPN server and contains an encapsulated ip
packet ... which you will see on the WAN device when the system has
un-encapsulated it. The packet on the WAN device might contain the ip
address of a web server if you are browsing the internet via a VPN connection.
Mirage2k2.
"Soquel Dude" wrote:
- Posted by Soquel Dude on October 1st, 2007
This doesn't seem to work. I monitor sets to that OID but I don't see it
over a WAN connection.
<chris.aseltine@gmail.com> wrote in message
news:1190661398.482665.55970@50g2000hsm.googlegrou ps.com...