*BSD News Article 36525


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!EU.net!news.eunet.fi!news.spb.su!sssun.spb.su!tim
From: tim@sssun.spb.su (Andrey Timonin)
Newsgroups: comp.os.386bsd.bugs
Subject: BYTE_ORDER in headers
Date: 4 Oct 1994 11:32:11 GMT
Organization: Relcom
Lines: 49
Message-ID: <36refr$jj5@sssun.spb.su>
NNTP-Posting-Host: news.spb.su
Summary: <machine/endian.h> should be included in ip.h ip_var.h and tcp.h
X-Newsreader: TIN [version 1.2 PL2]

I found out that including <netinet/ip.h> lacks BYTE_ORDER
definition. I suggest to include <machine/endian.h> in it
and also in <netinet/ip_var.h> and <netinet/tcp.h>
The patch follows:

*** ip.h.orig	Sun Nov  7 17:47:54 1993
--- ip.h	Tue Oct  4 07:59:19 1994
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _NETINET_IP_H_
  #define _NETINET_IP_H_ 1
  
+ #include <machine/endian.h>
+ 
  /*
   * Definitions for internet protocol version 4.
   * Per RFC 791, September 1981.
*** ip_var.h.orig	Tue May 17 22:31:12 1994
--- ip_var.h	Tue Oct  4 08:00:01 1994
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _NETINET_IP_VAR_H_
  #define _NETINET_IP_VAR_H_ 1
  
+ #include <machine/endian.h>
+ 
  /*
   * Overlay for ip header used by other protocols (tcp, udp).
   */
*** tcp.h.orig	Sun Nov  7 17:48:02 1993
--- tcp.h	Tue Oct  4 08:01:16 1994
***************
*** 37,42 ****
--- 37,44 ----
  #ifndef _NETINET_TCP_H_
  #define _NETINET_TCP_H_ 1
  
+ #include <machine/endian.h>
+ 
  typedef	u_long	tcp_seq;
  /*
   * TCP header.

--
 Andrew A. Timonin	E-mail tim@sssun.spb.su,
   St.Petersburg	phone:	office:  +7 (812) 1106762
	Russia			private: +7 (812) 2540779