]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp.h
xnu-2782.1.97.tar.gz
[apple/xnu.git] / bsd / netinet / tcp.h
index da955548f9c414302466a164dadb4be112fbd2a4..c4ecae9d89c44dfa415998e05efcf465fa3391fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  *
@@ -144,7 +144,14 @@ struct tcphdr {
 #define        TCPOPT_SACK_HDR         (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_SACK<<8)
 /* Miscellaneous constants */
 #define        MAX_SACK_BLKS   6       /* Max # SACK blocks stored at sender side */
-#define        TCP_MAX_SACK    3       /* MAX # SACKs sent in any segment */
+
+/*
+ * A SACK option that specifies n blocks will have a length of (8*n + 2)
+ * bytes, so the 40 bytes available for TCP options can specify a
+ * maximum of 4 blocks.
+ */
+
+#define        TCP_MAX_SACK    4       /* MAX # SACKs sent in any segment */
 
 
 /*
@@ -209,10 +216,17 @@ struct tcphdr {
 #define        TCP_KEEPINTVL           0x101   /* interval between keepalives */
 #define        TCP_KEEPCNT             0x102   /* number of keepalives before close */
 #define        TCP_SENDMOREACKS        0x103   /* always ack every other packet */
+#define        TCP_ENABLE_ECN          0x104   /* Enable ECN on a connection */
+
 #ifdef PRIVATE
 #define        TCP_INFO                0x200   /* retrieve tcp_info structure */
-#define TCP_NOTSENT_LOWAT      0x201   /* Low water mark for TCP unsent data */
 #define TCP_MEASURE_SND_BW     0x202   /* Measure sender's bandwidth for this connection */
+#endif /* PRIVATE */
+
+
+#define        TCP_NOTSENT_LOWAT       0x201   /* Low water mark for TCP unsent data */
+
+#ifdef PRIVATE
 #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 */    
@@ -222,6 +236,8 @@ struct tcphdr {
  */
 #define        TCP_ENABLE_MSGS 0x206
 #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 */
 
 /*
  * The TCP_INFO socket option is a private API and is subject to change
@@ -294,6 +310,10 @@ struct tcp_info {
        u_int64_t       tcpi_wifi_rxbytes __attribute((aligned(8)));    /* bytes received over Wi-Fi */
        u_int64_t       tcpi_wifi_txpackets __attribute((aligned(8)));  /* packets transmitted over Wi-Fi */
        u_int64_t       tcpi_wifi_txbytes __attribute((aligned(8)));    /* bytes transmitted over Wi-Fi */
+       u_int64_t       tcpi_wired_rxpackets __attribute((aligned(8))); /* packets received over Wired */
+       u_int64_t       tcpi_wired_rxbytes __attribute((aligned(8)));   /* bytes received over Wired */
+       u_int64_t       tcpi_wired_txpackets __attribute((aligned(8))); /* packets transmitted over Wired */
+       u_int64_t       tcpi_wired_txbytes __attribute((aligned(8)));   /* bytes transmitted over Wired */
 };
 
 struct tcp_measure_bw_burst {