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