Re: Gateway..skbuff

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

 



On Thu, Nov 21, 2002 at 08:30:59PM -0800, paridhi bansal wrote:
> How can i get the default gateway of a particular
> interface through my C code?

"Default gateway of a particular interface"?

To my knowledge, there is no such thing. A machine typically has only
one default gateway. Other gateways, such as ppp links, are handled a
little differently.

> Is there some ioctl flag for that or there is some other wya to do
> that??

SIOC...something or other. Or netlink. Find the source for the ip(8)
tool (typically located in an iputils package of some sort) and read it
to discover how it interfaces with the kernel's networking layer. The
LARTC HOWTO has details on using ip(8).

-- 
Nothing says, "Superpower" like bombing a country that is poor and
hungry. -- Ken Brush

Attachment: pgp00219.pgp
Description: PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux