[Winpcap-users] How can I get the IP address of gateway throughWinPcap

he tao hetaozju at gmail.com
Fri Jul 20 04:29:56 GMT 2007


Agreed. Also the ip of gateway can be read from registry
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{64B3C6C6-A3C4-4293-AC98-5BF7C17B467D}]\DefaultGateway
(DHCPDefaultGateway if dhcp enabled)
{64B3C6C6-A3C4-4293-AC98-5BF7C17B467D} can be get by parsing the
device name of pcap_t. I was doing like this because I don't want to
download win platform sdk:-)

On 7/20/07, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
>
> Tony,
>
> there's no API in WinPcap to obtain the gateway of an interface. You
> probably need to use the IP helper API to obtain such information. In
> particular, I think you need to use the Win32 function GetAdaptersInfo.
>
> Hope it helps
> GV
>
>
> ----- Original Message -----
>
> From: Tony Yang
> To: winpcap-users at winpcap.org
> Sent: Monday, July 16, 2007 11:50 PM
> Subject: [Winpcap-users] How can I get the IP address of gateway
> throughWinPcap
>
> How can I get the IP address of gateway through WinPcap
> thanks very much
>
> ________________________________
>
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
>
>
> _______________________________________________
> 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