Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Sep 2000 09:26:10 +0300
From:      Ruslan Ermilov <ru@sunbay.com>
To:        Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netinet ip_divert.c ip_icmp.c ip_input.c ip_mroute.c ip_output.c raw_ip.c udp_usrreq.c
Message-ID:  <20000907092610.A46475@sunbay.com>
In-Reply-To: <200009061845.OAA20964@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Wed, Sep 06, 2000 at 02:45:53PM -0400
References:  <200009011233.FAA69145@freefall.freebsd.org> <200009061845.OAA20964@khavrinen.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 06, 2000 at 02:45:53PM -0400, Garrett Wollman wrote:
> <<On Fri, 1 Sep 2000 05:33:06 -0700 (PDT), Ruslan Ermilov <ru@FreeBSD.org> said:
> 
> >   o ip_output() now expects all three fields, ip_len, ip_off and (what is
> >     significant) ip_id in host byte order.  It was a headache for years that
> >     ip_id was handled differently.  The only compatibility issue here is the
> >     raw IP socket interface with IP_HDRINCL socket option set and a non-zero
> >     ip_id field, but ip.4 manual page was unclear on whether in this case
> >     ip_id field should be in host or network byte order.
> 
> According to Mike Karels (in a message to me dated 2 June 1997),
> BSD/OS leaves the ip_id field in network order all the time, but swaps
> in the raw IP code to preserve the old interface.  There is never any
> arithmetic performed on the IP ID, only comparisons for equality, so
> leaving out the swap should save a cycle or three.
> 
The same does NetBSD, but I feel more logical is to have all these fields
in host byte order right after ip_input() processing.

-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000907092610.A46475>