ipv6: router reachability probing
[deliverable/linux.git] / include / net / neighbour.h
index ed7eba0452979620353453e160b5f258f38c9cd8..4c09bd23b8329bd2abad4c6e317d54ebba92d8bb 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/skbuff.h>
 #include <linux/rcupdate.h>
 #include <linux/seq_file.h>
+#include <linux/bitmap.h>
 
 #include <linux/err.h>
 #include <linux/sysctl.h>
@@ -81,16 +82,28 @@ struct neigh_parms {
 
        int     reachable_time;
        int     data[NEIGH_VAR_DATA_MAX];
+       DECLARE_BITMAP(data_state, NEIGH_VAR_DATA_MAX);
 };
 
 static inline void neigh_var_set(struct neigh_parms *p, int index, int val)
 {
+       set_bit(index, p->data_state);
        p->data[index] = val;
 }
 
 #define NEIGH_VAR(p, attr) ((p)->data[NEIGH_VAR_ ## attr])
 #define NEIGH_VAR_SET(p, attr, val) neigh_var_set(p, NEIGH_VAR_ ## attr, val)
 
+static inline void neigh_parms_data_state_setall(struct neigh_parms *p)
+{
+       bitmap_fill(p->data_state, NEIGH_VAR_DATA_MAX);
+}
+
+static inline void neigh_parms_data_state_cleanall(struct neigh_parms *p)
+{
+       bitmap_zero(p->data_state, NEIGH_VAR_DATA_MAX);
+}
+
 struct neigh_statistics {
        unsigned long allocs;           /* number of allocated neighs */
        unsigned long destroys;         /* number of destroyed neighs */
@@ -202,6 +215,11 @@ struct neigh_table {
        struct pneigh_entry     **phash_buckets;
 };
 
+static inline int neigh_parms_family(struct neigh_parms *p)
+{
+       return p->tbl->family;
+}
+
 #define NEIGH_PRIV_ALIGN       sizeof(long long)
 #define NEIGH_ENTRY_SIZE(size) ALIGN((size), NEIGH_PRIV_ALIGN)
 
@@ -234,6 +252,7 @@ static inline struct neighbour *neigh_create(struct neigh_table *tbl,
 void neigh_destroy(struct neighbour *neigh);
 int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
 int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags);
+void __neigh_set_probe_once(struct neighbour *neigh);
 void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
 int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
@@ -306,7 +325,7 @@ int neigh_proc_dointvec_ms_jiffies(struct ctl_table *ctl, int write,
                                   size_t *lenp, loff_t *ppos);
 
 int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
-                         char *p_name, proc_handler *proc_handler);
+                         proc_handler *proc_handler);
 void neigh_sysctl_unregister(struct neigh_parms *p);
 
 static inline void __neigh_parms_put(struct neigh_parms *parms)
This page took 0.025366 seconds and 5 git commands to generate.