Re: Default interface

From: Gigi Sullivan (
Date: Wed Nov 29 2000 - 17:35:29 EST

Aiee :)


On Wed, Nov 29, 2000 at 02:53:23PM +0530, Sarada Seshadri wrote:
> 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.

   Though I never had time to use this, starting by kernel 2.2.X (don't
   know exactly which X) you can get this using netlink socket (AF_NETLINK)

   You should find a description/tutorial at:


      - Unix Network Programming, W. Richard Stevens, 2nd edition, 1st Volume
        ed. Prentice Hall (Well Stevens talked about AF_ROUTE socket that are
        (IIRC) a `special case' (which are supported on BSD kernel too) of the
        more generic netlink socket mechanism (that is Linux specific).

> Thanks for all the help.

   Hope this helps ;)

   BTW would you be so gentle to send me examples about netlink socket if
   you're going to use them, please? :)

> -Sarada

bye bye

                        -- gg sullivan

Lorenzo Cavallaro	`Gigi Sullivan' <>

LibRNet Project Home Page: LibRNet Mailing List:

Until I loved, life had no beauty; I did not know I lived until I had loved. (Theodor Korner) - To unsubscribe from this list: send the line "unsubscribe linux-net" in the body of a message to

This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 21:00:29 EST