From owner-freebsd-stable@FreeBSD.ORG Fri Jun 17 12:06:25 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 694F116A41F for ; Fri, 17 Jun 2005 12:06:25 +0000 (GMT) (envelope-from debiandude@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12FCF43D58 for ; Fri, 17 Jun 2005 12:06:24 +0000 (GMT) (envelope-from debiandude@gmail.com) Received: by zproxy.gmail.com with SMTP id 12so348629nzp for ; Fri, 17 Jun 2005 05:06:24 -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=aqXWrQEVMUliyV2PPq9WHxWcki6ZmvEHSic3QxLKzNU96oZZAM0YDgqS620V4cJRGtOK9j8OlJu+nU6sM2npgx02JiaDYQnr+22+HTspEiGRZCAPaf4rb5001NmdH9nwLrmvSliEx7NH0G+V+6ffcPRz/6FFWLl/sV8Wfg0jBOo= Received: by 10.36.222.19 with SMTP id u19mr611900nzg; Fri, 17 Jun 2005 05:06:24 -0700 (PDT) Received: by 10.36.3.13 with HTTP; Fri, 17 Jun 2005 05:06:24 -0700 (PDT) Message-ID: Date: Fri, 17 Jun 2005 14:06:24 +0200 From: Hannes Mayer To: freebsd-stable@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Kernel module/IPC with userland: create and write to FIFO X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Hannes Mayer List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2005 12:06:25 -0000 Hi all! I've modified a standard driver and now I'd like to create a FIFO in it to communicate / send data to a userland process. Opening, reading and writing to a FIFO in userland is easy, but I have no clue how to do this in kernel space. Googling and looking to the kernel source didn't help. The only thing I found is "kern_mkfifo" and int mkfifo(struct thread, struct mkfifo_args);, but no example on how to use them (if that's the right approach anyway). To cut a long story short, how can I open a FIFO in kernel space and write to it, so I can open and read from it in userspace ? Thanks in advance for any hints! Best regards, Hannes.