[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    re[2]: [Linux-ha-dev] Can you retrieve route information as a normal  user? WAS: [Linux-ha-dev] a "r
From:       Greg Freemyer <freemyer () NorcrossGroup ! com>
Date:       2001-07-26 17:55:26
[Download RAW message or body]

Alan,

I'm no expert on routing from 'c' code, but I just opened Steven's "TCP/IP 
Illustrated Vol. 2".

Chapter 20 is dedicated to "Routing Sockets"

A very brief look shows that from 'c' code, you open a routing socket to the 
kernel, then you can send messages of the form:

RTM_ADD
RTM_DELETE
RTM_GET
RTM_CHANGE
RTM_LOCK

=======
I have never used these, but Steven's has always been my source for TCP/IP  'c' 
programming questions.

Normally what he describes is fairly well available throughout UNIX flavors.


Greg Freemyer
Internet Engineer
Deployment and Integration Specialist
The Norcross Group
www.NorcrossGroup.com
 >>  On Tue, Jul 24, 2001 at 08:34:36PM -0600, Alan Robertson wrote:
 >>  > [Exposing my ignorance]
 >>  > 
 >>  > Is there a nice standard way to do this in 'C'?

 >>  Off the top of my head I don't know but there is discussion of how
 >>  to access routing and interface information in Stephens' 
 >>  "Unix Network Programming".

 >>  Also the "interfaces.c" file in the samba (2.2) source tree has some
 >>  code to retriece interface information on a variety of platforms.

 >>  -- 
 >>  Horms
 >>  _______________________________________________________
 >>  Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
 >>  http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
 >>  Home Page: http://linux-ha.org/






_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic