| tag | line | file | source code |
| th | 226 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
| th | 244 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
| th | 245 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
| th | 250 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
| th | 251 | drivers/net/slhc.c | ! (th->ack)){ |
| th | 252 | drivers/net/slhc.c | DPRINT(("comp: noncomp 2 %x %x %d %d %d %d\n", ip, th, |
| th | 253 | drivers/net/slhc.c | th->syn, th->fin, th->rst, th->ack)); |
| th | 275 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
| th | 276 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
| th | 335 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
| th | 337 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){ |
| th | 348 | drivers/net/slhc.c | if(th->urg){ |
| th | 349 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
| th | 352 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
| th | 360 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
| th | 364 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
| th | 370 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
| th | 419 | drivers/net/slhc.c | if(th->psh) |
| th | 424 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
| th | 426 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
| th | 460 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
| th | 463 | drivers/net/slhc.c | if (th->doff > 5) |
| th | 464 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
| th | 83 | drivers/net/slip.c | struct tcphdr *th; |
| th | 89 | drivers/net/slip.c | th = (struct tcphdr *) (ptr + ip->ihl * 4); |
| th | 92 | drivers/net/slip.c | ntohl(th->seq), ntohl(th->ack_seq), ntohs(ip->tot_len)); |
| th | 52 | net/inet/skbuff.h | struct tcphdr *th; |
| th | 124 | net/inet/tcp.c | static void __print_th(struct tcphdr *th) |
| th | 130 | net/inet/tcp.c | ntohs(th->source), ntohs(th->dest), |
| th | 131 | net/inet/tcp.c | ntohl(th->seq), ntohl(th->ack_seq)); |
| th | 133 | net/inet/tcp.c | th->fin, th->syn, th->rst, th->psh, th->ack, |
| th | 134 | net/inet/tcp.c | th->urg, th->res1, th->res2); |
| th | 136 | net/inet/tcp.c | ntohs(th->window), ntohs(th->check), ntohs(th->urg_ptr)); |
| th | 137 | net/inet/tcp.c | printk(" doff = %d\n", th->doff); |
| th | 138 | net/inet/tcp.c | ptr =(unsigned char *)(th + 1); |
| th | 142 | net/inet/tcp.c | static inline void print_th(struct tcphdr *th) |
| th | 145 | net/inet/tcp.c | __print_th(th); |
| th | 254 | net/inet/tcp.c | struct tcphdr *th; |
| th | 263 | net/inet/tcp.c | th =(struct tcphdr *)header; |
| th | 264 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
| th | 265 | net/inet/tcp.c | print_th(th); |
| th | 348 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
| th | 350 | net/inet/tcp.c | sum = skb->len -(counted - skb->h.th->seq); /* Length - header but start from where we are up to (avoid overlaps) */ |
| th | 351 | net/inet/tcp.c | if (skb->h.th->syn) |
| th | 355 | net/inet/tcp.c | if (skb->h.th->syn) amount--; |
| th | 358 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
| th | 527 | net/inet/tcp.c | tcp_check(struct tcphdr *th, int len, |
| th | 533 | net/inet/tcp.c | print_th(th); |
| th | 548 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
| th | 549 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
| th | 567 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
| th | 568 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
| th | 579 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
| th | 588 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
| th | 591 | net/inet/tcp.c | th->check = 0; |
| th | 592 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
| th | 599 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
| th | 602 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
| th | 607 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
| th | 615 | net/inet/tcp.c | if(!th->syn && !th->fin) { |
| th | 623 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
| th | 625 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
| th | 702 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
| th | 745 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
| th | 748 | net/inet/tcp.c | t1->dest = th->source; |
| th | 749 | net/inet/tcp.c | t1->source = th->dest; |
| th | 784 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
| th | 788 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
| th | 789 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
| th | 790 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
| th | 791 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
| th | 792 | net/inet/tcp.c | th->ack = 1; |
| th | 793 | net/inet/tcp.c | th->fin = 0; |
| th | 797 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
| th | 799 | net/inet/tcp.c | th->window = htons(sk->window); |
| th | 801 | net/inet/tcp.c | return(sizeof(*th)); |
| th | 913 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
| th | 1028 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
| th | 1353 | net/inet/tcp.c | if (before(1+*seq, skb->h.th->seq)) |
| th | 1355 | net/inet/tcp.c | offset = 1 + *seq - skb->h.th->seq; |
| th | 1356 | net/inet/tcp.c | if (skb->h.th->syn) |
| th | 1424 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
| th | 1425 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
| th | 1454 | net/inet/tcp.c | struct tcphdr *t1, *th; |
| th | 1476 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
| th | 1509 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 1582 | net/inet/tcp.c | tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
| th | 1616 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 1619 | net/inet/tcp.c | t1->dest = th->source; |
| th | 1620 | net/inet/tcp.c | t1->source = th->dest; |
| th | 1624 | net/inet/tcp.c | if(th->ack) |
| th | 1627 | net/inet/tcp.c | t1->seq = th->ack_seq; |
| th | 1633 | net/inet/tcp.c | if(!th->syn) |
| th | 1634 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
| th | 1636 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
| th | 1659 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
| th | 1662 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
| th | 1665 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
| th | 1685 | net/inet/tcp.c | if(opsize==4 && th->syn) |
| th | 1697 | net/inet/tcp.c | if (th->syn) { |
| th | 1730 | net/inet/tcp.c | struct tcphdr *th; |
| th | 1737 | net/inet/tcp.c | th = skb->h.th; |
| th | 1744 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
| th | 1802 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
| th | 1803 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
| th | 1804 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
| th | 1815 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
| th | 1816 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
| th | 1832 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
| th | 1833 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
| th | 1857 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
| th | 1894 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
| th | 1898 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
| th | 1911 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
| th | 1941 | net/inet/tcp.c | struct tcphdr *t1, *th; |
| th | 1966 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
| th | 2011 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
| th | 2051 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 2175 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
| th | 2189 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
| th | 2192 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
| th | 2194 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) { |
| th | 2195 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
| th | 2214 | net/inet/tcp.c | if (len != th->doff*4) flag |= 1; |
| th | 2217 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
| th | 2235 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
| th | 2278 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
| th | 2496 | net/inet/tcp.c | th, sk->daddr); |
| th | 2554 | net/inet/tcp.c | struct tcphdr *th; |
| th | 2557 | net/inet/tcp.c | th = skb->h.th; |
| th | 2558 | net/inet/tcp.c | print_th(th); |
| th | 2559 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
| th | 2564 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) { |
| th | 2566 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
| th | 2572 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
| th | 2573 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
| th | 2610 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
| th | 2611 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
| th | 2616 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) { |
| th | 2634 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
| th | 2643 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
| th | 2658 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
| th | 2659 | net/inet/tcp.c | if (th->syn) th->ack_seq++; |
| th | 2660 | net/inet/tcp.c | if (th->fin) th->ack_seq++; |
| th | 2668 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
| th | 2669 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
| th | 2672 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) { |
| th | 2674 | net/inet/tcp.c | (th->ack_seq - sk->acked_seq); |
| th | 2678 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
| th | 2683 | net/inet/tcp.c | if (skb->h.th->fin) { |
| th | 2691 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
| th | 2692 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
| th | 2695 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
| th | 2699 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
| th | 2707 | net/inet/tcp.c | if (skb2->h.th->fin) { |
| th | 2725 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
| th | 2771 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 2776 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 2802 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
| th | 2804 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
| th | 2808 | net/inet/tcp.c | ptr += th->seq; |
| th | 2830 | net/inet/tcp.c | static inline int tcp_urg(struct sock *sk, struct tcphdr *th, |
| th | 2836 | net/inet/tcp.c | if (th->urg) |
| th | 2837 | net/inet/tcp.c | tcp_check_urg(sk,th); |
| th | 2844 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
| th | 2849 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
| th | 2858 | net/inet/tcp.c | tcp_fin(struct sock *sk, struct tcphdr *th, |
| th | 2862 | net/inet/tcp.c | sk, th, saddr, dev)); |
| th | 2874 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
| th | 2876 | net/inet/tcp.c | if (th->rst) sk->shutdown = SHUTDOWN_MASK; |
| th | 2885 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
| th | 3077 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
| th | 3082 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
| th | 3083 | net/inet/tcp.c | if (th->fin) |
| th | 3088 | net/inet/tcp.c | next_seq += th->seq; |
| th | 3101 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
| th | 3118 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
| th | 3122 | net/inet/tcp.c | if (th->rst) |
| th | 3126 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 3136 | net/inet/tcp.c | struct tcphdr *th; |
| th | 3157 | net/inet/tcp.c | th = skb->h.th; |
| th | 3160 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
| th | 3174 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) { |
| th | 3186 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
| th | 3190 | net/inet/tcp.c | if (!th->rst) |
| th | 3191 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
| th | 3254 | net/inet/tcp.c | if (th->rst) { |
| th | 3272 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
| th | 3276 | net/inet/tcp.c | if(!th->rst) |
| th | 3278 | net/inet/tcp.c | sk, th, saddr); |
| th | 3285 | net/inet/tcp.c | if (th->rst) { |
| th | 3312 | net/inet/tcp.c | th->syn) { |
| th | 3316 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
| th | 3325 | net/inet/tcp.c | if (th->ack && !tcp_ack(sk, th, saddr, len)) { |
| th | 3331 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
| th | 3344 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
| th | 3361 | net/inet/tcp.c | if (!th->rst) { |
| th | 3362 | net/inet/tcp.c | if (!th->ack) |
| th | 3363 | net/inet/tcp.c | th->ack_seq = 0; |
| th | 3364 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
| th | 3371 | net/inet/tcp.c | if (th->rst) { |
| th | 3376 | net/inet/tcp.c | if (th->ack) { |
| th | 3377 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
| th | 3383 | net/inet/tcp.c | if (th->syn) { |
| th | 3386 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
| th | 3408 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
| th | 3415 | net/inet/tcp.c | if (th->rst) { |
| th | 3432 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
| th | 3441 | net/inet/tcp.c | if (!th->ack) { |
| th | 3442 | net/inet/tcp.c | if (th->syn) { |
| th | 3453 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
| th | 3454 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
| th | 3465 | net/inet/tcp.c | if (!th->syn) { |
| th | 3472 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
| th | 3473 | net/inet/tcp.c | sk->fin_seq = th->seq; |
| th | 3474 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, th->seq+1, |
| th | 3475 | net/inet/tcp.c | sk, th, sk->daddr); |
| th | 3478 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
| th | 3479 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
| th | 3492 | net/inet/tcp.c | tcp_options(sk, th); |
| th | 3493 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
| th | 3517 | net/inet/tcp.c | if (th->urg) { |
| th | 3518 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
| th | 3527 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
| th | 3532 | net/inet/tcp.c | if (th->urg) { |
| th | 3533 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
| th | 3546 | net/inet/tcp.c | if (!th->fin) { |
| th | 3550 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
| th | 99 | net/inet/udp.c | struct udphdr *th; |
| th | 105 | net/inet/udp.c | th = (struct udphdr *)header; |
| th | 108 | net/inet/udp.c | sport=%d,dport=%d", err, header, daddr, saddr, protocol, (int)th->source,(int)th->dest)); |
| th | 110 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |