Search Linux Wireless

Re: [PATCH] wireless.h: improve userland include-ability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-06-04 at 14:52 +0100, David Woodhouse wrote:
> On Tue, 2008-06-03 at 12:05 -0700, David Miller wrote:
> > Yeah, go check so me magic userspace tool header to see what magic is
> > needed just to include a core networking header file correctly.
> > 
> > No, thanks.
> 
> Just to clarify: this is only a problem for userspace, and you're
> objecting to that? Just including <linux/wireless.h> within the kernel
> will continue to work.
> 
> We've traditionally got away with saying 'caveat emptor' when userspace
> includes kernel headers -- you _have_ to include the right
> prerequisites, because the kernel doesn't do it for you.

That's true, and several programs do it already.  Changing the includes
would require changes in those programs.  Besides, sys/types.h is still
included, so it's a half-measure.  If we are going to break things,
let's go all the way and disable sys/types.h for userspace, and possibly
some structures that the userspace is not supposed to be using.  But I'm
afraid there is still a lot of stuff the userspace should know,
including IFNAMESIZ.  Alternatively, let's sanitize other headers so
that they can be mixed with libc headers with no consequences.

Hand picking which headers to include in userspace reeks of a hack meant
to satisfy special needs of some userspace software, while risking to
break other userspace code.

Finally, wireless extensions are not under development.  If should be
perfectly safe to take the latest wireless.h, copy it to the userspace
program and rearrange the headers to the heart's content.

> I believe that the main reason for this patch was that <linux/socket.h>
> and <linux/if.h> both have problems when you include them in the same C
> file as the 'proper' glibc equivalent? Is that something we can address,
> instead of just dropping those includes?

I don't see such problems in my software, but if others do, they may be
in a better position to suggest patches.

-- 
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux