RE: Default interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





> No. I know Sarada wrote system call. But from the question one could see
> that what was actually being asked was how to find out on which interface
> the default route is. Probably the questioner did not know which ip is
> assigned ti which interface. In which case also ifconfig could do the
> trick.

Well, I used `ioctl' with `SIOCGIFCONF' request to get a list of all
available interfaces and their ip addrs. But I couldnt find any specific
means of finding out which of the interfaces were to take the packets
by default.

I've finally got the info by reading /proc/net/route.
Thanks for all the help.
-Sarada 

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux