diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-17 16:34:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-18 02:11:17 -0400 |
commit | 8f40b161de4f27402b4c0659ad2ae83fad5a0cdd (patch) | |
tree | 9e2dbd4ba8a66916c690b0e5791ac25ea0958c26 /include/net | |
parent | 69ecca86da4890c13a5e29c51b4ac76a1a8a62c9 (diff) |
neigh: Pass neighbour entry to output ops.
This will get us closer to being able to do "neigh stuff"
completely independent of the underlying dst_entry for
protocols (ipv4/ipv6) that wish to do so.
We will also be able to make dst entries neigh-less.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/neighbour.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h index 334e92f95bbb..4ba8521490ba 100644 --- a/include/net/neighbour.h +++ b/include/net/neighbour.h | |||
@@ -109,7 +109,7 @@ struct neighbour { | |||
109 | seqlock_t ha_lock; | 109 | seqlock_t ha_lock; |
110 | unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; | 110 | unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))]; |
111 | struct hh_cache hh; | 111 | struct hh_cache hh; |
112 | int (*output)(struct sk_buff *skb); | 112 | int (*output)(struct neighbour *, struct sk_buff *); |
113 | const struct neigh_ops *ops; | 113 | const struct neigh_ops *ops; |
114 | struct rcu_head rcu; | 114 | struct rcu_head rcu; |
115 | struct net_device *dev; | 115 | struct net_device *dev; |
@@ -118,10 +118,10 @@ struct neighbour { | |||
118 | 118 | ||
119 | struct neigh_ops { | 119 | struct neigh_ops { |
120 | int family; | 120 | int family; |
121 | void (*solicit)(struct neighbour *, struct sk_buff*); | 121 | void (*solicit)(struct neighbour *, struct sk_buff *); |
122 | void (*error_report)(struct neighbour *, struct sk_buff*); | 122 | void (*error_report)(struct neighbour *, struct sk_buff *); |
123 | int (*output)(struct sk_buff*); | 123 | int (*output)(struct neighbour *, struct sk_buff *); |
124 | int (*connected_output)(struct sk_buff*); | 124 | int (*connected_output)(struct neighbour *, struct sk_buff *); |
125 | }; | 125 | }; |
126 | 126 | ||
127 | struct pneigh_entry { | 127 | struct pneigh_entry { |
@@ -203,9 +203,10 @@ extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, | |||
203 | u32 flags); | 203 | u32 flags); |
204 | extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); | 204 | extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev); |
205 | extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); | 205 | extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev); |
206 | extern int neigh_resolve_output(struct sk_buff *skb); | 206 | extern int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); |
207 | extern int neigh_connected_output(struct sk_buff *skb); | 207 | extern int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); |
208 | extern int neigh_compat_output(struct sk_buff *skb); | 208 | extern int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb); |
209 | extern int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); | ||
209 | extern struct neighbour *neigh_event_ns(struct neigh_table *tbl, | 210 | extern struct neighbour *neigh_event_ns(struct neigh_table *tbl, |
210 | u8 *lladdr, void *saddr, | 211 | u8 *lladdr, void *saddr, |
211 | struct net_device *dev); | 212 | struct net_device *dev); |
@@ -348,7 +349,7 @@ static inline int neigh_output(struct neighbour *n, struct sk_buff *skb) | |||
348 | if ((n->nud_state & NUD_CONNECTED) && hh->hh_len) | 349 | if ((n->nud_state & NUD_CONNECTED) && hh->hh_len) |
349 | return neigh_hh_output(hh, skb); | 350 | return neigh_hh_output(hh, skb); |
350 | else | 351 | else |
351 | return n->output(skb); | 352 | return n->output(n, skb); |
352 | } | 353 | } |
353 | 354 | ||
354 | static inline struct neighbour * | 355 | static inline struct neighbour * |