From owner-freebsd-net@FreeBSD.ORG Wed Jan 25 02:39:37 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE51716A41F for ; Wed, 25 Jan 2006 02:39:37 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FBD843D46 for ; Wed, 25 Jan 2006 02:39:37 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 86D145DB9; Tue, 24 Jan 2006 21:39:36 -0500 (EST) Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 70875-06; Tue, 24 Jan 2006 21:39:34 -0500 (EST) Received: from [192.168.1.3] (pool-68-160-211-174.ny325.east.verizon.net [68.160.211.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 5D5355C44; Tue, 24 Jan 2006 21:39:33 -0500 (EST) Message-ID: <43D6E4E9.7010604@mac.com> Date: Tue, 24 Jan 2006 21:39:37 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Haisang Wu References: In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at codefab.com Cc: freebsd-net@freebsd.org Subject: Re: Developing New Socket Option on 4.10 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2006 02:39:37 -0000 Haisang Wu wrote: > I am writing for help on my freebsd kernel hacking. I am working on 4.10, > and intend to introduct a new socket option (say, SO_TAG_PAK) > for my own kernel. When sending out a packet, if this option is set, the > socket layer will produce a 20-byte tag, and finally this tag will be > prepended before IP header (may be done in ip_output() ). This is somewhat > like MPLS's shim layer, but this special packet with the tag will only be > sent over a logical tunnel to another system. When receiving a packet, the > IP layer will check whether the packet has this tag (through the > first integer of the tag), and pass the tag up (to applications). If you want to write your own protocol which wraps IP, OK, but there are easier ways of passing out-of-band data to the application layer. Consider either setting up a new IP-layer option, a new TCP-layer option, or just using TCP's urgent pointer to send OOB data. Twenty bytes would fit just fine inside the existing protocols, and you would be able to take advantage of hardware support for Rx and Tx checksums, etc, etc. -- -Chuck