]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp.h
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / bsd / netinet / tcp.h
index 369a709d7a2decc38d7fd0f66aef9cd1b135acce..b63fc818bc5bacbb8acf16a21eda8e71662492e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2016 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2018 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
 
 #ifndef _NETINET_TCP_H_
 #define _NETINET_TCP_H_
-#include <sys/types.h>
+#ifndef DRIVERKIT
 #include <sys/appleapiopts.h>
+#endif /* DRIVERKIT */
+
 #include <machine/endian.h>
 #include <machine/types.h> /* __uint32_t */
 
+#ifndef DRIVERKIT
+#include <sys/types.h>
+#else
+#include <sys/_types.h>
+#endif /* DRIVERKIT */
+
 #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
 typedef __uint32_t tcp_seq;
 typedef __uint32_t tcp_cc;              /* connection count per rfc1644 */
@@ -237,11 +245,7 @@ struct tcphdr {
 #define TCP_MEASURE_BW_BURST    0x203   /* Burst size to use for bandwidth measurement */
 #define TCP_PEER_PID            0x204   /* Lookup pid of the process we're connected to */
 #define TCP_ADAPTIVE_READ_TIMEOUT       0x205   /* Read timeout used as a multiple of RTT */
-/*
- * Enable message delivery on a socket, this feature is currently unsupported and
- * is subjected to change in future.
- */
-#define TCP_ENABLE_MSGS                 0x206
+#define TCP_OPTION_UNUSED_0             0x206   /* UNUSED */
 #define TCP_ADAPTIVE_WRITE_TIMEOUT      0x207   /* Write timeout used as a multiple of RTT */
 #define TCP_NOTIMEWAIT                  0x208   /* Avoid going into time-wait */
 #define TCP_DISABLE_BLACKHOLE_DETECTION 0x209   /* disable PMTU blackhole detection */
@@ -288,7 +292,8 @@ struct tcp_notify_ack_complete {
 #define MPTCP_SVCTYPE_HANDOVER          0 /* Default 0 */
 #define MPTCP_SVCTYPE_INTERACTIVE       1
 #define MPTCP_SVCTYPE_AGGREGATE         2
-#define MPTCP_SVCTYPE_MAX               3
+#define MPTCP_SVCTYPE_TARGET_BASED      3
+#define MPTCP_SVCTYPE_MAX               4
 /*
  * Specify minimum time in seconds before which an established
  * TCP connection will not be dropped when there is no response from the
@@ -299,6 +304,9 @@ struct tcp_notify_ack_complete {
 #define TCP_RXT_MINIMUM_TIMEOUT_LIMIT   (5 * 60) /* Limit is 5 minutes */
 
 #define MPTCP_ALTERNATE_PORT            0x216
+#define MPTCP_FORCE_ENABLE              0x217
+#define TCP_FASTOPEN_FORCE_ENABLE       0x218
+#define MPTCP_EXPECTED_PROGRESS_TARGET  0x219
 
 /*
  * The TCP_INFO socket option is a private API and is subject to change
@@ -474,11 +482,17 @@ typedef struct conninfo_tcp {
 #pragma pack()
 
 struct mptcp_itf_stats {
-       uint16_t        ifindex;
-       uint16_t        switches;
-       uint32_t        is_expensive:1;
-       uint64_t        mpis_txbytes __attribute__((aligned(8)));
-       uint64_t        mpis_rxbytes __attribute__((aligned(8)));
+       u_short  ifindex;
+       uint16_t switches;
+       uint32_t is_expensive:1;
+       uint64_t mpis_txbytes __attribute__((aligned(8)));
+       uint64_t mpis_rxbytes __attribute__((aligned(8)));
+       uint64_t mpis_wifi_txbytes __attribute__((aligned(8)));
+       uint64_t mpis_wifi_rxbytes __attribute__((aligned(8)));
+       uint64_t mpis_wired_txbytes __attribute__((aligned(8)));
+       uint64_t mpis_wired_rxbytes __attribute__((aligned(8)));
+       uint64_t mpis_cell_txbytes __attribute__((aligned(8)));
+       uint64_t mpis_cell_rxbytes __attribute__((aligned(8)));
 };
 
 /* Version solely used to let libnetcore survive */