<div><font style="BACKGROUND-COLOR: #ffffff">i get the mac address by means of <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> </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> <<a href="mailto:Steighton_Haley@mcafee.com">Steighton_Haley@mcafee.com
</a>> 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> </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's IP address, and all of it's gateway information.
</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#800080" size="2"></font></span> </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> </div>
<p><font size="2">---<br>Steighton Haley <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>
"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 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> </div>
<div><span class="e" id="q_113e4ea05cae4dcd_4">
<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 onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gianluca.varenni@cacetech.com" target="_blank">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>
<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>
<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> </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><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>