netdev
[Top] [All Lists]

Re: [PATCH] IPV6: kill in6_u.u6_addrX

To: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] IPV6: kill in6_u.u6_addrX
From: David Stevens <dlstevens@xxxxxxxxxx>
Date: Wed, 11 Feb 2004 22:03:04 -0800
Cc: davem@xxxxxxxxxx, netdev@xxxxxxxxxxx, netdev-bounce@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <20040212.140022.128605177.yoshfuji@xxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx

> There're still two in6_u.u6_addrX in the tree.
> (I've grep'ed the tree.)

These are in-kernel only, but for application use
RFC 3493 only defines s6_addr (u_char [16]). Assuming
XNS only defines s6_addr and not the others too, then
if we want the in-kernel field names to match the external
field names, and if we want the external field names
to be compliant with other API standards...

Then, don't these names need to start with "_". As #defines,
they pollute the global namespace and don't follow the
naming conventions for public exported symbols. Unless
they've been added in later standards revisions, a
portable program should be able to use a variable name
of "s6_addr32", but can't on Linux.

Not related to what you're trying to fix, and I haven't
checked if more recent standards have defined them, but
if not, me might want to look at changing these to

#define _s6_addr32 _S6_un._s6_u32

[same namespace issue applies to the union tag, too]

+-DLS

<Prev in Thread] Current Thread [Next in Thread>