bit field incompatibilities with sun
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Wed, 29 Dec 1982 13:04:52 +0000 (05:04 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Wed, 29 Dec 1982 13:04:52 +0000 (05:04 -0800)
SCCS-vsn: sys/netinet/ip.h 1.11
SCCS-vsn: sys/netinet/ip_var.h 4.7
SCCS-vsn: sys/netinet/tcp.h 1.23

usr/src/sys/netinet/ip.h
usr/src/sys/netinet/ip_var.h
usr/src/sys/netinet/tcp.h

index 869a98f..08f3794 100644 (file)
@@ -1,4 +1,4 @@
-/* ip.h 1.10 82/03/30 */
+/* ip.h 1.11 82/12/28 */
 
 /*
  * Definitions for internet protocol version 4.
 
 /*
  * Definitions for internet protocol version 4.
  * against negative integers quite easily, and fail in subtle ways.
  */
 struct ip {
  * against negative integers quite easily, and fail in subtle ways.
  */
 struct ip {
+#ifdef vax
        u_char  ip_hl:4,                /* header length */
                ip_v:4;                 /* version */
        u_char  ip_hl:4,                /* header length */
                ip_v:4;                 /* version */
+#endif
+#ifdef sun
+       u_char  ip_v:4,                 /* version */
+               ip_hl:4;                /* header length */
+#endif
        u_char  ip_tos;                 /* type of service */
        short   ip_len;                 /* total length */
        u_short ip_id;                  /* identification */
        u_char  ip_tos;                 /* type of service */
        short   ip_len;                 /* total length */
        u_short ip_id;                  /* identification */
index e33ba2d..94ce883 100644 (file)
@@ -1,4 +1,4 @@
-/*     ip_var.h        4.6     82/11/13        */
+/*     ip_var.h        4.7     82/12/28        */
 
 /*
  * Overlay for ip header used by other protocols (tcp, udp).
 
 /*
  * Overlay for ip header used by other protocols (tcp, udp).
@@ -34,8 +34,14 @@ struct ipq {
  * Note: ipf_next must be at same offset as ipq_next above
  */
 struct ipasfrag {
  * Note: ipf_next must be at same offset as ipq_next above
  */
 struct ipasfrag {
+#ifdef vax
        u_char  ip_hl:4,
                ip_v:4;
        u_char  ip_hl:4,
                ip_v:4;
+#endif
+#ifdef sun
+       u_char  ip_v:4,
+               ip_hl:4;
+#endif
        u_char  ipf_mff;                /* copied from (ip_off&IP_MF) */
        short   ip_len;
        u_short ip_id;
        u_char  ipf_mff;                /* copied from (ip_off&IP_MF) */
        short   ip_len;
        u_short ip_id;
index 460b082..43ec0e6 100644 (file)
@@ -1,4 +1,4 @@
-/* tcp.h 1.22 82/12/20 */
+/* tcp.h 1.23 82/12/28 */
 
 typedef        u_long  tcp_seq;
 /*
 
 typedef        u_long  tcp_seq;
 /*
@@ -10,9 +10,14 @@ struct tcphdr {
        u_short th_dport;               /* destination port */
        tcp_seq th_seq;                 /* sequence number */
        tcp_seq th_ack;                 /* acknowledgement number */
        u_short th_dport;               /* destination port */
        tcp_seq th_seq;                 /* sequence number */
        tcp_seq th_ack;                 /* acknowledgement number */
-       u_char
-               th_x2:4,                /* (unused) */
+#ifdef vax
+       u_char  th_x2:4,                /* (unused) */
                th_off:4;               /* data offset */
                th_off:4;               /* data offset */
+#endif
+#ifdef sun
+       u_char  th_off:4,               /* data offset */
+               th_x2:4;                /* (unused) */
+#endif
        u_char  th_flags;
 #define        TH_FIN  0x01
 #define        TH_SYN  0x02
        u_char  th_flags;
 #define        TH_FIN  0x01
 #define        TH_SYN  0x02