Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 May 2005 16:38:28 -0400
From:      Aziz Kezzou <french.linuxian@gmail.com>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>,  freebsd-net <freebsd-net@freebsd.org>
Subject:   Pseudo-device driver & select ??
Message-ID:  <3727392705052613381067f2a2@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,
I am trying to implement a small kld pseudo-device driver on FreeBSD 5.3 th=
at=20
behaves just like a socket with regards to the select system call.

Currently, I am using the sample echo pseudo-device driver from
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics=
-char.html
 as an example. However, whenever  I call select on the file
descriptor of "/dev/echo" it always returns even when there is no data
to be read.

I looked at the socket code and it looks like I need to provide my own
"fo_select" function in the fileops data structure. Am i right ? How
do I do that ? The sample echo pseudo-device driver above uses=20
"struct cdevsw"  instead...

Thanks
-aziz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3727392705052613381067f2a2>