<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1595" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=000332218-20072007><FONT face=Arial
color=#800080 size=2>What he is saying is that you acknowledge that what you are
doing is not a good way of doing it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=000332218-20072007><FONT face=Arial
color=#800080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=000332218-20072007><FONT face=Arial
color=#800080 size=2>You could use the function GetAdaptersInfo which gives you
information about the adapter, all of it's IP address, and all of it's gateway
information.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=000332218-20072007><FONT face=Arial
color=#800080 size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=000332218-20072007><FONT face=Arial
color=#800080 size=2>Try that instead of this writing to a file
kludge.</FONT></SPAN></DIV>
<DIV> </DIV><!-- Converted from text/plain format -->
<P><FONT size=2>---<BR>Steighton
Haley
shaley@mcafee.com<BR>Software Engineer<BR><BR>"In the beginning was the
word.<BR>But by the time the second word was added to it, There was
trouble.<BR>For with it came syntax
..."<BR>
-- John Simon </FONT></P>
<DIV> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #800080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> winpcap-users-bounces@winpcap.org
[mailto:winpcap-users-bounces@winpcap.org] <B>On Behalf Of </B>Tony
Yang<BR><B>Sent:</B> Friday, July 20, 2007 10:01 AM<BR><B>To:</B>
winpcap-users@winpcap.org<BR><B>Subject:</B> Re: [Winpcap-users] How can I get
the IP address ofgatewaythroughWinPcap<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>sorry fo my poor english</DIV>
<DIV> </DIV>
<DIV>"<FONT size=2>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> </DIV>
<DIV>can u explain your words from which last email?</DIV>
<DIV>i do not comprehend it<BR><BR> </DIV>
<DIV><SPAN class=gmail_quote>On 7/21/07, <B class=gmail_sendername>Gianluca
Varenni</B> <<A
href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</A>>
wrote:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV 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><SPAN class=sg>
<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></SPAN>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><SPAN
class=q>
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial"><B>From:</B> <A
title=minsavage@gmail.com
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:minsavage@gmail.com" target=_blank>Tony Yang</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=winpcap-users@winpcap.org
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:winpcap-users@winpcap.org"
target=_blank>winpcap-users@winpcap.org</A> </DIV></SPAN>
<DIV><SPAN class=e id=q_113e48b2f5f2f83f_4>
<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 onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:hetaozju@gmail.com" target=_blank>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 onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:gianluca.varenni@cacetech.com"
target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:winpcap-users@winpcap.org"
target=_blank>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
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org</A><BR>> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users
</A><BR>><BR>><BR>><BR>>
_______________________________________________<BR>> Winpcap-users
mailing list<BR>> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org</A><BR>> <A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users
</A><BR>><BR>><BR>_______________________________________________<BR>Winpcap-users
mailing list<BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org </A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></BLOCKQUOTE></DIV><BR></SPAN></DIV>
<P>
<HR>
<P></P>_______________________________________________<SPAN
class=q><BR>Winpcap-users mailing list<BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Winpcap-users@winpcap.org"
target=_blank>Winpcap-users@winpcap.org </A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR></SPAN>
<P></P>
<P></P></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Winpcap-users
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org </A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://www.winpcap.org/mailman/listinfo/winpcap-users"
target=_blank>https://www.winpcap.org/mailman/listinfo/winpcap-users</A><BR><BR></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>