<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>