From: Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
<b.a.t.m.a.n@lists.open-mesh.org>
Subject: Re: [B.A.T.M.A.N.] [PATCHv2 7/7] batman-adv: add Distributed ARP Table compile option
Date: Tue, 15 Nov 2011 21:27:23 +0100 [thread overview]
Message-ID: <20111115202723.GA619@pandem0nium> (raw)
In-Reply-To: <1320752062-21776-8-git-send-email-ordex@autistici.org>
[-- Attachment #1: Type: text/plain, Size: 3190 bytes --]
On Tue, Nov 08, 2011 at 12:34:22PM +0100, Antonio Quartulli wrote:
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> Makefile.kbuild | 8 +++++++-
> README | 4 ++++
> distributed-arp-table.h | 12 ++++++++++++
> 3 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile.kbuild b/Makefile.kbuild
> index e8861cb..f09004f 100644
> --- a/Makefile.kbuild
> +++ b/Makefile.kbuild
> @@ -18,6 +18,8 @@
> # 02110-1301, USA
> #
>
> +# uncomment the following line to enable the Distributed ARP Table feature
> +# CONFIG_BATMAN_ADV_DAT=y
>
>
> # openwrt integration
> @@ -27,6 +29,10 @@ endif
>
> # ccflags-y += -DCONFIG_BATMAN_ADV_DEBUG
>
> +ifeq ($(CONFIG_BATMAN_ADV_DAT), y)
> +ccflags-y += -DCONFIG_BATMAN_ADV_DAT
> +endif
> +
> ifneq ($(REVISION),)
> ccflags-y += -DSOURCE_VERSION=\"$(REVISION)\"
> endif
> @@ -36,7 +42,7 @@ batman-adv-y += bat_debugfs.o
> batman-adv-y += bat_iv_ogm.o
> batman-adv-y += bat_sysfs.o
> batman-adv-y += bitarray.o
> -batman-adv-y += distributed-arp-table.o
> +batman-adv-$(CONFIG_BATMAN_ADV_DAT) += distributed-arp-table.o
> batman-adv-y += gateway_client.o
> batman-adv-y += gateway_common.o
> batman-adv-y += hard-interface.o
> diff --git a/README b/README
> index 5ba56b5..1a27f9f 100644
> --- a/README
> +++ b/README
> @@ -26,6 +26,10 @@ it. If you work on a backport, feel free to contact us. :-)
> COMPILE
> -------
>
> +Before compiling you want to have a look at the Makefile.kbuild
> +file to enable/disable wanted features. Actually there are:
> +- CONFIG_BATMAN_ADV_DAT enables the Distributed ARP Table
> +
> To compile against your currently installed kernel, just type:
>
> # make
> diff --git a/distributed-arp-table.h b/distributed-arp-table.h
> index d3fb8b1..496b7f3 100644
> --- a/distributed-arp-table.h
> +++ b/distributed-arp-table.h
> @@ -28,6 +28,8 @@
> #define ARP_HW_DST(skb) (ARP_HW_SRC(skb) + ETH_ALEN + 4)
> #define ARP_IP_DST(skb) (*(uint32_t *)(ARP_HW_SRC(skb) + ETH_ALEN * 2 + 4))
>
> +#ifdef CONFIG_BATMAN_ADV_BAT
Took me some time to find this typo :P
please use CONFIG_BATMAN_ADV_DAT, not CONFIG_BATMAN_ADV_BAT or else it won't compile.
> +
> uint16_t arp_get_type(struct bat_priv *bat_priv, struct sk_buff *skb);
> bool arp_snoop_outgoing_request(struct bat_priv *bat_priv,
> struct sk_buff *skb);
> @@ -36,6 +38,16 @@ bool arp_snoop_incoming_request(struct bat_priv *bat_priv,
> bool arp_snoop_outgoing_reply(struct bat_priv *bat_priv, struct sk_buff *skb);
> bool arp_snoop_incoming_reply(struct bat_priv *bat_priv, struct sk_buff *skb);
>
> +#else
> +
> +#define arp_get_type(...) (0)
> +#define arp_snoop_outgoing_request(...) (0)
> +#define arp_snoop_incoming_request(...) (0)
> +#define arp_snoop_outgoing_reply(...)
> +#define arp_snoop_incoming_reply(...)
> +
> +#endif
> +
> /* hash function to choose an entry in a hash table of given size */
> /* hash algorithm from http://en.wikipedia.org/wiki/Hash_table */
> static inline uint32_t hash_ipv4(const void *data, uint32_t size)
> --
> 1.7.3.4
>
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-11-15 20:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-08 11:34 [B.A.T.M.A.N.] [PATCHv2 0/7] DAT: Distributed ARP Table Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 1/7] batman-adv: implement an helper function to forge unicast packets Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 2/7] batman-adv: add a new log level for DAT-ARP debugging Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 3/7] batman-adv: Distributed ARP Table - create the DHT helper functions Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 4/7] batman-adv: Distributed ARP Table - add ARP parsing functions Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 5/7] batman-adv: Distributed ARP Table - add snooping functions for ARP messages Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 6/7] batman-adv: Distributed ARP Table - increase default soft_iface ARP table timeout Antonio Quartulli
2011-11-08 11:34 ` [B.A.T.M.A.N.] [PATCHv2 7/7] batman-adv: add Distributed ARP Table compile option Antonio Quartulli
2011-11-15 20:27 ` Simon Wunderlich [this message]
2011-11-15 20:32 ` Antonio Quartulli
2011-11-21 21:37 ` [B.A.T.M.A.N.] [PATCH] batman-adv: fix two issues in DAT Simon Wunderlich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111115202723.GA619@pandem0nium \
--to=simon.wunderlich@s2003.tu-chemnitz.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).