From owner-freebsd-net@FreeBSD.ORG Wed Jan 25 03:04:59 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 2F63C16A41F for ; Wed, 25 Jan 2006 03:04:59 +0000 (GMT) (envelope-from haisang@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BC6B43D46 for ; Wed, 25 Jan 2006 03:04:58 +0000 (GMT) (envelope-from haisang@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so6248wxc for ; Tue, 24 Jan 2006 19:04:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=E499BSpL3csGqFSbA+2QDCyljbh9LKRoNzVuS2LiQn595QV4ZHAMjgZMZxb7p+Cy6uaRA+2hqTWxzFxS8ZFLdlvZ40qLxENecOriO1I7QSSXxSBw2g8PXrJybeaPvfpRtO/N9CMud7jb1pYGRsEod3xu3tQ6X4QxfftzNfQzAVQ= Received: by 10.70.31.20 with SMTP id e20mr251654wxe; Tue, 24 Jan 2006 19:04:57 -0800 (PST) Received: by 10.70.126.15 with HTTP; Tue, 24 Jan 2006 19:04:57 -0800 (PST) Message-ID: Date: Tue, 24 Jan 2006 19:04:57 -0800 From: Haisang Wu To: Chuck Swiger In-Reply-To: <43D6E4E9.7010604@mac.com> MIME-Version: 1.0 References: <43D6E4E9.7010604@mac.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 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 03:04:59 -0000 Well, I may have some more socket options in the future for the application to fill segments of the 20-byte tag, and the tag may be extended to 40 or 64 bytes, when OOB information increases. How does IPSEC prepend the new header in tunnelling mode? Thanks. Haisang On 1/24/06, Chuck Swiger wrote: > > 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, th= e > > 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 >