Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_LINUX_TCP_H |
| 20 | #define _UAPI_LINUX_TCP_H |
| 21 | #include <linux/types.h> |
| 22 | #include <asm/byteorder.h> |
| 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 24 | #include <linux/socket.h> |
| 25 | struct tcphdr { |
| 26 | __be16 source; |
| 27 | __be16 dest; |
| 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 29 | __be32 seq; |
| 30 | __be32 ack_seq; |
| 31 | #ifdef __LITTLE_ENDIAN_BITFIELD |
| 32 | __u16 res1:4, |
| 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 34 | doff:4, |
| 35 | fin:1, |
| 36 | syn:1, |
| 37 | rst:1, |
| 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 39 | psh:1, |
| 40 | ack:1, |
| 41 | urg:1, |
| 42 | ece:1, |
| 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 44 | cwr:1; |
| 45 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 46 | __u16 doff:4, |
| 47 | res1:4, |
| 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 49 | cwr:1, |
| 50 | ece:1, |
| 51 | urg:1, |
| 52 | ack:1, |
| 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 54 | psh:1, |
| 55 | rst:1, |
| 56 | syn:1, |
| 57 | fin:1; |
| 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 59 | #else |
| 60 | #error "Adjust your <asm/byteorder.h> defines" |
| 61 | #endif |
| 62 | __be16 window; |
| 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 64 | __sum16 check; |
| 65 | __be16 urg_ptr; |
| 66 | }; |
| 67 | union tcp_word_hdr { |
| 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 69 | struct tcphdr hdr; |
| 70 | __be32 words[5]; |
| 71 | }; |
| 72 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
| 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 74 | enum { |
| 75 | TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), |
| 76 | TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), |
| 77 | TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), |
| 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 79 | TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000), |
| 80 | TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000), |
| 81 | TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), |
| 82 | TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), |
| 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 84 | TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), |
| 85 | TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), |
| 86 | TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) |
| 87 | }; |
| 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 89 | #define TCP_MSS_DEFAULT 536U |
| 90 | #define TCP_MSS_DESIRED 1220U |
| 91 | #define TCP_NODELAY 1 |
| 92 | #define TCP_MAXSEG 2 |
| 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 94 | #define TCP_CORK 3 |
| 95 | #define TCP_KEEPIDLE 4 |
| 96 | #define TCP_KEEPINTVL 5 |
| 97 | #define TCP_KEEPCNT 6 |
| 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 99 | #define TCP_SYNCNT 7 |
| 100 | #define TCP_LINGER2 8 |
| 101 | #define TCP_DEFER_ACCEPT 9 |
| 102 | #define TCP_WINDOW_CLAMP 10 |
| 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 104 | #define TCP_INFO 11 |
| 105 | #define TCP_QUICKACK 12 |
| 106 | #define TCP_CONGESTION 13 |
| 107 | #define TCP_MD5SIG 14 |
| 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 109 | #define TCP_THIN_LINEAR_TIMEOUTS 16 |
| 110 | #define TCP_THIN_DUPACK 17 |
| 111 | #define TCP_USER_TIMEOUT 18 |
| 112 | #define TCP_REPAIR 19 |
| 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 114 | #define TCP_REPAIR_QUEUE 20 |
| 115 | #define TCP_QUEUE_SEQ 21 |
| 116 | #define TCP_REPAIR_OPTIONS 22 |
| 117 | #define TCP_FASTOPEN 23 |
| 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
| 119 | #define TCP_TIMESTAMP 24 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 120 | #define TCP_NOTSENT_LOWAT 25 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | struct tcp_repair_opt { |
| 122 | __u32 opt_code; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 124 | __u32 opt_val; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 125 | }; |
| 126 | enum { |
| 127 | TCP_NO_QUEUE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 129 | TCP_RECV_QUEUE, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 130 | TCP_SEND_QUEUE, |
| 131 | TCP_QUEUES_NR, |
| 132 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 134 | #define TCPI_OPT_TIMESTAMPS 1 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 135 | #define TCPI_OPT_SACK 2 |
| 136 | #define TCPI_OPT_WSCALE 4 |
| 137 | #define TCPI_OPT_ECN 8 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 139 | #define TCPI_OPT_ECN_SEEN 16 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #define TCPI_OPT_SYN_DATA 32 |
| 141 | enum tcp_ca_state { |
| 142 | TCP_CA_Open = 0, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 144 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 145 | TCP_CA_Disorder = 1, |
| 146 | #define TCPF_CA_Disorder (1<<TCP_CA_Disorder) |
| 147 | TCP_CA_CWR = 2, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 149 | #define TCPF_CA_CWR (1<<TCP_CA_CWR) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 150 | TCP_CA_Recovery = 3, |
| 151 | #define TCPF_CA_Recovery (1<<TCP_CA_Recovery) |
| 152 | TCP_CA_Loss = 4 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 154 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 155 | }; |
| 156 | struct tcp_info { |
| 157 | __u8 tcpi_state; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 159 | __u8 tcpi_ca_state; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | __u8 tcpi_retransmits; |
| 161 | __u8 tcpi_probes; |
| 162 | __u8 tcpi_backoff; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 164 | __u8 tcpi_options; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 165 | __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; |
| 166 | __u32 tcpi_rto; |
| 167 | __u32 tcpi_ato; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 169 | __u32 tcpi_snd_mss; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 170 | __u32 tcpi_rcv_mss; |
| 171 | __u32 tcpi_unacked; |
| 172 | __u32 tcpi_sacked; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 173 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 174 | __u32 tcpi_lost; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 175 | __u32 tcpi_retrans; |
| 176 | __u32 tcpi_fackets; |
| 177 | __u32 tcpi_last_data_sent; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 178 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 179 | __u32 tcpi_last_ack_sent; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 180 | __u32 tcpi_last_data_recv; |
| 181 | __u32 tcpi_last_ack_recv; |
| 182 | __u32 tcpi_pmtu; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 183 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 184 | __u32 tcpi_rcv_ssthresh; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 185 | __u32 tcpi_rtt; |
| 186 | __u32 tcpi_rttvar; |
| 187 | __u32 tcpi_snd_ssthresh; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 189 | __u32 tcpi_snd_cwnd; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 190 | __u32 tcpi_advmss; |
| 191 | __u32 tcpi_reordering; |
| 192 | __u32 tcpi_rcv_rtt; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 193 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 194 | __u32 tcpi_rcv_space; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 195 | __u32 tcpi_total_retrans; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 196 | __u64 tcpi_pacing_rate; |
| 197 | __u64 tcpi_max_pacing_rate; |
| 198 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 199 | }; |
| 200 | #define TCP_MD5SIG_MAXKEYLEN 80 |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 201 | struct tcp_md5sig { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 202 | struct __kernel_sockaddr_storage tcpm_addr; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 203 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 204 | __u16 __tcpm_pad1; |
| 205 | __u16 tcpm_keylen; |
Christopher Ferris | 38062f9 | 2014-07-09 15:33:25 -0700 | [diff] [blame] | 206 | __u32 __tcpm_pad2; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 207 | __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 208 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 209 | }; |
| 210 | #endif |