diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/net/ip6_route.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/net/ip6_route.h')
-rw-r--r-- | include/net/ip6_route.h | 54 |
1 files changed, 25 insertions, 29 deletions
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index 27d83183e61..5e91b72fc71 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef _NET_IP6_ROUTE_H | 1 | #ifndef _NET_IP6_ROUTE_H |
2 | #define _NET_IP6_ROUTE_H | 2 | #define _NET_IP6_ROUTE_H |
3 | 3 | ||
4 | #define IP6_RT_PRIO_USER 1024 | ||
5 | #define IP6_RT_PRIO_ADDRCONF 256 | ||
6 | |||
4 | struct route_info { | 7 | struct route_info { |
5 | __u8 type; | 8 | __u8 type; |
6 | __u8 length; | 9 | __u8 length; |
@@ -50,25 +53,16 @@ static inline unsigned int rt6_flags2srcprefs(int flags) | |||
50 | return (flags >> 3) & 7; | 53 | return (flags >> 3) & 7; |
51 | } | 54 | } |
52 | 55 | ||
53 | extern void rt6_bind_peer(struct rt6_info *rt, int create); | 56 | extern void rt6_bind_peer(struct rt6_info *rt, |
54 | 57 | int create); | |
55 | static inline struct inet_peer *__rt6_get_peer(struct rt6_info *rt, int create) | ||
56 | { | ||
57 | if (rt6_has_peer(rt)) | ||
58 | return rt6_peer_ptr(rt); | ||
59 | |||
60 | rt6_bind_peer(rt, create); | ||
61 | return (rt6_has_peer(rt) ? rt6_peer_ptr(rt) : NULL); | ||
62 | } | ||
63 | 58 | ||
64 | static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) | 59 | static inline struct inet_peer *rt6_get_peer(struct rt6_info *rt) |
65 | { | 60 | { |
66 | return __rt6_get_peer(rt, 0); | 61 | if (rt->rt6i_peer) |
67 | } | 62 | return rt->rt6i_peer; |
68 | 63 | ||
69 | static inline struct inet_peer *rt6_get_peer_create(struct rt6_info *rt) | 64 | rt6_bind_peer(rt, 0); |
70 | { | 65 | return rt->rt6i_peer; |
71 | return __rt6_get_peer(rt, 1); | ||
72 | } | 66 | } |
73 | 67 | ||
74 | extern void ip6_route_input(struct sk_buff *skb); | 68 | extern void ip6_route_input(struct sk_buff *skb); |
@@ -76,8 +70,6 @@ extern void ip6_route_input(struct sk_buff *skb); | |||
76 | extern struct dst_entry * ip6_route_output(struct net *net, | 70 | extern struct dst_entry * ip6_route_output(struct net *net, |
77 | const struct sock *sk, | 71 | const struct sock *sk, |
78 | struct flowi6 *fl6); | 72 | struct flowi6 *fl6); |
79 | extern struct dst_entry * ip6_route_lookup(struct net *net, | ||
80 | struct flowi6 *fl6, int flags); | ||
81 | 73 | ||
82 | extern int ip6_route_init(void); | 74 | extern int ip6_route_init(void); |
83 | extern void ip6_route_cleanup(void); | 75 | extern void ip6_route_cleanup(void); |
@@ -103,14 +95,14 @@ extern struct rt6_info *rt6_lookup(struct net *net, | |||
103 | 95 | ||
104 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | 96 | extern struct dst_entry *icmp6_dst_alloc(struct net_device *dev, |
105 | struct neighbour *neigh, | 97 | struct neighbour *neigh, |
106 | struct flowi6 *fl6); | 98 | const struct in6_addr *addr); |
107 | extern int icmp6_dst_gc(void); | 99 | extern int icmp6_dst_gc(void); |
108 | 100 | ||
109 | extern void fib6_force_start_gc(struct net *net); | 101 | extern void fib6_force_start_gc(struct net *net); |
110 | 102 | ||
111 | extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, | 103 | extern struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev, |
112 | const struct in6_addr *addr, | 104 | const struct in6_addr *addr, |
113 | bool anycast); | 105 | int anycast); |
114 | 106 | ||
115 | extern int ip6_dst_hoplimit(struct dst_entry *dst); | 107 | extern int ip6_dst_hoplimit(struct dst_entry *dst); |
116 | 108 | ||
@@ -130,12 +122,17 @@ extern int rt6_route_rcv(struct net_device *dev, | |||
130 | u8 *opt, int len, | 122 | u8 *opt, int len, |
131 | const struct in6_addr *gwaddr); | 123 | const struct in6_addr *gwaddr); |
132 | 124 | ||
133 | extern void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu, | 125 | extern void rt6_redirect(const struct in6_addr *dest, |
134 | int oif, u32 mark); | 126 | const struct in6_addr *src, |
135 | extern void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, | 127 | const struct in6_addr *saddr, |
136 | __be32 mtu); | 128 | struct neighbour *neigh, |
137 | extern void ip6_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark); | 129 | u8 *lladdr, |
138 | extern void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk); | 130 | int on_link); |
131 | |||
132 | extern void rt6_pmtu_discovery(const struct in6_addr *daddr, | ||
133 | const struct in6_addr *saddr, | ||
134 | struct net_device *dev, | ||
135 | u32 pmtu); | ||
139 | 136 | ||
140 | struct netlink_callback; | 137 | struct netlink_callback; |
141 | 138 | ||
@@ -147,7 +144,7 @@ struct rt6_rtnl_dump_arg { | |||
147 | 144 | ||
148 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | 145 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); |
149 | extern void rt6_ifdown(struct net *net, struct net_device *dev); | 146 | extern void rt6_ifdown(struct net *net, struct net_device *dev); |
150 | extern void rt6_mtu_change(struct net_device *dev, unsigned int mtu); | 147 | extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); |
151 | extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); | 148 | extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); |
152 | 149 | ||
153 | 150 | ||
@@ -155,8 +152,7 @@ extern void rt6_remove_prefsrc(struct inet6_ifaddr *ifp); | |||
155 | * Store a destination cache entry in a socket | 152 | * Store a destination cache entry in a socket |
156 | */ | 153 | */ |
157 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 154 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
158 | const struct in6_addr *daddr, | 155 | struct in6_addr *daddr, struct in6_addr *saddr) |
159 | const struct in6_addr *saddr) | ||
160 | { | 156 | { |
161 | struct ipv6_pinfo *np = inet6_sk(sk); | 157 | struct ipv6_pinfo *np = inet6_sk(sk); |
162 | struct rt6_info *rt = (struct rt6_info *) dst; | 158 | struct rt6_info *rt = (struct rt6_info *) dst; |
@@ -177,7 +173,7 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | |||
177 | spin_unlock(&sk->sk_dst_lock); | 173 | spin_unlock(&sk->sk_dst_lock); |
178 | } | 174 | } |
179 | 175 | ||
180 | static inline bool ipv6_unicast_destination(const struct sk_buff *skb) | 176 | static inline int ipv6_unicast_destination(struct sk_buff *skb) |
181 | { | 177 | { |
182 | struct rt6_info *rt = (struct rt6_info *) skb_dst(skb); | 178 | struct rt6_info *rt = (struct rt6_info *) skb_dst(skb); |
183 | 179 | ||