From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 10 18:38:20 2008 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 43585106568A for ; Mon, 10 Mar 2008 18:38:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id C026B8FC49 for ; Mon, 10 Mar 2008 18:38:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 6A38546B43; Mon, 10 Mar 2008 14:38:16 -0400 (EDT) Date: Mon, 10 Mar 2008 18:38:16 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200803091027.39843.hselasky@c2i.net> Message-ID: <20080310183324.S70549@fledge.watson.org> References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> <200803091027.39843.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom 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: Mon, 10 Mar 2008 18:38:20 -0000 On Sun, 9 Mar 2008, Hans Petter Selasky wrote: > On Saturday 08 March 2008, Robert Watson wrote: >> On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >> For example, do you anticipate using or even needing the routing >> facilities, and how might you map ISDN telephony parts into the normal >> network stack infrastructure of addresses, routing, interfaces, etc? > > ISDN is very simple. In the ISDN world there is a term called TEI which is > the Terminal Entity Identifier. This kind of like an IP address. > > Besides from the signalling there are 2 B-channels which can transport data > or audio. One of my goals is to achive zero copy when moving data to/from an > ISDN line and also in combination to Voice over IP. Currently data is moved > through userland (Asterisk typically) which is usable in the short term, but > in the long run I want this extra copying removed. The idea is that I can > route [IP] packets (mbufs) through various filters in the kernel without the > need for copy. While I'm not opposed to the idea in principle, I would recommend thinking very carefully before committing to the protocol stack approach as it comes with a lot of maintenance baggage and is a pretty heavy-weight activity. The reason to do that instead of just doing a custom device stack that plugs into the network stack only where it intersects with, say, encapsulated IP, would be if you really need to expose a full socket abstraction to userspace. Robert N M Watson Computer Laboratory University of Cambridge