Date: Wed, 10 Oct 2012 09:47:46 -0500 From: Guy Helmer <guy.helmer@gmail.com> To: Gleb Smirnoff <glebius@freebsd.org> Cc: net@FreeBSD.org Subject: Re: [CFT/Review] net byte order for AF_INET Message-ID: <E52E22DC-6BE0-40E7-AB9B-10375DD301AE@gmail.com> In-Reply-To: <20121009154128.GU34622@FreeBSD.org> References: <20121009154128.GU34622@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 9, 2012, at 10:41 AM, Gleb Smirnoff <glebius@freebsd.org> wrote: > Hello, >=20 > 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. >=20 > 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. >=20 > The patch has been tested by me on amd64 and ray@ on mips. > TCP, UDP, ICMP, fragment reassembly and basic packet filtering > works okay. >=20 > 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. >=20 > Code reviewing also appreciated. It's not obvious to me, so does this change the byte order expected in = packets sent from userland via raw IP sockets? Guy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E52E22DC-6BE0-40E7-AB9B-10375DD301AE>