<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 href="mailto:hetaozju@gmail.com">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 href="mailto:gianluca.varenni@cacetech.com">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 href="mailto:winpcap-users@winpcap.org">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 href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>&gt; <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">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 href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>&gt; <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">
https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br>&gt;<br>&gt;<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>