From owner-freebsd-net@FreeBSD.ORG Wed Oct 10 08:41:39 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C940470F; Wed, 10 Oct 2012 08:41:39 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 951958FC18; Wed, 10 Oct 2012 08:41:39 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so505736pbb.13 for ; Wed, 10 Oct 2012 01:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=FBUVWFgsA44AFOgOYobp/GwEZb+G5yCzCZPBb1LX7Ks=; b=CmR8yD0/ilhX6WBt6QgklwQLrrT10R3kt8JYBFEMeCTPWZXC6GqyiOiz+p2KgNNmlu B92TjMi+XUxtkdAFembvtcDwcEHpuWniXJxJdYfJtoDOjyACSfUHWQ8XYSrv3vmxD0L5 VIk8lKlmLbTiaJtHE4bIwYCO00IYmyetE9PKEBHLuMQ7czMa45Ta+gI5FPMu8Zsj8qTj 6pT9zlGG9s6aNX/MAaA7l6TaZ3inI0/jkJFhgIjsSs/2s9K/Lz8yGYS2ZRMaN6i5k3sC 77Mj3rM787W3YQQHQsxDifzNd4pgKUmaN4Xm8aV9Rh/vD8kwTwYKo6+r53QqgL0f69Cw +MuQ== MIME-Version: 1.0 Received: by 10.66.72.194 with SMTP id f2mr16049599pav.40.1349858499314; Wed, 10 Oct 2012 01:41:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.223.136 with HTTP; Wed, 10 Oct 2012 01:41:39 -0700 (PDT) In-Reply-To: <20121009154128.GU34622@FreeBSD.org> References: <20121009154128.GU34622@FreeBSD.org> Date: Wed, 10 Oct 2012 01:41:39 -0700 X-Google-Sender-Auth: bWE9I-kU02oNQiNx6bC11ubbrX8 Message-ID: Subject: Re: [CFT/Review] net byte order for AF_INET From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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, 10 Oct 2012 08:41:39 -0000 Can you please test on i386? :) Adrian On 9 October 2012 08:41, Gleb Smirnoff wrote: > Hello, > > this is a patch that switches entire IPv4 stack to network > byte order. That means, that at any layer any module should > expect IP header in network byte order. Any host byte order > values can be stored in local variables only and are never stored > into a packet itself. > > The new code brings clarity, since a developer doesn't need to > know which byte order should he/she switch a packet to when > passing it to a particular function in stack. Also, any new > function introduced should expect net byte order for a packet > supplied. > > The patch has been tested by me on amd64 and ray@ on mips. > TCP, UDP, ICMP, fragment reassembly and basic packet filtering > works okay. > > More testing is desired, especially on boxes using some extensions > as packet filters with policy routing, running gre(4), ipsec(4), > divert(4), gif(4), multicast routing, stf(4), ng_ipfw(4), SCTP, etc. > > Code reviewing also appreciated. > > -- > Totus tuus, Glebius. > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"