This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Support for Linux transparent proxy & asm/types.h


On Thu, 24 Dec 1998 02:10:49 +0100, Andi Kleen wrote:
>On Wed, Dec 23, 1998 at 11:19:17PM +0100, Mark Kettenis wrote:
>> Well your code snippet defenitely doesn't work on my system, since the
>> 2.1.130 header doesn't include <ams/types.h> anymore.
>> The correct code would be:
>> 
>>    #include <sys/socket.h>
>>    nl_socket = socket (PF_NETLINK, ....);
>> 
>> But if the user actually wants to do something useful with the socket
>> he/she probably does need some of the constants in <linux/netlink.h>.
>> We had a <netlink/netlink.h> for a while in glibc, but IIRC it was
>> dropped because the kernel headers were changing too rapidly.  This
>> probably means that it is not worth documenting this (yet).
>
>The netlink interface is frozen for 2.2, please don't spread misinformation.
>It was dropped because the netlink maintainer vetoed an inclusion into glibc
>(because maintaining something in two places is a mainteance nightmare)

Well, if the kernel headers can be made namespace clean, we could have
a wrapper <netlink/netlink.h>.  It looks to me like linux/netlink.h is
safe and linux/rtnetlink.h isn't.  We just need an #ifdef __KERNEL__
around all the structures and #defines that are not relevant to user
space.


>I'll document
>
>#include <asm/types.h>
>#include <linux/netlink.h>
>#include <linux/rtnetlink.h>

Does it work if you substitute sys/types.h for asm/types.h?  (It should.)

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]