Subject: Re: Various NetBSD kernel questions to help with port of FreeBSD
To: David Young <>
From: Jeff Rizzo <>
List: tech-kern
Date: 11/08/2004 11:42:01
David Young wrote:

>I would ask of the original poster, does the Asterisk architecture
>observe this policy/mechanism, userland/kernel split?
>(I am dimly aware that STREAMS has something to do with all of this.)

Well, I find myself in the somewhat uncomfortable position of learning 
about this as I'm doing it.  :)  From what I can see, it does indeed 
keep out of the original audio stream as much as possible.

One of the things that's clear to me is that the current architecture of 
the driver, however well it works under Linux, is probably not ideal for 
NetBSD.  However, until such time as I know a lot more about asterisk 
and the specific hardware, I can't really contemplate doing a redesign 
of the driver architecture, so what I'm concentrating on at the moment 
is understanding what's there and why it's done that way, and how best 
to fit the current architecture into NetBSD.  Since the drivers I'm 
working with are GPL-tainted anyway, it's not like they're going to wind 
up in the NetBSD tree anyway;  perhaps a rearchitected version could.  
Assuming it's still something I'm interested in once I get it working in 
its current form, I'll consider undertaking that, but like a lot of the 
rest of you, this isn't something I'm being paid to do, so we'll see how 
long my enthusiam lasts after I get a dial tone.  :-)

One thing I have learned since I made the original post:  apparently, 
Linux open() calls have per-descriptor private data for the device;  the 
FreeBSD port goes to some pains to emulate this by redefining file 
operations for a new descriptor and setting the f_data field of 'struct 
file' to point to this device-private data... I'm understanding a little 
better what that's about, and am noodling over how to make that work in 

Thanks a lot for all the discussion on the topic - it's something I'm 
currently very interested in.


Jeff Rizzo                               
Red Crow Group LLC                       
+1 415 550 0310