From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 16 09:48:16 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08F7106564A for ; Wed, 16 Nov 2011 09:48:16 +0000 (UTC) (envelope-from gelraen.ua@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 728AF8FC0A for ; Wed, 16 Nov 2011 09:48:15 +0000 (UTC) Received: by vcbfo14 with SMTP id fo14so420213vcb.13 for ; Wed, 16 Nov 2011 01:48:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=DVXpANN7TURhbvOsCW2+ti3pRvoQdSl/Z711a8XTkac=; b=Xx3QrJQVAw6RXMCVE88Dx76o+bPAXCDrlDWK9i4vlOqe+eT3w85k4p1wtZtW8VhTYi T5WHArJV7DCmap7V2ErgBP1gte9QJBseq3WcxuAe53X7HlZJHbHAmiZFLfduVDSyikrN no5GxTpJCd4s3jy7iw64kOLlccz6m+q2LOMPI= Received: by 10.52.183.36 with SMTP id ej4mr50681111vdc.26.1321436894081; Wed, 16 Nov 2011 01:48:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.115.130 with HTTP; Wed, 16 Nov 2011 01:47:53 -0800 (PST) In-Reply-To: <20111116085508.GF36205@hoeg.nl> References: <201111152218.41031.gelraen.ua@gmail.com> <20111116085508.GF36205@hoeg.nl> From: Maxim Ignatenko Date: Wed, 16 Nov 2011 11:47:53 +0200 Message-ID: To: Ed Schouten Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Wed, 16 Nov 2011 12:07:20 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Communication between kernel and userspace via local socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2011 09:48:17 -0000 On 16 November 2011 10:55, Ed Schouten wrote: > * Maxim Ignatenko , 20111115 21:18: >> I'm currently inventing the wheel^W^W^Wwriting a firewall from scratch and >> looking for most convenient way to establish communication between userspace >> processes and kernel part. Communication pattern best fits to listening >> PF_LOCAL socket opened from kernel and userspace processes connecting to it. > > What's wrong with a character device? > With character device I'll need to manually maintain "per-connection" buffers, this will bloat the code.