aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-07-24 20:01:17 -0400
committerDavid S. Miller <davem@davemloft.net>2011-11-30 18:46:43 -0500
commit1026fec8739663621d64216ba939c23bc1d089b7 (patch)
treed8ba40edf7952d1c2fa2b832fdfceeb537fcb145 /include/net/neighbour.h
parent449fa023bca5b53bd924d91a27ffd34807fdeb80 (diff)
neigh: Create mechanism for generic neigh private areas.
The implementation private sits right after the primary_key memory. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/neighbour.h')
-rw-r--r--include/net/neighbour.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 7ae5acff96e..87c0e5ce649 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -179,6 +179,13 @@ struct neigh_table {
179 struct pneigh_entry **phash_buckets; 179 struct pneigh_entry **phash_buckets;
180}; 180};
181 181
182#define NEIGH_PRIV_ALIGN sizeof(long long)
183
184static inline void *neighbour_priv(const struct neighbour *n)
185{
186 return (char *)n + ALIGN(sizeof(*n) + n->tbl->key_len, NEIGH_PRIV_ALIGN);
187}
188
182/* flags for neigh_update() */ 189/* flags for neigh_update() */
183#define NEIGH_UPDATE_F_OVERRIDE 0x00000001 190#define NEIGH_UPDATE_F_OVERRIDE 0x00000001
184#define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002 191#define NEIGH_UPDATE_F_WEAK_OVERRIDE 0x00000002