[PATCH] 2.6.3 very small patch: libc compatibility for skbuff.h (userspace access to sk_buffs)

From: wdebruij
Date: Thu Mar 04 2004 - 07:51:06 EST


hi,

for a network monitoring application I needed access to sk_buff's from
userspace. The current linux/skbuff.h headerfile cannot be included from
userspace applications due to various kernel .h vs. libc .h clashes.

I basically pruned the #include statements by inserting #ifdef _KERNEL__
statements until gcc started complaining. Therefore nothing has changed in the
kernelspace implementation. But this minor change makes it possible to include
linux/skbuff.h from userspace.

Ideally, all the #ifdef __KERNEL__ secured headerfile references should be
removed, since it is clear that skbuff.h doesn't really rely on them. Perhaps
some .c file does, but I didn't feel like finding out which one.

cheers,

Willem

Attachment: linux-2.6.3-skbuff_userspace_patch
Description: Binary data