Support for Linux transparent proxy & asm/types.h

Mark Kettenis kettenis@wins.uva.nl
Wed Dec 23 08:20:00 GMT 1998


   On a related topic: I currently give this synopsis line for netlink sockets:

   #include <linux/netlink.h>
   nl_socket = socket(PF_NETLINK, ....); 

   To compile that snippet on glibc systems #include <asm/types.h> is needed.
   Does glibc gurantee in future version that asm/types.h will continue to
   work?

No, we can't guarantee this since Linus doesn't want to commit himself
to keeping the Linux headers namespace clean.  So programs that
compile against glibc should not include any Linux headers (i.e. no
#include <asm/foo.h> or #include <linux/foo.h>).  If glibc doesn't
provide a header (i.e. #include <sys/foo.h>), the programmer is
supposed to copy the needed defenitions from the appropriate Linux
header to a private header and use that.

Only when a set of definitions is used by several programs and the
interface is stable (which I believe the PF_NETLINK interface is not,
correct me if I'm wrong) a glibc header will be added.

Mark





More information about the Libc-alpha mailing list