The following commit has been merged in the next branch: commit a93ba67e47ca932246ee1b5cfbd8d0e333549a55 Author: Antonio Quartulli ordex@autistici.org Date: Tue Apr 17 13:18:33 2012 +0200
batman-adv: use static inline functions instead of foo(...)
When the DAT component is not built, instead of having fake function like foo(...) we must use a static inline function in order to allow the compiler to check the number of the type of the passed arguments
Signed-off-by: Antonio Quartulli ordex@autistici.org
diff --git a/distributed-arp-table.h b/distributed-arp-table.h index 26b98c0..fcf6c15 100644 --- a/distributed-arp-table.h +++ b/distributed-arp-table.h @@ -88,14 +88,51 @@ static inline void dat_init_own_dht_addr(struct bat_priv *bat_priv,
#else
-#define dat_snoop_outgoing_arp_request(...) (0) -#define dat_snoop_incoming_arp_request(...) (0) -#define dat_snoop_outgoing_arp_reply(...) -#define dat_snoop_incoming_arp_reply(...) (0) -#define dat_drop_broadcast_packet(...) (0) -#define arp_change_timeout(...) -#define dat_init_orig_node_dht_addr(...) -#define dat_init_own_dht_addr(...) +static inline bool dat_snoop_outgoing_arp_request(struct bat_priv *bat_priv, + struct sk_buff *skb) +{ + return false; +} + +static inline bool dat_snoop_incoming_arp_request(struct bat_priv *bat_priv, + struct sk_buff *skb, + int hdr_size) +{ + return false; +} + +static inline bool dat_snoop_outgoing_arp_reply(struct bat_priv *bat_priv, + struct sk_buff *skb) +{ + return false; +} + +static inline bool dat_snoop_incoming_arp_reply(struct bat_priv *bat_priv, + struct sk_buff *skb, + int hdr_size) +{ + return false; +} + +static inline bool dat_drop_broadcast_packet(struct bat_priv *bat_priv, + struct forw_packet *forw_packet) +{ + return false; +} + +static inline void dat_init_orig_node_dht_addr(struct orig_node *orig_node) +{ +} + +static inline void dat_init_own_dht_addr(struct bat_priv *bat_priv, + struct hard_iface *primary_if) +{ +} + +static inline void arp_change_timeout(struct net_device *soft_iface, + const char *name) +{ +}
#endif /* CONFIG_BATMAN_ADV_DAT */