From owner-freebsd-questions@FreeBSD.ORG Tue Aug 15 03:38:54 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB6EF16A4DA for ; Tue, 15 Aug 2006 03:38:54 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1A2D43D45 for ; Tue, 15 Aug 2006 03:38:53 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.pc (patr530-a077.otenet.gr [212.205.215.77]) (authenticated bits=128) by igloo.linux.gr (8.13.7/8.13.7/Debian-2) with ESMTP id k7F3cY7O016925 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 15 Aug 2006 06:38:38 +0300 Received: from gothmog.pc (gothmog [127.0.0.1]) by gothmog.pc (8.13.7/8.13.7) with ESMTP id k7F3cDHk003084; Tue, 15 Aug 2006 06:38:18 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.pc (8.13.7/8.13.7/Submit) id k7F3c5ni003083; Tue, 15 Aug 2006 06:38:05 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 15 Aug 2006 06:38:05 +0300 From: Giorgos Keramidas To: Aaron Christensen Message-ID: <20060815033805.GA2945@gothmog.pc> References: <20060815013436.GB2261@gothmog.pc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.086, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.31, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD & STREAMS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Aug 2006 03:38:54 -0000 On 2006-08-14 22:08, Aaron Christensen wrote: >On 8/14/06, Giorgos Keramidas wrote: >>On 2006-08-14 18:23, Aaron Christensen wrote: >>> All, >>> Just curious, does FreeBSD (or any of the BSDs) have a >>> STREAMS implementation? >> >> Not really. At least not in the official source tree. >> >>> Or does anyone know of a 3rd party implementation? >> >> I'm not sure about this. >> >> What do you need STREAMS for? Perhaps we can find something >> that fits the bill and is already part of the base-system? > > Well, we're trying to implement a custom kernel-level ssl... Is > there any mechanism in FreeBSD to facilitate this? That's the reply I was sort of expecting, and the reason I asked. If this is meant to be used for network sockets, then a mechanism in FreeBSD that is similar to streams: it is called "NETGRAPH". There are various 'node types' in FreeBSD already, which support various sorts of packet processing, filtering, rewriting, etc. The manpages of all the ng_xxxx(4) nodes are quite informational, and you can find a few good references for Netgraph in Julian Elischer's personal web space at FreeBSD.org: http://people.freebsd.org/~julian/ There are currently more than 50 different Netgraph node types in FreeBSD 7.0-CURRENT, providig packet functions such diverse as Berkeley packet filtering, a generic tunneling interface, packet firewalling, NAT functions, kernel mbuf tagging, or VLAN tagging, and so on. See all the ng_xxxx manpages with: % man -k ng_ and the webpage of Julian mentioned above. Hopefully, you can find something that can help you get started. If an existing Netgraph node doesn't match 100% the functionality you want to do, you can always copy an existing node sources and modify them to create a node type of your own :-) HTH, Giorgos