Converting rt_key(2.4) to flowi (2.6)
From: Morfean (vinayvinay_at_gmail.com)
Date: 02/15/05
- Next message: Kasper Dupont: "Re: ANOUNCEMENT: zsplit, unzsplit: free linux tools to make a full drive image backup!"
- Previous message: Johnny Choque: "IOCTL kernel 2.6"
- Next in thread: devesh: "Re: Converting rt_key(2.4) to flowi (2.6)"
- Reply: devesh: "Re: Converting rt_key(2.4) to flowi (2.6)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 15 Feb 2005 03:14:19 -0800
Hi,
I am trying to port a networking protocol from kernel 2.4 to 2.6. I
couldn't figure out the equivalent of struct rt_key in 2.6.
struct rtable *rt;
code in 2.4:
struct rt_key key = { dst:dst,
src:src,
oif:skb->sk ? skb->sk->bound_dev_if : 0,
tos:RT_TOS(iph->tos)|RTO_CONN,
};
code in 2.6 that I tried:
struct flowi key = {
.oif = sk? sk->sk_bound_dev_if:0,
.nl_u = { .ip4_u =
{ .daddr = dst,
.tos=RT_TOS(iph->tos)|RTO_CONN,
.saddr = src,
.scope = RT_SCOPE_UNIVERSE,
}
}
};
flowi has the ip address of the next hop machine. After this
ip_route_output_key(&rt, &key) is called, which is expected to fill in
the dst structure in 'rt'. But ip_route_output_key fails. It returns
-22. Could you please tell me what the problem is? Any help will be
appreciated.
Regards,
Vinay
- Next message: Kasper Dupont: "Re: ANOUNCEMENT: zsplit, unzsplit: free linux tools to make a full drive image backup!"
- Previous message: Johnny Choque: "IOCTL kernel 2.6"
- Next in thread: devesh: "Re: Converting rt_key(2.4) to flowi (2.6)"
- Reply: devesh: "Re: Converting rt_key(2.4) to flowi (2.6)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|