From owner-freebsd-questions Wed Feb 3 18:14:55 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA13849 for freebsd-questions-outgoing; Wed, 3 Feb 1999 18:14:55 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA13824 for ; Wed, 3 Feb 1999 18:14:49 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id MAA03069; Thu, 4 Feb 1999 12:44:47 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.2/8.9.0) id MAA64614; Thu, 4 Feb 1999 12:44:46 +1030 (CST) Date: Thu, 4 Feb 1999 12:44:46 +1030 From: Greg Lehey To: Mohamed Abdel-Aal Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Kernel I/O, how ? Message-ID: <19990204124446.C1179@freebie.lemis.com> References: <36B90127.241FD3D1@rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <36B90127.241FD3D1@rpi.edu>; from Mohamed Abdel-Aal on Wed, Feb 03, 1999 at 09:08:40PM -0500 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wednesday, 3 February 1999 at 21:08:40 -0500, Mohamed Abdel-Aal wrote: > I am doing some experiments in TCP that require some modifications to > the code. Namely, /netinet/tcp_timer.c > The problem is that I am not able to do any standard file I/O calls in > the TCP code because I was told that the kernel can't handle high level > I/O calls (stdio.h) . > > All I need to do is open a file, write some stuff to it and then close > it. But I can't do any of this becuase the kernel will not build if > include stdio.h ?? This is probably a question for -hackers, but let's take a quick look at it first. The reason why you can't build the kernel with user-level calls is simply because no mechanism exists to service these calls within the kernel. One way to handle this is to have a user process reading the data from the kernel and then writing it to the file. Create a dummy driver which blocks waiting for data from your tcp code, and read it. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message