Home | History | Annotate | Download | only in android-clat

Lines Matching refs:tcp

27 #include <netinet/tcp.h>
164 /* print tcp header */
165 void dump_tcp_generic(const struct tcphdr *tcp, const uint8_t *options, size_t options_size, uint32_t temp_checksum, const uint8_t *payload, size_t payload_size) {
168 temp_checksum = ip_checksum_add(temp_checksum, tcp, sizeof(struct tcphdr));
175 printf("TCP\n");
176 printf("source = %x\n",ntohs(tcp->source));
177 printf("dest = %x\n",ntohs(tcp->dest));
178 printf("seq = %x\n",ntohl(tcp->seq));
179 printf("ack = %x\n",ntohl(tcp->ack_seq));
180 printf("d_off = %x\n",tcp->doff);
181 printf("res1 = %x\n",tcp->res1);
183 printf("CWR = %x\n",tcp->cwr);
184 printf("ECE = %x\n",tcp->ece);
186 printf("CWR/ECE = %x\n",tcp->res2);
189 tcp->urg, tcp->ack, tcp->psh, tcp->rst, tcp->syn, tcp->fin);
190 printf("window = %x\n",ntohs(tcp->window));
191 printf("check = %x [mine %x]\n",tcp->check,my_checksum);
192 printf("urgent = %x\n",tcp->urg_ptr);
205 /* print ipv4/tcp header */
206 void dump_tcp(const struct tcphdr *tcp, const struct iphdr *ip,
211 temp_checksum = ipv4_pseudo_header_checksum(ip, sizeof(*tcp) + options_size + payload_size);
212 dump_tcp_generic(tcp, options, options_size, temp_checksum, payload, payload_size);
215 /* print ipv6/tcp header */
216 void dump_tcp6(const struct tcphdr *tcp, const struct ip6_hdr *ip6,
221 temp_checksum = ipv6_pseudo_header_checksum(ip6, sizeof(*tcp) + options_size + payload_size, IPPROTO_TCP);
222 dump_tcp_generic(tcp, options, options_size, temp_checksum, payload, payload_size);