kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* ipv6 address comparison
@ 2012-07-21 12:02 Arif Hossain
  2012-07-21 12:23 ` Tobias Boege
       [not found] ` <alpine.DEB.2.02.1207211535300.32697@aurora.sdinet.de>
  0 siblings, 2 replies; 3+ messages in thread
From: Arif Hossain @ 2012-07-21 12:02 UTC (permalink / raw)
  To: kernelnewbies

Hi,

My module uses ipv6_addr_cmp() from <linux/ipv6.h>. 

<linux/ipv6.h>
static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct
in6_addr *a2)
{
	return memcmp(a1, a2, sizeof(struct in6_addr));
}

I've included <linux/ipv6.h>. But when i try to build the module i get
following error:

net/netfilter/xt_ipaddr.c:81: error: implicit declaration of function
?ipv6_addr_cmp?

Although before the call to ipv6_addr_cmp, i have a casting to struct
ipv6hdr *iph. So the definitions from ipv6.h should be available to my
module.

cheers.
aft

^ permalink raw reply	[flat|nested] 3+ messages in thread

* ipv6 address comparison
  2012-07-21 12:02 ipv6 address comparison Arif Hossain
@ 2012-07-21 12:23 ` Tobias Boege
       [not found] ` <alpine.DEB.2.02.1207211535300.32697@aurora.sdinet.de>
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Boege @ 2012-07-21 12:23 UTC (permalink / raw)
  To: kernelnewbies

On Sat, 21 Jul 2012, Arif Hossain wrote:
> Hi,
> 
> My module uses ipv6_addr_cmp() from <linux/ipv6.h>. 
> 
> <linux/ipv6.h>
> static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct
> in6_addr *a2)
> {
> 	return memcmp(a1, a2, sizeof(struct in6_addr));
> }
> 
> I've included <linux/ipv6.h>. But when i try to build the module i get
> following error:
> 
> net/netfilter/xt_ipaddr.c:81: error: implicit declaration of function
> ???ipv6_addr_cmp???
> 
> Although before the call to ipv6_addr_cmp, i have a casting to struct
> ipv6hdr *iph. So the definitions from ipv6.h should be available to my
> module.
> 
> cheers.
> aft
> 
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Well, you included <linux/ipv6.h>. Here, the implementation of
ipv6_addr_cmp() is in <net/ipv6.h>.

Regards,
Tobi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* ipv6 address comparison
       [not found] ` <alpine.DEB.2.02.1207211535300.32697@aurora.sdinet.de>
@ 2012-07-21 13:45   ` Arif Hossain
  0 siblings, 0 replies; 3+ messages in thread
From: Arif Hossain @ 2012-07-21 13:45 UTC (permalink / raw)
  To: kernelnewbies

On Sat, 2012-07-21 at 15:36 +0200, Sven-Haegar Koch wrote:
> On Sat, 21 Jul 2012, Arif Hossain wrote:
> 
> > My module uses ipv6_addr_cmp() from <linux/ipv6.h>. 
> > 
> > <linux/ipv6.h>
> > static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct
> > in6_addr *a2)
> > {
> > 	return memcmp(a1, a2, sizeof(struct in6_addr));
> > }
> > 
> > I've included <linux/ipv6.h>. But when i try to build the module i get
> > following error:
> > 
> > net/netfilter/xt_ipaddr.c:81: error: implicit declaration of function
> > ?ipv6_addr_cmp?
> > 
> > Although before the call to ipv6_addr_cmp, i have a casting to struct
> > ipv6hdr *iph. So the definitions from ipv6.h should be available to my
> > module.
> 
> In my 3.2.0 source tree here the definition is in include/net/ipv6.h, 
> not in include/linux/ipv6.h
> 
> c'ya
> sven-haegar
> 
> -- 
> Three may keep a secret, if two of them are dead.
> - Ben F.

Thanks for the reply. Now its working.
cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-21 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21 12:02 ipv6 address comparison Arif Hossain
2012-07-21 12:23 ` Tobias Boege
     [not found] ` <alpine.DEB.2.02.1207211535300.32697@aurora.sdinet.de>
2012-07-21 13:45   ` Arif Hossain

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).