tcp.h revision 48af7cb2e205dcc2f09a1a1b8a1a37c93e1943f0
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> 25struct 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, doff : 4, fin : 1, syn : 1, rst : 1, psh : 1, ack : 1, urg : 1, ece : 1, cwr : 1; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34#elif defined(__BIG_ENDIAN_BITFIELD) 35 __u16 doff : 4, res1 : 4, cwr : 1, ece : 1, urg : 1, ack : 1, psh : 1, rst : 1, syn : 1, fin : 1; 36#else 37#error "Adjust your <asm/byteorder.h> defines" 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39#endif 40 __be16 window; 41 __sum16 check; 42 __be16 urg_ptr; 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44}; 45union tcp_word_hdr { 46 struct tcphdr hdr; 47 __be32 words[5]; 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49}; 50#define tcp_flag_word(tp) (((union tcp_word_hdr *) (tp))->words[3]) 51enum { 52 TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), 55 TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), 56 TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000), 57 TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000), 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), 60 TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), 61 TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), 62 TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) 65}; 66#define TCP_MSS_DEFAULT 536U 67#define TCP_MSS_DESIRED 1220U 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define TCP_NODELAY 1 70#define TCP_MAXSEG 2 71#define TCP_CORK 3 72#define TCP_KEEPIDLE 4 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74#define TCP_KEEPINTVL 5 75#define TCP_KEEPCNT 6 76#define TCP_SYNCNT 7 77#define TCP_LINGER2 8 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79#define TCP_DEFER_ACCEPT 9 80#define TCP_WINDOW_CLAMP 10 81#define TCP_INFO 11 82#define TCP_QUICKACK 12 83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 84#define TCP_CONGESTION 13 85#define TCP_MD5SIG 14 86#define TCP_THIN_LINEAR_TIMEOUTS 16 87#define TCP_THIN_DUPACK 17 88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 89#define TCP_USER_TIMEOUT 18 90#define TCP_REPAIR 19 91#define TCP_REPAIR_QUEUE 20 92#define TCP_QUEUE_SEQ 21 93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 94#define TCP_REPAIR_OPTIONS 22 95#define TCP_FASTOPEN 23 96#define TCP_TIMESTAMP 24 97#define TCP_NOTSENT_LOWAT 25 98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 99#define TCP_CC_INFO 26 100#define TCP_SAVE_SYN 27 101#define TCP_SAVED_SYN 28 102#define TCP_REPAIR_WINDOW 29 103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 104struct tcp_repair_opt { 105 __u32 opt_code; 106 __u32 opt_val; 107}; 108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 109struct tcp_repair_window { 110 __u32 snd_wl1; 111 __u32 snd_wnd; 112 __u32 max_window; 113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 114 __u32 rcv_wnd; 115 __u32 rcv_wup; 116}; 117enum { 118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 119 TCP_NO_QUEUE, 120 TCP_RECV_QUEUE, 121 TCP_SEND_QUEUE, 122 TCP_QUEUES_NR, 123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 124}; 125#define TCPI_OPT_TIMESTAMPS 1 126#define TCPI_OPT_SACK 2 127#define TCPI_OPT_WSCALE 4 128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 129#define TCPI_OPT_ECN 8 130#define TCPI_OPT_ECN_SEEN 16 131#define TCPI_OPT_SYN_DATA 32 132enum tcp_ca_state { 133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 134 TCP_CA_Open = 0, 135#define TCPF_CA_Open (1 << TCP_CA_Open) 136 TCP_CA_Disorder = 1, 137#define TCPF_CA_Disorder (1 << TCP_CA_Disorder) 138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 139 TCP_CA_CWR = 2, 140#define TCPF_CA_CWR (1 << TCP_CA_CWR) 141 TCP_CA_Recovery = 3, 142#define TCPF_CA_Recovery (1 << TCP_CA_Recovery) 143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 144 TCP_CA_Loss = 4 145#define TCPF_CA_Loss (1 << TCP_CA_Loss) 146}; 147struct tcp_info { 148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 149 __u8 tcpi_state; 150 __u8 tcpi_ca_state; 151 __u8 tcpi_retransmits; 152 __u8 tcpi_probes; 153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 154 __u8 tcpi_backoff; 155 __u8 tcpi_options; 156 __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; 157 __u8 tcpi_delivery_rate_app_limited : 1; 158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 159 __u32 tcpi_rto; 160 __u32 tcpi_ato; 161 __u32 tcpi_snd_mss; 162 __u32 tcpi_rcv_mss; 163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 164 __u32 tcpi_unacked; 165 __u32 tcpi_sacked; 166 __u32 tcpi_lost; 167 __u32 tcpi_retrans; 168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 169 __u32 tcpi_fackets; 170 __u32 tcpi_last_data_sent; 171 __u32 tcpi_last_ack_sent; 172 __u32 tcpi_last_data_recv; 173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 174 __u32 tcpi_last_ack_recv; 175 __u32 tcpi_pmtu; 176 __u32 tcpi_rcv_ssthresh; 177 __u32 tcpi_rtt; 178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 179 __u32 tcpi_rttvar; 180 __u32 tcpi_snd_ssthresh; 181 __u32 tcpi_snd_cwnd; 182 __u32 tcpi_advmss; 183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 184 __u32 tcpi_reordering; 185 __u32 tcpi_rcv_rtt; 186 __u32 tcpi_rcv_space; 187 __u32 tcpi_total_retrans; 188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 189 __u64 tcpi_pacing_rate; 190 __u64 tcpi_max_pacing_rate; 191 __u64 tcpi_bytes_acked; 192 __u64 tcpi_bytes_received; 193/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 194 __u32 tcpi_segs_out; 195 __u32 tcpi_segs_in; 196 __u32 tcpi_notsent_bytes; 197 __u32 tcpi_min_rtt; 198/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 199 __u32 tcpi_data_segs_in; 200 __u32 tcpi_data_segs_out; 201 __u64 tcpi_delivery_rate; 202 __u64 tcpi_busy_time; 203/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 204 __u64 tcpi_rwnd_limited; 205 __u64 tcpi_sndbuf_limited; 206}; 207enum { 208/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 209 TCP_NLA_PAD, 210 TCP_NLA_BUSY, 211 TCP_NLA_RWND_LIMITED, 212 TCP_NLA_SNDBUF_LIMITED, 213/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 214}; 215#define TCP_MD5SIG_MAXKEYLEN 80 216struct tcp_md5sig { 217 struct __kernel_sockaddr_storage tcpm_addr; 218/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 219 __u16 __tcpm_pad1; 220 __u16 tcpm_keylen; 221 __u32 __tcpm_pad2; 222 __u8 tcpm_key[TCP_MD5SIG_MAXKEYLEN]; 223/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 224}; 225#endif 226