From owner-freebsd-net@FreeBSD.ORG Thu May 26 20:39:38 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 70B4516A41C for ; Thu, 26 May 2005 20:39:38 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE79B43D48 for ; Thu, 26 May 2005 20:39:37 +0000 (GMT) (envelope-from french.linuxian@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so60085nzp for ; Thu, 26 May 2005 13:39:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Dxc9RmNdiIjyQj0rP/QmCusfNXS5jVl7vD0kD+xtz6S02VxpdB3kPjrk7F+VEFjcF3kQHuHvPpWxRzVlDis5COK+MLXnlGjNSBmLCVmeEndlI8xdrUs4UQiJUT0gyfwyajpO3YNbhR8hPTixJK3HsSPBmZLZhEqn8sxLbWi9uBg= Received: by 10.36.19.12 with SMTP id 12mr826370nzs; Thu, 26 May 2005 13:38:29 -0700 (PDT) Received: by 10.36.58.12 with HTTP; Thu, 26 May 2005 13:38:28 -0700 (PDT) Message-ID: <3727392705052613381067f2a2@mail.gmail.com> Date: Thu, 26 May 2005 16:38:28 -0400 From: Aziz Kezzou To: freebsd-hackers , freebsd-net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: Subject: Pseudo-device driver & select ?? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Aziz Kezzou List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 20:39:38 -0000 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