diff options
author | Antonio Quartulli <ordex@autistici.org> | 2011-11-06 15:23:55 +0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-11-07 23:00:22 +0400 |
commit | 172244748204c894864def59133d0133ccfabe30 (patch) | |
tree | 1fbf50d85f91ae0ef253b2080556b455a28c7789 /net/batman-adv/types.h | |
parent | c384ea3ec930ef11060a7308fbbd02b4871384f9 (diff) | |
download | linux-172244748204c894864def59133d0133ccfabe30.tar.xz |
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/types.h')
-rw-r--r-- | net/batman-adv/types.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h index 9ed1bb275d31..00d3093f3a9c 100644 --- a/net/batman-adv/types.h +++ b/net/batman-adv/types.h @@ -28,6 +28,8 @@ (ETH_HLEN + max(sizeof(struct batadv_unicast_packet), \ sizeof(struct batadv_bcast_packet))) +#ifdef CONFIG_BATMAN_ADV_DAT + /* batadv_dat_addr_t is the type used for all DHT addresses. If it is changed, * BATADV_DAT_ADDR_MAX is changed as well. * @@ -35,6 +37,8 @@ */ #define batadv_dat_addr_t uint16_t +#endif /* CONFIG_BATMAN_ADV_DAT */ + /** * struct batadv_hard_iface_bat_iv - per hard interface B.A.T.M.A.N. IV data * @ogm_buff: buffer holding the OGM packet @@ -80,7 +84,9 @@ struct batadv_orig_node { uint8_t orig[ETH_ALEN]; uint8_t primary_addr[ETH_ALEN]; struct batadv_neigh_node __rcu *router; /* rcu protected pointer */ +#ifdef CONFIG_BATMAN_ADV_DAT batadv_dat_addr_t dat_addr; +#endif unsigned long *bcast_own; uint8_t *bcast_own_sum; unsigned long last_seen; @@ -252,11 +258,13 @@ struct batadv_priv_vis { * @hash: hashtable representing the local ARP cache * @work: work queue callback item for cache purging */ +#ifdef CONFIG_BATMAN_ADV_DAT struct batadv_priv_dat { batadv_dat_addr_t addr; struct batadv_hashtable *hash; struct delayed_work work; }; +#endif struct batadv_priv { atomic_t mesh_state; @@ -295,7 +303,9 @@ struct batadv_priv { struct batadv_priv_gw gw; struct batadv_priv_tt tt; struct batadv_priv_vis vis; +#ifdef CONFIG_BATMAN_ADV_DAT struct batadv_priv_dat dat; +#endif }; struct batadv_socket_client { |