linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@osg.samsung.com>
To: Alexander Aring <aar@pengutronix.de>, linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, marcel@holtmann.org,
	jukka.rissanen@linux.intel.com, hannes@stressinduktion.org,
	mcr@sandelman.ca, werner@almesberger.net,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	"David S . Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [RFC 09/12] ipv6: export several functions
Date: Fri, 27 May 2016 11:56:42 +0200	[thread overview]
Message-ID: <574819DA.5090002@osg.samsung.com> (raw)
In-Reply-To: <1464031328-17524-10-git-send-email-aar@pengutronix.de>

Hello.

On 23/05/16 21:22, Alexander Aring wrote:
> This patch exports some neighbour discovery functions which can be used
> by 6lowpan neighbour discovery ops functionality then.
>
> Cc: David S. Miller<davem@davemloft.net>
> Cc: Alexey Kuznetsov<kuznet@ms2.inr.ac.ru>
> Cc: James Morris<jmorris@namei.org>
> Cc: Hideaki YOSHIFUJI<yoshfuji@linux-ipv6.org>
> Cc: Patrick McHardy<kaber@trash.net>
> Signed-off-by: Alexander Aring<aar@pengutronix.de>
> ---
>   include/net/addrconf.h |  7 +++++++
>   include/net/ndisc.h    | 12 ++++++++++++
>   net/ipv6/addrconf.c    | 15 +++++++--------
>   net/ipv6/ndisc.c       | 14 +++-----------
>   4 files changed, 29 insertions(+), 19 deletions(-)
>
> diff --git a/include/net/addrconf.h b/include/net/addrconf.h
> index b1774eb..f5d2230 100644
> --- a/include/net/addrconf.h
> +++ b/include/net/addrconf.h
> @@ -97,6 +97,13 @@ void addrconf_leave_solict(struct inet6_dev *idev, const struct in6_addr *addr);
>   void addrconf_add_linklocal(struct inet6_dev *idev,
>   			    const struct in6_addr *addr, u32 flags);
>   
> +void addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
> +				  const struct prefix_info *pinfo,
> +				  struct inet6_dev *in6_dev,
> +				  const struct in6_addr *addr, int addr_type,
> +				  u32 addr_flags, bool sllao, bool tokenized,
> +				  __u32 valid_lft, u32 prefered_lft);
> +
>   static inline int addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
>   {
>   	if (dev->addr_len != ETH_ALEN)
> diff --git a/include/net/ndisc.h b/include/net/ndisc.h
> index e4a711e..c92ebdb 100644
> --- a/include/net/ndisc.h
> +++ b/include/net/ndisc.h
> @@ -53,6 +53,15 @@ enum {
>   
>   #include <net/neighbour.h>
>   
> +/* Set to 3 to get tracing... */
> +#define ND_DEBUG 1
> +
> +#define ND_PRINTK(val, level, fmt, ...)				\
> +do {								\
> +	if (val <= ND_DEBUG)					\
> +		net_##level##_ratelimited(fmt, ##__VA_ARGS__);	\
> +} while (0)
> +
>   struct ctl_table;
>   struct inet6_dev;
>   struct net_device;
> @@ -115,6 +124,9 @@ struct ndisc_options *ndisc_parse_options(const struct net_device *dev,
>   					  u8 *opt, int opt_len,
>   					  struct ndisc_options *ndopts);
>   
> +void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
> +			    int data_len, int pad);
> +
>   /*
>    * Return the padding between the option length and the start of the
>    * link addr.  Currently only IP-over-InfiniBand needs this, although
> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
> index 4506cac..aeea54e 100644
> --- a/net/ipv6/addrconf.c
> +++ b/net/ipv6/addrconf.c
> @@ -2333,14 +2333,12 @@ static bool is_addr_mode_generate_stable(struct inet6_dev *idev)
>   	       idev->addr_gen_mode == IN6_ADDR_GEN_MODE_RANDOM;
>   }
>   
> -static void addrconf_prefix_rcv_add_addr(struct net *net,
> -					 struct net_device *dev,
> -					 const struct prefix_info *pinfo,
> -					 struct inet6_dev *in6_dev,
> -					 const struct in6_addr *addr,
> -					 int addr_type, u32 addr_flags,
> -					 bool sllao, bool tokenized,
> -					 __u32 valid_lft, u32 prefered_lft)
> +void addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev,
> +				  const struct prefix_info *pinfo,
> +				  struct inet6_dev *in6_dev,
> +				  const struct in6_addr *addr, int addr_type,
> +				  u32 addr_flags, bool sllao, bool tokenized,
> +				  __u32 valid_lft, u32 prefered_lft)
>   {
>   	struct inet6_ifaddr *ifp = ipv6_get_ifaddr(net, addr, dev, 1);
>   	int create = 0, update_lft = 0;
> @@ -2430,6 +2428,7 @@ static void addrconf_prefix_rcv_add_addr(struct net *net,
>   		addrconf_verify();
>   	}
>   }
> +EXPORT_SYMBOL_GPL(addrconf_prefix_rcv_add_addr);
>   
>   void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len, bool sllao)
>   {
> diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
> index 99fd53c..d30f241 100644
> --- a/net/ipv6/ndisc.c
> +++ b/net/ipv6/ndisc.c
> @@ -73,15 +73,6 @@
>   #include <linux/netfilter.h>
>   #include <linux/netfilter_ipv6.h>
>   
> -/* Set to 3 to get tracing... */
> -#define ND_DEBUG 1
> -
> -#define ND_PRINTK(val, level, fmt, ...)				\
> -do {								\
> -	if (val <= ND_DEBUG)					\
> -		net_##level##_ratelimited(fmt, ##__VA_ARGS__);	\
> -} while (0)
> -
>   static u32 ndisc_hash(const void *pkey,
>   		      const struct net_device *dev,
>   		      __u32 *hash_rnd);
> @@ -150,8 +141,8 @@ struct neigh_table nd_tbl = {
>   };
>   EXPORT_SYMBOL_GPL(nd_tbl);
>   
> -static void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
> -				   int data_len, int pad)
> +void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
> +			    int data_len, int pad)
>   {
>   	int space = ndisc_opt_addr_space(data_len, pad);
>   	u8 *opt = skb_put(skb, space);
> @@ -170,6 +161,7 @@ static void ndisc_fill_addr_option(struct sk_buff *skb, int type, void *data,
>   	if (space > 0)
>   		memset(opt, 0, space);
>   }
> +EXPORT_SYMBOL_GPL(ndisc_fill_addr_option);
>   
>   static inline void ndisc_dev_fill_addr_option(struct sk_buff *skb, int type,
>   					      const struct net_device *dev)

Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>

regards
Stefan Schmidt

  reply	other threads:[~2016-05-27  9:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 19:21 [RFC 00/12] 6lowpan: introduce 6lowpan-nd Alexander Aring
2016-05-23 19:21 ` [RFC 01/12] 6lowpan: add private neighbour data Alexander Aring
2016-05-23 19:21 ` [RFC 02/12] 6lowpan: add 802.15.4 short addr slaac Alexander Aring
2016-05-23 19:21 ` [RFC 03/12] 6lowpan: remove ipv6 module request Alexander Aring
2016-05-23 19:22 ` [RFC 04/12] ndisc: get rid off dev parameter in ndisc_opt_addr_space Alexander Aring
2016-05-25  5:15   ` YOSHIFUJI Hideaki
2016-05-27 16:56     ` Hannes Frederic Sowa
2016-05-27 18:54       ` Alexander Aring
2016-05-23 19:22 ` [RFC 05/12] ndisc: get rid off dev parameter in ndisc_opt_addr_data Alexander Aring
2016-05-23 19:22 ` [RFC 06/12] ndisc: get rid off dev parameter in ndisc_fill_addr_option Alexander Aring
2016-05-23 19:22 ` [RFC 07/12] addrconf: put prefix address add in an own function Alexander Aring
2016-05-27  9:45   ` Stefan Schmidt
2016-05-27 11:41     ` Alexander Aring
2016-05-27 13:17       ` Stefan Schmidt
2016-05-23 19:22 ` [RFC 08/12] ipv6: introduce neighbour discovery ops Alexander Aring
2016-05-25  5:33   ` YOSHIFUJI Hideaki
2016-05-23 19:22 ` [RFC 09/12] ipv6: export several functions Alexander Aring
2016-05-27  9:56   ` Stefan Schmidt [this message]
2016-05-23 19:22 ` [RFC 10/12] 6lowpan: introduce 6lowpan-nd Alexander Aring
2016-05-27 10:16   ` Stefan Schmidt
2016-05-23 19:22 ` [RFC 11/12] 6lowpan: add support for getting short address Alexander Aring
2016-05-27 10:05   ` Stefan Schmidt
2016-05-27 11:03     ` Alexander Aring
2016-05-27 13:20       ` Stefan Schmidt
2016-05-23 19:22 ` [RFC 12/12] 6lowpan: add support for 802.15.4 short addr handling Alexander Aring
2016-05-25  5:13 ` [RFC 00/12] 6lowpan: introduce 6lowpan-nd YOSHIFUJI Hideaki

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=574819DA.5090002@osg.samsung.com \
    --to=stefan@osg.samsung.com \
    --cc=aar@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=hannes@stressinduktion.org \
    --cc=jmorris@namei.org \
    --cc=jukka.rissanen@linux.intel.com \
    --cc=kaber@trash.net \
    --cc=kernel@pengutronix.de \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=mcr@sandelman.ca \
    --cc=netdev@vger.kernel.org \
    --cc=werner@almesberger.net \
    --cc=yoshfuji@linux-ipv6.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).