<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16481" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>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?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=minsavage@gmail.com href="mailto:minsavage@gmail.com">Tony Yang</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, July 20, 2007 8:41 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] How can I
get the IP address of gatewaythroughWinPcap</DIV>
<DIV><BR></DIV>
<DIV>thank you </DIV>
<DIV>but i used the windows command "ipconfig /all " to obtaine
the information of gateway</DIV>
<DIV>then redirect the output to the file</DIV>
<DIV>i get the info through reading this file</DIV>
<DIV>although this is not a good way, i think that this is a available
one.<BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>On 7/20/07, <B class=gmail_sendername>he tao</B>
<<A href="mailto:hetaozju@gmail.com">hetaozju@gmail.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Agreed.
Also the ip of gateway can be read from
registry<BR>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{64B3C6C6-A3C4-4293-AC98-5BF7C17B467D}]\DefaultGateway
<BR>(DHCPDefaultGateway if dhcp
enabled)<BR>{64B3C6C6-A3C4-4293-AC98-5BF7C17B467D} can be get by parsing
the<BR>device name of pcap_t. I was doing like this because I don't want
to<BR>download win platform sdk:-)<BR><BR>On 7/20/07, Gianluca Varenni
<<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>>
wrote:<BR>><BR>> Tony,<BR>><BR>> there's no API in WinPcap to
obtain the gateway of an interface. You <BR>> probably need to use the IP
helper API to obtain such information. In<BR>> particular, I think you
need to use the Win32 function GetAdaptersInfo.<BR>><BR>> Hope it
helps<BR>> GV<BR>><BR>><BR>> ----- Original Message -----
<BR>><BR>> From: Tony Yang<BR>> To: <A
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A><BR>>
Sent: Monday, July 16, 2007 11:50 PM<BR>> Subject: [Winpcap-users] How
can I get the IP address of gateway <BR>> throughWinPcap<BR>><BR>>
How can I get the IP address of gateway through WinPcap<BR>> thanks very
much<BR>><BR>>
________________________________<BR>><BR>><BR>>
_______________________________________________ <BR>> Winpcap-users
mailing list<BR>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>
<A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users
</A><BR>><BR>><BR>><BR>>
_______________________________________________<BR>> Winpcap-users
mailing list<BR>> <A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</A><BR>>
<A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR>><BR>><BR>_______________________________________________<BR>Winpcap-users
mailing list<BR><A
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org </A><BR><A
href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>