]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcp.h
always use u_intXX_t for protocol format declaration. char/short/int may not
[tcpdump] / tcp.h
diff --git a/tcp.h b/tcp.h
index 487c166a3ab6f284312265e8ef42464ea6a66668..7b2b24e35eb75a261835ff625d31d3e8854d5679 100644 (file)
--- a/tcp.h
+++ b/tcp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.4 2000-10-03 02:26:53 itojun Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.5 2000-10-03 02:55:02 itojun Exp $ (LBL) */
 /*
  * Copyright (c) 1982, 1986, 1993
  *     The Regents of the University of California.  All rights reserved.
   #error "Undefined or invalid BYTE_ORDER";
 #endif
 
-typedef        u_int   tcp_seq;
+typedef        u_int32_t       tcp_seq;
 /*
  * TCP header.
  * Per RFC 793, September, 1981.
  */
 struct tcphdr {
-       u_short th_sport;               /* source port */
-       u_short th_dport;               /* destination port */
-       tcp_seq th_seq;                 /* sequence number */
-       tcp_seq th_ack;                 /* acknowledgement number */
-       u_char  th_x2off;
+       u_int16_t       th_sport;               /* source port */
+       u_int16_t       th_dport;               /* destination port */
+       tcp_seq         th_seq;                 /* sequence number */
+       tcp_seq         th_ack;                 /* acknowledgement number */
+       u_int8_t        th_x2off;
 #define TH_OFF(th)     ((th)->th_x2off & 0x0f) /* data offset, th_off */
-       u_char  th_flags;
+       u_int8_t        th_flags;
 #define        TH_FIN  0x01
 #define        TH_SYN  0x02
 #define        TH_RST  0x04
 #define        TH_PUSH 0x08
 #define        TH_ACK  0x10
 #define        TH_URG  0x20
-       u_short th_win;                 /* window */
-       u_short th_sum;                 /* checksum */
-       u_short th_urp;                 /* urgent pointer */
+       u_int16_t       th_win;                 /* window */
+       u_int16_t       th_sum;                 /* checksum */
+       u_int16_t       th_urp;                 /* urgent pointer */
 };
 
 #define        TCPOPT_EOL              0