I ran into some trouble using ip_route_output - here's
the problem -
I create an skb from scratch (in a kernel module), and
__u32 saddr = 0xc0a80102 (192.168.1.2), or 0
__u32 daddr = 0xc0a80305 (192.168.3.5)
2) delare a struct rtable *rt,
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
rt->rt_gateway is set to 1, rt->rt_dst is set to 2,
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.
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to email@example.com
This archive was generated by hypermail 2b29 : Sun Jul 15 2001 - 21:00:25 EST