summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_debug.h
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2017-05-18 11:38:07 +0000
committermpi <mpi@openbsd.org>2017-05-18 11:38:07 +0000
commitb100edd3e9201518d02e494156bb3df75a62bc3b (patch)
tree3e5c4b2c5d0756989789c87bf69bd6e99c3f3693 /sys/netinet/tcp_debug.h
parentThe function name ip4_input() is confusing as it also handles IPv6 (diff)
downloadwireguard-openbsd-b100edd3e9201518d02e494156bb3df75a62bc3b.tar.xz
wireguard-openbsd-b100edd3e9201518d02e494156bb3df75a62bc3b.zip
Merge the content of <netinet/tcpip.h> and <netinet6/tcpipv6.h> in
<netinet/tcp_debug.h>. The IPv6 variant was always included and the IPv4 version is not present on all systems. Most of the offending ports are already fixed, thanks to sthen@!
Diffstat (limited to 'sys/netinet/tcp_debug.h')
-rw-r--r--sys/netinet/tcp_debug.h44
1 files changed, 42 insertions, 2 deletions
diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h
index 8111ca24f9b..70ce6497738 100644
--- a/sys/netinet/tcp_debug.h
+++ b/sys/netinet/tcp_debug.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_debug.h,v 1.8 2014/07/13 13:57:56 mpi Exp $ */
+/* $OpenBSD: tcp_debug.h,v 1.9 2017/05/18 11:38:07 mpi Exp $ */
/* $NetBSD: tcp_debug.h,v 1.5 1994/06/29 06:38:38 cgd Exp $ */
/*
@@ -35,7 +35,47 @@
#ifndef _NETINET_TCP_DEBUG_H_
#define _NETINET_TCP_DEBUG_H_
-#include <netinet6/tcpipv6.h>
+/*
+ * Tcp+ip header, after ip options removed.
+ */
+struct tcpiphdr {
+ struct ipovly ti_i; /* overlaid ip structure */
+ struct tcphdr ti_t; /* tcp header */
+};
+#define ti_x1 ti_i.ih_x1
+#define ti_pr ti_i.ih_pr
+#define ti_len ti_i.ih_len
+#define ti_src ti_i.ih_src
+#define ti_dst ti_i.ih_dst
+#define ti_sport ti_t.th_sport
+#define ti_dport ti_t.th_dport
+#define ti_seq ti_t.th_seq
+#define ti_ack ti_t.th_ack
+#define ti_x2 ti_t.th_x2
+#define ti_off ti_t.th_off
+#define ti_flags ti_t.th_flags
+#define ti_win ti_t.th_win
+#define ti_sum ti_t.th_sum
+#define ti_urp ti_t.th_urp
+
+struct tcpipv6hdr {
+ struct ip6_hdr ti6_i;
+ struct tcphdr ti6_t;
+};
+
+#define ti6_src ti6_i.ip6_src
+#define ti6_dst ti6_i.ip6_dst
+#define ti6_plen ti6_i.ip6_plen
+#define ti6_sport ti6_t.th_sport
+#define ti6_dport ti6_t.th_dport
+#define ti6_seq ti6_t.th_seq
+#define ti6_ack ti6_t.th_ack
+#define ti6_x2 ti6_t.th_x2
+#define ti6_off ti6_t.th_off
+#define ti6_flags ti6_t.th_flags
+#define ti6_win ti6_t.th_win
+#define ti6_sum ti6_t.th_sum
+#define ti6_urp ti6_t.th_urp
struct tcp_debug {
uint32_t td_time;