DHCP comiling issues under sparc linux

From: Leif Sawyer (lsawyer@gci.com)
Date: Tue May 01 2001 - 18:14:38 EST


Below is the end of a thread between myself and Ted Lemon
regarding building DHCP under Sparc Linux.

I'm not well versed in parsing the kernel code to know
what the subtle differences in the different implementations
of this IOCtl, and am looking for some guidance from the
appropriate maintainers.

Please read below for the summary. I'll be happy to fill
in the blanks off-list.

Thanks,
Leif

-----Original Message-----
Ted Lemon responds to:
> Leif Sawyer who wrote:
> Under Kernel 2.4.3, at least for Sparc64, the following
> define in includes/cf/linux.h creates the problem:
>
> 154: #define SIOCGIFCONF_NULL_BUF_GIVES_CORRECT_LEN
>
> undef'ing this out allows the server to build correctly
> and initialize properly.
>
> #if !(defined(__sparc__) && (LINUX_MAJOR >= 2 && LINUX_MINOR >= 4))
> #define SIOCGIFCONF_NULL_BUF_GIVES_CORRECT_LEN
> #endif

Hm. So Linux 2.4 on Sparc provides a different API than Linux 2.4 on
Intel. That's lame.

But I would like to think that this would be considered a bug, and
therefore fixed.

> I'll try this on my i386 box at home and see if it compiles correctly
> as well. That won't be until late tonight, if i'm lucky.

Cool, thanks. The code *should* work unmodified on Linux 2.4/i386.
Really, it should work for the sparc version as well - I don't suppose
I could talk you into reporting this to the Linux/sparc people as a
bug?

The deal is that you're supposed to be able to call SIOCGIFCONF with a
length of zero, and SIOCGIFCONF will return the length of the buffer
needed to record all the interface configuration information, and then
you allocate a buffer that size and call SIOCGIFCONF again. This
supposedly works on 2.4 for intel, and on 2.2 for intel, so it makes
sense that it should work on 2.2 and 2.4 for sparc as well. :'}

                               _MelloN_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:11 EST