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 | 238 | net/inet/tcp.c | struct tcphdr *th; |
th | 247 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 248 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
th | 249 | net/inet/tcp.c | print_th(th); |
th | 332 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 334 | 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 | 335 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 339 | net/inet/tcp.c | if (skb->h.th->syn) amount--; |
th | 342 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 511 | net/inet/tcp.c | tcp_check(struct tcphdr *th, int len, |
th | 517 | net/inet/tcp.c | print_th(th); |
th | 532 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
th | 533 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
th | 551 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
th | 552 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
th | 563 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
th | 572 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 575 | net/inet/tcp.c | th->check = 0; |
th | 576 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 583 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 586 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 591 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 599 | net/inet/tcp.c | if(!th->syn && !th->fin) { |
th | 607 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 609 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 686 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 729 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 732 | net/inet/tcp.c | t1->dest = th->source; |
th | 733 | net/inet/tcp.c | t1->source = th->dest; |
th | 768 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 772 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 773 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 774 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 775 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 776 | net/inet/tcp.c | th->ack = 1; |
th | 777 | net/inet/tcp.c | th->fin = 0; |
th | 781 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 783 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 785 | net/inet/tcp.c | return(sizeof(*th)); |
th | 897 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1012 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1337 | net/inet/tcp.c | if (before(1+*seq, skb->h.th->seq)) |
th | 1339 | net/inet/tcp.c | offset = 1 + *seq - skb->h.th->seq; |
th | 1340 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1408 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1409 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1438 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1460 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1493 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1566 | net/inet/tcp.c | tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1600 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1603 | net/inet/tcp.c | t1->dest = th->source; |
th | 1604 | net/inet/tcp.c | t1->source = th->dest; |
th | 1608 | net/inet/tcp.c | if(th->ack) |
th | 1611 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 1617 | net/inet/tcp.c | if(!th->syn) |
th | 1618 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1620 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1643 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1646 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1649 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1669 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 1681 | net/inet/tcp.c | if (th->syn) { |
th | 1714 | net/inet/tcp.c | struct tcphdr *th; |
th | 1721 | net/inet/tcp.c | th = skb->h.th; |
th | 1728 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 1786 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 1787 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 1788 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1799 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 1800 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 1816 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 1817 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1841 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 1878 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 1882 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 1895 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 1925 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1950 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
th | 1995 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2035 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2159 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2173 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2176 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
th | 2178 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) { |
th | 2179 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 2198 | net/inet/tcp.c | if (len != th->doff*4) flag |= 1; |
th | 2201 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
th | 2219 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2262 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2480 | net/inet/tcp.c | th, sk->daddr); |
th | 2538 | net/inet/tcp.c | struct tcphdr *th; |
th | 2541 | net/inet/tcp.c | th = skb->h.th; |
th | 2542 | net/inet/tcp.c | print_th(th); |
th | 2543 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2548 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) { |
th | 2550 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 2556 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
th | 2557 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 2594 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 2595 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 2600 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) { |
th | 2618 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 2627 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 2642 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 2643 | net/inet/tcp.c | if (th->syn) th->ack_seq++; |
th | 2644 | net/inet/tcp.c | if (th->fin) th->ack_seq++; |
th | 2652 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
th | 2653 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
th | 2656 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) { |
th | 2658 | net/inet/tcp.c | (th->ack_seq - sk->acked_seq); |
th | 2662 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 2667 | net/inet/tcp.c | if (skb->h.th->fin) { |
th | 2675 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
th | 2676 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 2679 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 2683 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 2691 | net/inet/tcp.c | if (skb2->h.th->fin) { |
th | 2709 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 2755 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 2760 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 2786 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 2788 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 2792 | net/inet/tcp.c | ptr += th->seq; |
th | 2814 | net/inet/tcp.c | static inline int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 2820 | net/inet/tcp.c | if (th->urg) |
th | 2821 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 2828 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 2833 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 2842 | net/inet/tcp.c | tcp_fin(struct sock *sk, struct tcphdr *th, |
th | 2846 | net/inet/tcp.c | sk, th, saddr, dev)); |
th | 2858 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 2860 | net/inet/tcp.c | if (th->rst) sk->shutdown = SHUTDOWN_MASK; |
th | 2869 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 3061 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3066 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 3067 | net/inet/tcp.c | if (th->fin) |
th | 3072 | net/inet/tcp.c | next_seq += th->seq; |
th | 3085 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 3102 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 3106 | net/inet/tcp.c | if (th->rst) |
th | 3110 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3120 | net/inet/tcp.c | struct tcphdr *th; |
th | 3141 | net/inet/tcp.c | th = skb->h.th; |
th | 3144 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3158 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) { |
th | 3170 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3174 | net/inet/tcp.c | if (!th->rst) |
th | 3175 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 3238 | net/inet/tcp.c | if (th->rst) { |
th | 3256 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
th | 3260 | net/inet/tcp.c | if(!th->rst) |
th | 3262 | net/inet/tcp.c | sk, th, saddr); |
th | 3269 | net/inet/tcp.c | if (th->rst) { |
th | 3296 | net/inet/tcp.c | th->syn) { |
th | 3300 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
th | 3309 | net/inet/tcp.c | if (th->ack && !tcp_ack(sk, th, saddr, len)) { |
th | 3315 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3328 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
th | 3345 | net/inet/tcp.c | if (!th->rst) { |
th | 3346 | net/inet/tcp.c | if (!th->ack) |
th | 3347 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3348 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3355 | net/inet/tcp.c | if (th->rst) { |
th | 3360 | net/inet/tcp.c | if (th->ack) { |
th | 3361 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3367 | net/inet/tcp.c | if (th->syn) { |
th | 3370 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
th | 3392 | net/inet/tcp.c | if (th->syn) { |
th | 3401 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
th | 3408 | net/inet/tcp.c | if (th->rst) { |
th | 3425 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 3434 | net/inet/tcp.c | if (!th->ack) { |
th | 3435 | net/inet/tcp.c | if (th->syn) { |
th | 3446 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3447 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3458 | net/inet/tcp.c | if (!th->syn) { |
th | 3465 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 3466 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 3467 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, th->seq+1, |
th | 3468 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 3471 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3472 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3485 | net/inet/tcp.c | tcp_options(sk, th); |
th | 3486 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 3510 | net/inet/tcp.c | if (th->urg) { |
th | 3511 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3520 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
th | 3525 | net/inet/tcp.c | if (th->urg) { |
th | 3526 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3539 | net/inet/tcp.c | if (!th->fin) { |
th | 3543 | 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); |