summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-17 13:34:11 -0700
committerDavid S. Miller <davem@davemloft.net>2011-07-17 23:11:17 -0700
commit8f40b161de4f27402b4c0659ad2ae83fad5a0cdd (patch)
tree9e2dbd4ba8a66916c690b0e5791ac25ea0958c26 /include
parent69ecca86da4890c13a5e29c51b4ac76a1a8a62c9 (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')
-rw-r--r--include/net/neighbour.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 334e92f95bb..4ba8521490b 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -109,7 +109,7 @@ struct neighbour {
seqlock_t ha_lock;
unsigned char ha[ALIGN(MAX_ADDR_LEN, sizeof(unsigned long))];
struct hh_cache hh;
- int (*output)(struct sk_buff *skb);
+ int (*output)(struct neighbour *, struct sk_buff *);
const struct neigh_ops *ops;
struct rcu_head rcu;
struct net_device *dev;
@@ -118,10 +118,10 @@ struct neighbour {
struct neigh_ops {
int family;
- void (*solicit)(struct neighbour *, struct sk_buff*);
- void (*error_report)(struct neighbour *, struct sk_buff*);
- int (*output)(struct sk_buff*);
- int (*connected_output)(struct sk_buff*);
+ void (*solicit)(struct neighbour *, struct sk_buff *);
+ void (*error_report)(struct neighbour *, struct sk_buff *);
+ int (*output)(struct neighbour *, struct sk_buff *);
+ int (*connected_output)(struct neighbour *, struct sk_buff *);
};
struct pneigh_entry {
@@ -203,9 +203,10 @@ extern int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
u32 flags);
extern void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
extern int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
-extern int neigh_resolve_output(struct sk_buff *skb);
-extern int neigh_connected_output(struct sk_buff *skb);
-extern int neigh_compat_output(struct sk_buff *skb);
+extern int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
+extern int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
+extern int neigh_compat_output(struct neighbour *neigh, struct sk_buff *skb);
+extern int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
extern struct neighbour *neigh_event_ns(struct neigh_table *tbl,
u8 *lladdr, void *saddr,
struct net_device *dev);
@@ -348,7 +349,7 @@ static inline int neigh_output(struct neighbour *n, struct sk_buff *skb)
if ((n->nud_state & NUD_CONNECTED) && hh->hh_len)
return neigh_hh_output(hh, skb);
else
- return n->output(skb);
+ return n->output(n, skb);
}
static inline struct neighbour *