From owner-freebsd-hackers@FreeBSD.ORG Mon May 26 07:21:08 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B618437B404 for ; Mon, 26 May 2003 07:21:08 -0700 (PDT) Received: from symonds.net (ca1.symonds.net [66.92.42.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 440A243FB1 for ; Mon, 26 May 2003 07:21:08 -0700 (PDT) (envelope-from ashish@symonds.net) Received: from localhost (symonds.net) [127.0.0.1] by symonds.net with smtp (Exim 3.35 #1 (Debian)) id 19KIqW-00020H-00; Mon, 26 May 2003 07:21:04 -0700 Received: from 203.192.199.30 (SquirrelMail authenticated user ashish) by secure.symonds.net with HTTP; Mon, 26 May 2003 19:51:04 +0530 (IST) Message-ID: <1116.203.192.199.30.1053958864.squirrel@secure.symonds.net> Date: Mon, 26 May 2003 19:51:04 +0530 (IST) From: "Ashish Kulkarni" To: Importance: Normal MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: changing the ToS in IP Header X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ashish@symonds.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2003 14:21:09 -0000 Hello, Is there any way in which I can manipulate the Type of Service (TOS) byte in the IPv4 header? I need to set the TOS bits on all outgoing packets from my box to the ISP to a particular pattern (0x02), as otherwise the ISP does not forward packets. I have been able to do this in Linux using the iptables mangle table: http://www.tldp.org/LDP/nag2/x-087-2-firewall.tos.manipulation.html but am unable to find a similiar packet-mangling feature in the firewalls running on FreeBSD...there are rules for matching on TOS pattern, but not on TOS manipulation. Does anyone know of any tool which can do this? As an alternative solution, is there any way to set the default TOS via a sysctl interface (similiar to that of TTL, namely net.inet.ip.ttl)? I'm planning to use this on my home box, so I have no problems in trying to patch and rebuild the kernel if I can get some feedback and/or tips on how to do so :-) Thanks, Ashish. ps: can you please CC any replies to me? thanks...