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

Tony Yang minsavage at gmail.com
Fri Jul 20 17:01:23 GMT 2007


sorry fo my poor english

"what's the big deal in using the IP helper API instead of these tricks of
calling an external application and parse its output?"

can u explain your words from which last email?
i do not comprehend it


On 7/21/07, Gianluca Varenni <gianluca.varenni at cacetech.com> wrote:
>
>  Uhm, out of curiosity, what's the big deal in using the IP helper API
> instead of these tricks of calling an external application and parse its
> output?
>
> Have a nice day
> GV
>
>
>
>
> ----- Original Message -----
> *From:* Tony Yang <minsavage at gmail.com>
> *To:* winpcap-users at winpcap.org
>  *Sent:* Friday, July 20, 2007 8:41 AM
> *Subject:* Re: [Winpcap-users] How can I get the IP address of
> gatewaythroughWinPcap
>
>
> thank you
> but i used the windows command "ipconfig /all " to obtaine the information
> of gateway
> then redirect the output to the file
> i get the info through reading this file
> although this is not a good way, i think that this is a available one.
>
>
> On 7/20/07, he tao <hetaozju at gmail.com> wrote:
> >
> > 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
> > >
> > >
> > _______________________________________________
> > 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
>
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20070720/e46550ab/attachment-0001.htm


More information about the Winpcap-users mailing list