From owner-freebsd-ipfw@FreeBSD.ORG Fri Jun 2 09:29:17 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 34BF816A421 for ; Fri, 2 Jun 2006 09:29:17 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id EAF4E43D48 for ; Fri, 2 Jun 2006 09:29:16 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id k529TGd6074908; Fri, 2 Jun 2006 02:29:16 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id k529TGjd074907; Fri, 2 Jun 2006 02:29:16 -0700 (PDT) (envelope-from rizzo) Date: Fri, 2 Jun 2006 02:29:16 -0700 From: Luigi Rizzo To: Max Laier Message-ID: <20060602022916.B74593@xorpc.icir.org> References: <200606020517.k525HHLU037819@repoman.freebsd.org> <200606020725.54959.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200606020725.54959.max@love2party.net>; from max@love2party.net on Fri, Jun 02, 2006 at 07:25:47AM +0200 Cc: freebsd-ipfw@freebsd.org Subject: Re: bin/98349 [Re: cvs commit: src/sbin/ipfw ipfw2.c] X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2006 09:29:17 -0000 On Fri, Jun 02, 2006 at 07:25:47AM +0200, Max Laier wrote: > On Friday 02 June 2006 07:17, Max Laier wrote: > > mlaier 2006-06-02 05:17:17 UTC > > > > FreeBSD src repository > > > > Modified files: > > sbin/ipfw ipfw2.c > > Log: > > Print dynamic rules for IPv6 as well. > > > > PR: bin/98349 > > Submitted by: Mark Andrews > > MFC after: 2 weeks > > > > Revision Changes Path > > 1.90 +15 -5 src/sbin/ipfw/ipfw2.c > > It's highly confusing that we have {src,dst}_{ip,port} in host byte order if i remember well, the design motivation behind this choice was that we do range comparisons on ports and integer manipulation on the ipv4 addresses (to apply masks and generate various indexes), so the most efficient choice for the internal representation was host order. I'd rather keep it this way, as we use these ops very very often, and not only performance but even readability of the code would be impaired changing to network order. > while {src,dst}_ip6 are in network byte order. I think that keeping network As for ipv6 addresses there isn't really (yet ?) a native host support for 128-bit operands so we could as well declare the network order to be the correct one for native manipulation. cheers luigi