<div><font style="BACKGROUND-COLOR: #ffffff">i get the mac address by means of&nbsp;&nbsp;<font color="#800080" size="2">GetAdaptersInfo through studying the example of WiinPcap.</font></font></div>
<div><font style="BACKGROUND-COLOR: #ffffff"><font color="#800080" size="2">But can you tell me how to do it for geting the ip of gateway.</font></font></div>
<div><font color="#800080" size="2">thank you </font><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/21/07, <b class="gmail_sendername"><a href="mailto:Steighton_Haley@mcafee.com">Steighton_Haley@mcafee.com</a></b> &lt;<a href="mailto:Steighton_Haley@mcafee.com">Steighton_Haley@mcafee.com
</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><span><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><font face="Arial" color="#800080" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Arial" color="#800080" size="2">You could use the function GetAdaptersInfo which gives you information about the adapter, all of it&#39;s IP address, and all of it&#39;s gateway information.
</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#800080" size="2"></font></span>&nbsp;</div>
<div dir="ltr" align="left"><span><font face="Arial" color="#800080" size="2">Try that instead of this writing to a file kludge.</font></span></div>
<div>&nbsp;</div>
<p><font size="2">---<br>Steighton Haley&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:shaley@mcafee.com" target="_blank">shaley@mcafee.com</a><br>Software Engineer<br><br>
&quot;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 ...&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- John Simon&nbsp; </font></p>
<div>&nbsp;</div><br>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #800080 2px solid; MARGIN-RIGHT: 0px">
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:winpcap-users-bounces@winpcap.org" target="_blank">winpcap-users-bounces@winpcap.org</a> [mailto:<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:winpcap-users-bounces@winpcap.org" target="_blank">
winpcap-users-bounces@winpcap.org</a>] <b>On Behalf Of </b>Tony Yang<br><b>Sent:</b> Friday, July 20, 2007 10:01 AM<span class="q"><br><b>To:</b> <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:winpcap-users@winpcap.org" target="_blank">
winpcap-users@winpcap.org</a><br></span>
<div><span class="e" id="q_113e4ea05cae4dcd_2"><b>Subject:</b> Re: [Winpcap-users] How can I get the IP address ofgatewaythroughWinPcap<br></span></div></font><br>&nbsp;</div>
<div><span class="e" id="q_113e4ea05cae4dcd_4">
<div></div>
<div>sorry fo my poor english</div>
<div>&nbsp;</div>
<div>&quot;<font size="2">what&#39;s the big deal in using the IP helper API instead of these tricks of calling an external application and parse its output?</font>&quot;</div>
<div>&nbsp;</div>
<div>can u explain your words from which last email?</div>
<div>i do not comprehend it<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 7/21/07, <b class="gmail_sendername">Gianluca Varenni</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gianluca.varenni@cacetech.com" target="_blank">gianluca.varenni@cacetech.com
</a>&gt; 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,&nbsp;out of curiosity, what&#39;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>&nbsp;</div>
<div><font size="2">Have a nice day</font></div><span>
<div><font size="2">GV</font></div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2"></font>&nbsp;</div></span>
<blockquote style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><span>
<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>
<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>&nbsp;</div>
<div>thank you </div>
<div>but i used the windows command &quot;ipconfig /all &quot; to obtaine the&nbsp;information of gateway</div>
<div>then redirect&nbsp;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>&nbsp;</div>
<div><span class="gmail_quote">On 7/20/07, <b class="gmail_sendername">he tao</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:hetaozju@gmail.com" target="_blank">hetaozju@gmail.com</a>&gt; 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&#39;t want to<br>download win platform sdk:-)<br><br>
On 7/20/07, Gianluca Varenni &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gianluca.varenni@cacetech.com" target="_blank">gianluca.varenni@cacetech.com</a>&gt; wrote:<br>&gt;<br>&gt; Tony,<br>
&gt;<br>&gt; there&#39;s no API in WinPcap to obtain the gateway of an interface. You <br>&gt; probably need to use the IP helper API to obtain such information. In<br>&gt; particular, I think you need to use the Win32 function GetAdaptersInfo. 
<br>&gt;<br>&gt; Hope it helps<br>&gt; GV<br>&gt;<br>&gt;<br>&gt; ----- Original Message ----- <br>&gt;<br>&gt; From: Tony Yang<br>&gt; To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:winpcap-users@winpcap.org" target="_blank">
winpcap-users@winpcap.org</a><br>&gt; Sent: Monday, July 16, 2007 11:50 PM<br>&gt; Subject: [Winpcap-users] How can I get the IP address of gateway <br>&gt; throughWinPcap<br>&gt;<br>&gt; How can I get the IP address of gateway through WinPcap 
<br>&gt; thanks very much<br>&gt;<br>&gt; ________________________________<br>&gt;<br>&gt;<br>&gt; _______________________________________________ <br>&gt; Winpcap-users mailing list<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Winpcap-users@winpcap.org" target="_blank">
Winpcap-users@winpcap.org</a><br>&gt; <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>&gt;<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>&gt; Winpcap-users mailing list<br>&gt; <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Winpcap-users@winpcap.org" target="_blank">
Winpcap-users@winpcap.org</a><br>&gt; <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>&gt;<br>&gt;<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><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>
<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" 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></blockquote></div><br></span></div></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>