diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-06-25 21:37:18 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-11-07 14:00:21 -0500 |
commit | c384ea3ec930ef11060a7308fbbd02b4871384f9 (patch) | |
tree | 14764f1a722c0a5633aa9dc5cebc19081703d446 /net/batman-adv/distributed-arp-table.h | |
parent | 5c3a0e5535933349a5d6e6bc8b704e0611f21d3f (diff) |
batman-adv: Distributed ARP Table - add snooping functions for ARP messages
In case of an ARP message going in or out the soft_iface, it is intercepted and
a special action is performed. In particular the DHT helper functions previously
implemented are used to store all the ARP entries belonging to the network in
order to provide a fast and unicast lookup instead of the classic broadcast
flooding mechanism.
Each node stores the entries it is responsible for (following the DHT rules) in
its soft_iface ARP table. This makes it possible to reuse the kernel data
structures and functions for ARP management.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/distributed-arp-table.h')
-rw-r--r-- | net/batman-adv/distributed-arp-table.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/batman-adv/distributed-arp-table.h b/net/batman-adv/distributed-arp-table.h index f4e282a6e634..01308cea5b4e 100644 --- a/net/batman-adv/distributed-arp-table.h +++ b/net/batman-adv/distributed-arp-table.h | |||
@@ -27,6 +27,17 @@ | |||
27 | 27 | ||
28 | #define BATADV_DAT_ADDR_MAX ((batadv_dat_addr_t)~(batadv_dat_addr_t)0) | 28 | #define BATADV_DAT_ADDR_MAX ((batadv_dat_addr_t)~(batadv_dat_addr_t)0) |
29 | 29 | ||
30 | bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv, | ||
31 | struct sk_buff *skb); | ||
32 | bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv, | ||
33 | struct sk_buff *skb, int hdr_size); | ||
34 | void batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv, | ||
35 | struct sk_buff *skb); | ||
36 | bool batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv, | ||
37 | struct sk_buff *skb, int hdr_size); | ||
38 | bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv, | ||
39 | struct batadv_forw_packet *forw_packet); | ||
40 | |||
30 | /** | 41 | /** |
31 | * batadv_dat_init_orig_node_addr - assign a DAT address to the orig_node | 42 | * batadv_dat_init_orig_node_addr - assign a DAT address to the orig_node |
32 | * @orig_node: the node to assign the DAT address to | 43 | * @orig_node: the node to assign the DAT address to |