Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2008 17:19:41 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Documentation on writing a custom socket
Message-ID:  <20080308171435.J88526@fledge.watson.org>
In-Reply-To: <200803081133.02575.hselasky@c2i.net>
References:  <200803081133.02575.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sat, 8 Mar 2008, Hans Petter Selasky wrote:

> I'm planning to create a new socket type in FreeBSD called AF_Q921, which is 
> to be used for ISDN telephony. Where do I find documentation on how to 
> implement a new socket in the kernel ?

I'd start with a copy of the Design and Implementation of FreeBSD, which 
contains a structural overview of how the protocol parts fit together.  The 
Stevens TCP/IP implementation book is extremely out-of-date, but useful 
reading nontheless.

The first thing to think about, BTW, is whether or not a new protocol is in 
fact what you want to do.  Protocol families bring a lot of useful 
infrastructure to the table: an IPC model, a routing infrastructure, 
abstractions for "interfaces", etc.  However, they may or may not be what 
you're looking for -- before going down this path I'd want to think very 
carefully about whether the requirements you have are best met in this way, or 
possibly better met by creating a new device abstraction that isn't connected 
to the protocol stack, or by using a device stack tied to Netgraph nodes. 
Could you tell us a bit more about what you're trying to do, and perhaps we 
can provide some useful pointers?  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?

Robert N M Watson
Computer Laboratory
University of Cambridge



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080308171435.J88526>