require kernel module that will read routing table
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > require kernel module that will read routing table




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    require kernel module that will read routing table  
kernel.lover


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-19-05 10:49 PM

Hello all,
I require a kernel module that will print gateway IP addresses in
routing table as well as it should not print Gateways that appear to
be the same interface ip addresses of that linux machine.
e.g. If my eth1 is 172.16.x.x and if same appear in routing
table for any entry having 172.16.x.x as Gateway then it should not
appear in output.





[ Post a follow-up to this message ]



    Re: require kernel module that will read routing table  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-19-05 10:49 PM

In article <1d55641b.0503191040.16906fc4@posting.google.com>,
cranium.2003@gmail.com (kernel.lover) wrote:

> Hello all,
>        I require a kernel module that will print gateway IP addresses in
> routing table as well as it should not print Gateways that appear to
> be the same interface ip addresses of that linux machine.
>          e.g. If my eth1 is 172.16.x.x and if same appear in routing
> table for any entry having 172.16.x.x as Gateway then it should not
> appear in output.

kernel modules don't usually produce output, that's normally done by
user-mode programs that make system calls and then format the output.

So write a program that reads the routing table (look up "routing
sockets" in Unix Network Programming, Vol.1) and the interface table,
and then compares the gateways address of each route with the interfaces
before printing it.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:37 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register