Using userland library in Kernel

Dan Nelson dnelson at
Wed Aug 8 13:10:20 PDT 2007

In the last episode (Aug 08), Biks N said:
> I am new to FreeBSD kernel programming and I am trying to use
> userland library (zlib) in FreeBSD kernel. But I am not sure if zlib
> library is linkable from the kernel.

It isn't.  However, there is a zlib implementation in the kernel
already.  It's hidden under the PPP_DEFLATE kernel option (the source
is in sys/net/ppp_deflate.c).  The functions are all prefixed with z_,
but apart from that it works the same as userland zlib.

	Dan Nelson
	dnelson at

More information about the freebsd-hackers mailing list