mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
Move some stuff that tried to make up for system headers from print-tcp.c
to tcp.h, since don't use the system headers now anyway it was just making up for our own tcp.h.
This commit is contained in:
parent
fae400d412
commit
5de6f0fd81
41
print-tcp.c
41
print-tcp.c
@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.85 2001-03-09 05:38:21 guy Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.86 2001-05-09 01:16:57 fenner Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -58,45 +58,6 @@ static void print_tcp_rst_data(register const u_char *sp, u_int length);
|
||||
|
||||
#define MAX_RST_DATA_LEN 30
|
||||
|
||||
/* Compatibility */
|
||||
#ifndef TCPOPT_WSCALE
|
||||
#define TCPOPT_WSCALE 3 /* window scale factor (rfc1072) */
|
||||
#endif
|
||||
#ifndef TCPOPT_SACKOK
|
||||
#define TCPOPT_SACKOK 4 /* selective ack ok (rfc1072) */
|
||||
#endif
|
||||
#ifndef TCPOPT_SACK
|
||||
#define TCPOPT_SACK 5 /* selective ack (rfc1072) */
|
||||
#endif
|
||||
#ifndef TCPOPT_ECHO
|
||||
#define TCPOPT_ECHO 6 /* echo (rfc1072) */
|
||||
#endif
|
||||
#ifndef TCPOPT_ECHOREPLY
|
||||
#define TCPOPT_ECHOREPLY 7 /* echo (rfc1072) */
|
||||
#endif
|
||||
#ifndef TCPOPT_TIMESTAMP
|
||||
#define TCPOPT_TIMESTAMP 8 /* timestamps (rfc1323) */
|
||||
#endif
|
||||
#ifndef TCPOPT_CC
|
||||
#define TCPOPT_CC 11 /* T/TCP CC options (rfc1644) */
|
||||
#endif
|
||||
#ifndef TCPOPT_CCNEW
|
||||
#define TCPOPT_CCNEW 12 /* T/TCP CC options (rfc1644) */
|
||||
#endif
|
||||
#ifndef TCPOPT_CCECHO
|
||||
#define TCPOPT_CCECHO 13 /* T/TCP CC options (rfc1644) */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Definitions required for ECN
|
||||
* for use if the OS running tcpdump does not have ECN
|
||||
*/
|
||||
#ifndef TH_ECNECHO
|
||||
#define TH_ECNECHO 0x40 /* ECN Echo in tcp header */
|
||||
#endif
|
||||
#ifndef TH_CWR
|
||||
#define TH_CWR 0x80 /* ECN Cwnd Reduced in tcp header*/
|
||||
#endif
|
||||
|
||||
struct tha {
|
||||
#ifndef INET6
|
||||
|
19
tcp.h
19
tcp.h
@ -1,4 +1,4 @@
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.7 2000-10-03 09:17:41 guy Exp $ (LBL) */
|
||||
/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.8 2001-05-09 01:16:57 fenner Exp $ (LBL) */
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
@ -53,6 +53,8 @@ struct tcphdr {
|
||||
#define TH_PUSH 0x08
|
||||
#define TH_ACK 0x10
|
||||
#define TH_URG 0x20
|
||||
#define TH_ECNECHO 0x40 /* ECN Echo */
|
||||
#define TH_CWR 0x80 /* ECN Cwnd Reduced */
|
||||
u_int16_t th_win; /* window */
|
||||
u_int16_t th_sum; /* checksum */
|
||||
u_int16_t th_urp; /* urgent pointer */
|
||||
@ -62,14 +64,17 @@ struct tcphdr {
|
||||
#define TCPOPT_NOP 1
|
||||
#define TCPOPT_MAXSEG 2
|
||||
#define TCPOLEN_MAXSEG 4
|
||||
#define TCPOPT_WINDOW 3
|
||||
#define TCPOLEN_WINDOW 3
|
||||
#define TCPOPT_SACK_PERMITTED 4 /* Experimental */
|
||||
#define TCPOLEN_SACK_PERMITTED 2
|
||||
#define TCPOPT_SACK 5 /* Experimental */
|
||||
#define TCPOPT_TIMESTAMP 8
|
||||
#define TCPOPT_WSCALE 3 /* window scale factor (rfc1323) */
|
||||
#define TCPOPT_SACKOK 4 /* selective ack ok (rfc2018) */
|
||||
#define TCPOPT_SACK 5 /* selective ack (rfc2018) */
|
||||
#define TCPOPT_ECHO 6 /* echo (rfc1072) */
|
||||
#define TCPOPT_ECHOREPLY 7 /* echo (rfc1072) */
|
||||
#define TCPOPT_TIMESTAMP 8 /* timestamp (rfc1323) */
|
||||
#define TCPOLEN_TIMESTAMP 10
|
||||
#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */
|
||||
#define TCPOPT_CC 11 /* T/TCP CC options (rfc1644) */
|
||||
#define TCPOPT_CCNEW 12 /* T/TCP CC options (rfc1644) */
|
||||
#define TCPOPT_CCECHO 13 /* T/TCP CC options (rfc1644) */
|
||||
|
||||
#define TCPOPT_TSTAMP_HDR \
|
||||
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
|
||||
|
Loading…
Reference in New Issue
Block a user