does busybox actually support IPv6?

Robert P. J. Day rpjday at mindspring.com
Thu May 18 14:36:25 UTC 2006


On Thu, 18 May 2006, Jason Schoon wrote:

> On 5/18/06, Robert P. J. Day <rpjday at mindspring.com> wrote:
> >
> >
> >   i ask given the following snippets from networking/interface.c:
> >
> > ===========================
> >
> > ...
> >
> > #ifdef CONFIG_FEATURE_IPV6
> > # define HAVE_AFINET6 1           <--  OK ...
> > #else
> > # undef HAVE_AFINET6
> > #endif
> >
> > ...
> >
> > #ifdef KEEP_UNUSED
> >
> > static int flag_unx;
> > static int flag_inet;
> >
> > static struct aftrans_t {
> >         char *alias;
> >         char *name;
> >         int *flag;
> > } aftrans[] = {
> >
> >         {
> >         "ip", "inet", &flag_inet},
> > #ifdef HAVE_AFINET6                <-- ... and ...
> >         {
> >         "ip6", "inet6", &flag_inet6},    <-- hello?
> > #endif
> >         {
> >         "inet", "inet", &flag_inet},
> > #ifdef HAVE_AFINET6
> >         {
> >         "inet6", "inet6", &flag_inet6},
> > #endif
> >         {
> >         "unix", "unix", &flag_unx}, {
> >         "tcpip", "inet", &flag_inet},
> >         {
> >         0, 0, 0}
> > };
> >
> > ...
> > ===========================
> >
> >   notice what's missing?  a definition of "flag_inet6".  wouldn't this
> > be a problem?  or is there something happening here just too tricky
> > for me to appreciate?
> >
> > rday
> >
>
> Our products are now all mandated to support IPv6, and I use it very
> often. I haven't seen any issues currently with Busybox and IPv6.
> I have submitted patches for a few things missing in the past, and
> have a few more pending.
>
> Did you notice that all of that code is wrapped in a #ifdef
> KEEP_UNUSED, so it is not currently active?  (I dislike that name
> greatly BTW, I think wrapping it in an #if 0 or just deleting it
> would be much cleaner, but Manuel may have had his reasons).

i did notice that KEEP_UNUSED test -- i also noticed that it's
exclusive to that single source file interface.c.  i have no real
objection to hanging on to code for future consideration as long as
it's labelled clearly that way (yes, "KEEP_UNUSED" is kind of a lame
name.  how about "IN_PROGRESS"?  or "UNDER_CONSTRUCTION"?  :-)

in any event, i've always felt that even code that is currently
de-activated should still be syntactically and semantically correct as
much as possible.  personally, i'd add that missing definition just
for the fun of it, but that's just me.

rday



More information about the busybox mailing list