public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
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 1/3] batman-adv: Multicast Listener Announcements via Translation Table
Date: Tue, 28 May 2013 17:26:14 +0200	[thread overview]
Message-ID: <20130528152614.GA14466@pandem0nium> (raw)
In-Reply-To: <1369382549-8787-2-git-send-email-linus.luessing@web.de>

[-- Attachment #1: Type: text/plain, Size: 3186 bytes --]

On Fri, May 24, 2013 at 10:02:26AM +0200, Linus Lüssing wrote:
> With this patch a node which has no bridge interface on top of its soft
> interface announces its local multicast listeners via the translation
> table.
> 
> Signed-off-by: Linus Lüssing <linus.luessing@web.de>
> ---
>  Makefile               |    2 +
>  Makefile.kbuild        |    1 +
>  compat.c               |   21 +++++
>  compat.h               |   18 ++++
>  gen-compat-autoconf.sh |    1 +
>  main.c                 |    6 ++
>  main.h                 |    9 ++
>  multicast.c            |  213 ++++++++++++++++++++++++++++++++++++++++++++++++
>  multicast.h            |   43 ++++++++++
>  soft-interface.c       |    3 +
>  sysfs.c                |    6 ++
>  translation-table.c    |   22 ++++-
>  types.h                |   12 +++
>  13 files changed, 353 insertions(+), 4 deletions(-)
>  create mode 100644 multicast.c
>  create mode 100644 multicast.h
> 
> diff --git a/Makefile b/Makefile
> index 407cdc4..d7c6fa6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -27,6 +27,8 @@ export CONFIG_BATMAN_ADV_BLA=y
>  export CONFIG_BATMAN_ADV_DAT=y
>  # B.A.T.M.A.N network coding (catwoman):
>  export CONFIG_BATMAN_ADV_NC=n
> +# B.A.T.M.A.N. multicast optimizations:
> +export CONFIG_BATMAN_ADV_MCAST_OPTIMIZATIONS=y
>  
>  PWD:=$(shell pwd)
>  KERNELPATH ?= /lib/modules/$(shell uname -r)/build
> diff --git a/Makefile.kbuild b/Makefile.kbuild
> index 8ddbfe6..d3efe3a 100644
> --- a/Makefile.kbuild
> +++ b/Makefile.kbuild
> @@ -38,3 +38,4 @@ batman-adv-y += soft-interface.o
>  batman-adv-y += sysfs.o
>  batman-adv-y += translation-table.o
>  batman-adv-y += unicast.o
> +batman-adv-$(CONFIG_BATMAN_ADV_MCAST_OPTIMIZATIONS) += multicast.o
> diff --git a/compat.c b/compat.c
> index 1f3a39d..27df197 100644
> --- a/compat.c
> +++ b/compat.c
> @@ -25,6 +25,27 @@
>  #include <linux/version.h>
>  #include "main.h"
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 38)
> +
> +void batadv_for_each_pmc_rcu_init(struct in_device *in_dev,
> +				  struct ip_mc_list **pmc)
> +{
> +	read_lock(&in_dev->mc_list_lock);
> +	*pmc = in_dev->mc_list;
> +}
> +
> +bool batadv_for_each_pmc_rcu_check(struct in_device *in_dev,
> +				   struct ip_mc_list *pmc)
> +{
> +	if (pmc == NULL)
> +		read_unlock(&in_dev->mc_list_lock);
> +
> +	return (pmc != NULL);
> +}
> +
> +#endif /* < KERNEL_VERSION(2, 6, 38) */


I guess there is some more compat code required here.

For kernel 2.6.32 I get

compat.h:159:14: warning: ‘struct ip_mc_list’ declared inside parameter list [enabled by default]
compat.h:159:14: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
compat.h:159:14: warning: ‘struct in_device’ declared inside parameter list [enabled by default]
compat.h:161:15: warning: ‘struct ip_mc_list’ declared inside parameter list [enabled by default]
compat.h:161:15: warning: ‘struct in_device’ declared inside parameter list [enabled by default]

Am I missing config options? These structs are defined in linux/igmp.h though ...

Cheers,
	Simon

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-05-28 15:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24  8:02 [B.A.T.M.A.N.] Basic Multicast Optimizations Linus Lüssing
2013-05-24  8:02 ` [B.A.T.M.A.N.] [PATCHv2 1/3] batman-adv: Multicast Listener Announcements via Translation Table Linus Lüssing
2013-05-28 15:26   ` Simon Wunderlich [this message]
2013-05-24  8:02 ` [B.A.T.M.A.N.] [PATCHv2 2/3] batman-adv: Announce new capability via multicast TVLV Linus Lüssing
2013-05-28 15:31   ` Simon Wunderlich
2013-05-24  8:02 ` [B.A.T.M.A.N.] [PATCHv2 3/3] batman-adv: Modified forwarding behaviour for multicast packets Linus Lüssing
2013-05-28 15:40   ` Simon Wunderlich
2013-05-28 16:39     ` Marek Lindner
2013-05-28 16:42       ` Antonio Quartulli
2013-05-24  9:00 ` [B.A.T.M.A.N.] Basic Multicast Optimizations Linus Lüssing
2013-05-24  9:06   ` Antonio Quartulli
2013-05-24  9:33 ` Marek Lindner

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=20130528152614.GA14466@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