[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1358405953.2547.3.camel@cr0>
Date: Thu, 17 Jan 2013 14:59:13 +0800
From: Cong Wang <amwang@...hat.com>
To: Jike Song <albcamus@...il.com>
Cc: David Miller <davem@...emloft.net>, vapier@...too.org,
bhutchings@...arflare.com, libc-alpha@...rceware.org,
yoshfuji@...ux-ipv6.org, tmb@...eia.org, eblake@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
libvirt-list@...hat.com, tgraf@...g.ch, schwab@...e.de,
carlos@...temhalted.org
Subject: Re: Redefinition of struct in6_addr in <netinet/in.h> and
<linux/in6.h>
On Thu, 2013-01-17 at 11:55 +0800, Jike Song wrote:
> On Thu, Jan 17, 2013 at 2:59 AM, David Miller <davem@...emloft.net> wrote:
>
> >
> > When GLIBC doesn't provide it's own definition of some networking
> > macros or interfaces that the kernel provides, people include the
> > kernel header.
> >
>
> Recently I got a problem when copying a structure from kernel to userspace,
> after debugging I found:
>
> kernel: include/linux/inet.h
>
> #define INET6_ADDRSTRLEN (48)
>
> glibc: /usr/include/netinet/in.h
>
> #define INET6_ADDRSTRLEN 46
>
>
> Any reason to differentiate them from each other?
>
I see no reason, even although I don't know why it is 46 instead of 40.
But include/linux/inet.h is not exported to user-space, AFAIK.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists