aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/types.h')
-rw-r--r--net/batman-adv/types.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index b57d93bdafa6..9ed1bb275d31 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -249,9 +249,13 @@ struct batadv_priv_vis {
/**
* struct batadv_priv_dat - per mesh interface DAT private data
* @addr: node DAT address
+ * @hash: hashtable representing the local ARP cache
+ * @work: work queue callback item for cache purging
*/
struct batadv_priv_dat {
batadv_dat_addr_t addr;
+ struct batadv_hashtable *hash;
+ struct delayed_work work;
};
struct batadv_priv {
@@ -465,6 +469,25 @@ struct batadv_algo_ops {
};
/**
+ * struct batadv_dat_entry - it is a single entry of batman-adv ARP backend. It
+ * is used to stored ARP entries needed for the global DAT cache
+ * @ip: the IPv4 corresponding to this DAT/ARP entry
+ * @mac_addr: the MAC address associated to the stored IPv4
+ * @last_update: time in jiffies when this entry was refreshed last time
+ * @hash_entry: hlist node for batadv_priv_dat::hash
+ * @refcount: number of contexts the object is used
+ * @rcu: struct used for freeing in an RCU-safe manner
+ */
+struct batadv_dat_entry {
+ __be32 ip;
+ uint8_t mac_addr[ETH_ALEN];
+ unsigned long last_update;
+ struct hlist_node hash_entry;
+ atomic_t refcount;
+ struct rcu_head rcu;
+};
+
+/**
* struct batadv_dat_candidate - candidate destination for DAT operations
* @type: the type of the selected candidate. It can one of the following:
* - BATADV_DAT_CANDIDATE_NOT_FOUND