LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-01-2004, 03:04 AM   #1
Nalin Gupta
LQ Newbie
 
Registered: Jul 2004
Posts: 1

Rep: Reputation: 0
route table lookup Kernel API ??


hello all,

I need to write a wrapper function to perform route table entries lookup.

The (2.4.18/2.4.24) Linux Machine shall be configured as router.

I have information of few important fields, like
+ Src Address / Dst Address of IPv4 Packets.
+ incoming interface (in_dev)
+ I do not know if I shall need any other field, but saw "tos" was
extremely used.

I need such function, as either I actually do not have IPv4 packet/SKB, or I do not want Linux IP Kernel Layer to process it.

In other word, given such fields, I wish to find out which route table entry qualifies for such query.

So I need
Ques 1 ) some inputs on what shall be best and minimal set of
parameters. Lookup Performance is not needed as of now;
Ques 2) Which function(s) from ipv4/route.c I can use.
I saw
a. inet_rtm_getroute,
b. ip_route_input (_slow)
c. ip_route_output(_slow)
these functions in route.c.
But I am unsure, how to correctly use to implement my wrapper.

any help is most welcomed.

thanks

- nalin
nalingupta2000@yahoo.co.in
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
route table problem fdr Linux - Networking 2 02-07-2004 07:33 PM
how to do route lookup without ifindex wu8xi Programming 0 08-18-2003 12:28 AM
Route table christianj Linux - Networking 3 11-17-2002 08:24 AM
Modify route table juno Linux - General 2 10-05-2002 08:42 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration