ip_route_output wierdness

From: Akshay Adhikari (vakshay2000@yahoo.com)
Date: Wed Jul 11 2001 - 10:30:03 EST


Hello,

I ran into some trouble using ip_route_output - here's
the problem -

I create an skb from scratch (in a kernel module), and

1)set

__u32 saddr = 0xc0a80102 (192.168.1.2), or 0
__u32 daddr = 0xc0a80305 (192.168.3.5)

2) delare a struct rtable *rt,

and call

ip_route_output (&rt, daddr, saddr, tos = 0, oif = 0);

The function returns me a route, but when I print out
rt->rt_gateway, rt->rt_src, and rt->rt_dst, its a
mess.

rt->rt_gateway is set to 1, rt->rt_dst is set to 2,
and
rt_src is set to 192.168.3.5 (daddr).

If I set saddr to 0 in the ip_route_output call, it
returns me EINVAL.

Am I doing something wrong here? Or is ip_route_output
the wrong call to use?

What I want to do is,
create an skb from scratch, and send it out to daddr
(saddr is irrelevant), after resolving a route to it.

TIA,
akshay

 

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org



This archive was generated by hypermail 2b29 : Sun Jul 15 2001 - 21:00:25 EST