The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 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 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_TCP_H |
| 20 | #define _LINUX_TCP_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <linux/types.h> |
| 22 | #include <asm/byteorder.h> |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | struct tcphdr { |
| 25 | __u16 source; |
| 26 | __u16 dest; |
| 27 | __u32 seq; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | __u32 ack_seq; |
| 30 | #ifdef __LITTLE_ENDIAN_BITFIELD |
| 31 | __u16 res1:4, |
| 32 | doff:4, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | fin:1, |
| 35 | syn:1, |
| 36 | rst:1, |
| 37 | psh:1, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 39 | ack:1, |
| 40 | urg:1, |
| 41 | ece:1, |
| 42 | cwr:1; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #elif defined(__BIG_ENDIAN_BITFIELD) |
| 45 | __u16 doff:4, |
| 46 | res1:4, |
| 47 | cwr:1, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | ece:1, |
| 50 | urg:1, |
| 51 | ack:1, |
| 52 | psh:1, |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | rst:1, |
| 55 | syn:1, |
| 56 | fin:1; |
| 57 | #else |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | #error "Adjust your <asm/byteorder.h> defines" |
| 60 | #endif |
| 61 | __u16 window; |
| 62 | __u16 check; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | __u16 urg_ptr; |
| 65 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 66 | union tcp_word_hdr { |
| 67 | struct tcphdr hdr; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | __u32 words[5]; |
| 70 | }; |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 71 | #define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3]) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 72 | enum { |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | TCP_FLAG_CWR = __constant_htonl(0x00800000), |
| 75 | TCP_FLAG_ECE = __constant_htonl(0x00400000), |
| 76 | TCP_FLAG_URG = __constant_htonl(0x00200000), |
| 77 | TCP_FLAG_ACK = __constant_htonl(0x00100000), |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | TCP_FLAG_PSH = __constant_htonl(0x00080000), |
| 80 | TCP_FLAG_RST = __constant_htonl(0x00040000), |
| 81 | TCP_FLAG_SYN = __constant_htonl(0x00020000), |
| 82 | TCP_FLAG_FIN = __constant_htonl(0x00010000), |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 84 | TCP_RESERVED_BITS = __constant_htonl(0x0F000000), |
| 85 | TCP_DATA_OFFSET = __constant_htonl(0xF0000000) |
| 86 | }; |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 87 | #define TCP_NODELAY 1 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 89 | #define TCP_MAXSEG 2 |
| 90 | #define TCP_CORK 3 |
| 91 | #define TCP_KEEPIDLE 4 |
| 92 | #define TCP_KEEPINTVL 5 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 94 | #define TCP_KEEPCNT 6 |
| 95 | #define TCP_SYNCNT 7 |
| 96 | #define TCP_LINGER2 8 |
| 97 | #define TCP_DEFER_ACCEPT 9 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 98 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 99 | #define TCP_WINDOW_CLAMP 10 |
| 100 | #define TCP_INFO 11 |
| 101 | #define TCP_QUICKACK 12 |
| 102 | #define TCP_CONGESTION 13 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 103 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 104 | #define TCPI_OPT_TIMESTAMPS 1 |
| 105 | #define TCPI_OPT_SACK 2 |
| 106 | #define TCPI_OPT_WSCALE 4 |
| 107 | #define TCPI_OPT_ECN 8 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 108 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 109 | enum tcp_ca_state |
| 110 | { |
| 111 | TCP_CA_Open = 0, |
| 112 | #define TCPF_CA_Open (1<<TCP_CA_Open) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 113 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 114 | TCP_CA_Disorder = 1, |
| 115 | #define TCPF_CA_Disorder (1<<TCP_CA_Disorder) |
| 116 | TCP_CA_CWR = 2, |
| 117 | #define TCPF_CA_CWR (1<<TCP_CA_CWR) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 118 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 119 | TCP_CA_Recovery = 3, |
| 120 | #define TCPF_CA_Recovery (1<<TCP_CA_Recovery) |
| 121 | TCP_CA_Loss = 4 |
| 122 | #define TCPF_CA_Loss (1<<TCP_CA_Loss) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 123 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 124 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 125 | struct tcp_info |
| 126 | { |
| 127 | __u8 tcpi_state; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 128 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 129 | __u8 tcpi_ca_state; |
| 130 | __u8 tcpi_retransmits; |
| 131 | __u8 tcpi_probes; |
| 132 | __u8 tcpi_backoff; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 133 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 134 | __u8 tcpi_options; |
| 135 | __u8 tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 136 | __u32 tcpi_rto; |
| 137 | __u32 tcpi_ato; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 138 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 139 | __u32 tcpi_snd_mss; |
| 140 | __u32 tcpi_rcv_mss; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 141 | __u32 tcpi_unacked; |
| 142 | __u32 tcpi_sacked; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 143 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 144 | __u32 tcpi_lost; |
| 145 | __u32 tcpi_retrans; |
| 146 | __u32 tcpi_fackets; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 147 | __u32 tcpi_last_data_sent; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 148 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 149 | __u32 tcpi_last_ack_sent; |
| 150 | __u32 tcpi_last_data_recv; |
| 151 | __u32 tcpi_last_ack_recv; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 152 | __u32 tcpi_pmtu; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 153 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 154 | __u32 tcpi_rcv_ssthresh; |
| 155 | __u32 tcpi_rtt; |
| 156 | __u32 tcpi_rttvar; |
| 157 | __u32 tcpi_snd_ssthresh; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 158 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 159 | __u32 tcpi_snd_cwnd; |
| 160 | __u32 tcpi_advmss; |
| 161 | __u32 tcpi_reordering; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 162 | __u32 tcpi_rcv_rtt; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 163 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 164 | __u32 tcpi_rcv_space; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 165 | __u32 tcpi_total_retrans; |
| 166 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 167 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 168 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |