aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/distributed-arp-table.h
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2011-11-06 12:23:55 +0100
committerAntonio Quartulli <ordex@autistici.org>2012-11-07 20:00:22 +0100
commit172244748204c894864def59133d0133ccfabe30 (patch)
tree1fbf50d85f91ae0ef253b2080556b455a28c7789 /net/batman-adv/distributed-arp-table.h
parentbatman-adv: Distributed ARP Table - add snooping functions for ARP messages (diff)
downloadlinux-dev-172244748204c894864def59133d0133ccfabe30.tar.xz
linux-dev-172244748204c894864def59133d0133ccfabe30.zip
batman-adv: Distributed ARP Table - add compile option
This patch makes it possible to decide whether to include DAT within the batman-adv binary or not. It is extremely useful when the user wants to reduce the size of the resulting module by cutting off any not needed feature. 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.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/net/batman-adv/distributed-arp-table.h b/net/batman-adv/distributed-arp-table.h
index 01308cea5b4e..fdb3522ad516 100644
--- a/net/batman-adv/distributed-arp-table.h
+++ b/net/batman-adv/distributed-arp-table.h
@@ -20,6 +20,8 @@
#ifndef _NET_BATMAN_ADV_ARP_H_
#define _NET_BATMAN_ADV_ARP_H_
+#ifdef CONFIG_BATMAN_ADV_DAT
+
#include "types.h"
#include "originator.h"
@@ -72,4 +74,67 @@ int batadv_dat_init(struct batadv_priv *bat_priv);
void batadv_dat_free(struct batadv_priv *bat_priv);
int batadv_dat_cache_seq_print_text(struct seq_file *seq, void *offset);
+#else
+
+static inline bool
+batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
+ struct sk_buff *skb)
+{
+ return false;
+}
+
+static inline bool
+batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
+ struct sk_buff *skb, int hdr_size)
+{
+ return false;
+}
+
+static inline bool
+batadv_dat_snoop_outgoing_arp_reply(struct batadv_priv *bat_priv,
+ struct sk_buff *skb)
+{
+ return false;
+}
+
+static inline bool
+batadv_dat_snoop_incoming_arp_reply(struct batadv_priv *bat_priv,
+ struct sk_buff *skb, int hdr_size)
+{
+ return false;
+}
+
+static inline bool
+batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv,
+ struct batadv_forw_packet *forw_packet)
+{
+ return false;
+}
+
+static inline void
+batadv_dat_init_orig_node_addr(struct batadv_orig_node *orig_node)
+{
+}
+
+static inline void batadv_dat_init_own_addr(struct batadv_priv *bat_priv,
+ struct batadv_hard_iface *iface)
+{
+}
+
+static inline void batadv_arp_change_timeout(struct net_device *soft_iface,
+ const char *name)
+{
+}
+
+static inline int batadv_dat_init(struct batadv_priv *bat_priv)
+{
+ return 0;
+}
+
+static inline void batadv_dat_free(struct batadv_priv *bat_priv)
+{
+}
+
+#endif /* CONFIG_BATMAN_ADV_DAT */
+
#endif /* _NET_BATMAN_ADV_ARP_H_ */