batman-adv: Distributed ARP Table - create DHT helper functions

Add all the relevant functions in order to manage a Distributed Hash Table over
the B.A.T.M.A.N.-adv network. It will later be used to store several ARP entries
and implement DAT (Distributed ARP Table)

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
This commit is contained in:
Antonio Quartulli
2011-11-23 11:35:44 +01:00
parent 0e861a3c4f
commit 785ea11441
9 changed files with 378 additions and 4 deletions

View File

@@ -18,6 +18,7 @@
*/
#include "main.h"
#include "distributed-arp-table.h"
#include "hard-interface.h"
#include "soft-interface.h"
#include "send.h"
@@ -109,6 +110,8 @@ static void batadv_primary_if_update_addr(struct batadv_priv *bat_priv,
if (!primary_if)
goto out;
batadv_dat_init_own_addr(bat_priv, primary_if);
skb = bat_priv->vis.my_info->skb_packet;
vis_packet = (struct batadv_vis_packet *)skb->data;
memcpy(vis_packet->vis_orig, primary_if->net_dev->dev_addr, ETH_ALEN);