From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 8 20:10:20 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEFF216A419 for ; Wed, 8 Aug 2007 20:10:20 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 4B72213C4DB for ; Wed, 8 Aug 2007 20:10:20 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id l78HOpta082490; Wed, 8 Aug 2007 12:24:51 -0500 (CDT) (envelope-from dan) Date: Wed, 8 Aug 2007 12:24:51 -0500 From: Dan Nelson To: Biks N Message-ID: <20070808172451.GM77822@dan.emsphone.com> References: <50cd4e5f0708080923p1d441e66ha6b42e277b55f8d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50cd4e5f0708080923p1d441e66ha6b42e277b55f8d@mail.gmail.com> X-OS: FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Using userland library in Kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 20:10:20 -0000 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@allantgroup.com