Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Mar 1999 07:08:45 +0600 (ALMT)
From:      Boris Popov <bp@butya.kz>
To:        Dan Seguin <dseg@texar.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: KLD extern calls
Message-ID:  <Pine.BSF.4.05.9903190652330.15491-100000@lion.butya.kz>
In-Reply-To: <Pine.BSF.3.91.990318163106.25492A-100000@pak.texar.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 18 Mar 1999, Dan Seguin wrote:

> Is it possible to make calls to std libs from within a KLD? For example,
> getpwuid()? If so, how does one link it in? I've tried ld by hand 

	No, you can't use stdlibs call without a user process. The
simplest way is to create daemon which will call KLD via syscall. This
call should sleep on entry. Whenever KLD want to call stdlib's
function it should fill necessary arguments, wakeup sleeping call
which will pass them back to daemon and receive reply via the same
syscall.

	Of course, you should define a simple protocol between daemon and
KLD and avoid mess with request/reply.

	The same goal can be achieved via socket interface.

--
| Boris Popov
| http://www.butya.kz/~bp/



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9903190652330.15491-100000>