tag | line | file | source code |
th | 232 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 250 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 251 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 256 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 257 | drivers/net/slhc.c | ! (th->ack)){ |
th | 258 | drivers/net/slhc.c | DPRINT(("comp: noncomp 2 %x %x %d %d %d %d\n", ip, th, |
th | 259 | drivers/net/slhc.c | th->syn, th->fin, th->rst, th->ack)); |
th | 281 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 282 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 341 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 343 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){ |
th | 354 | drivers/net/slhc.c | if(th->urg){ |
th | 355 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 358 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
th | 366 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
th | 370 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
th | 376 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
th | 425 | drivers/net/slhc.c | if(th->psh) |
th | 430 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 432 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 466 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 469 | drivers/net/slhc.c | if (th->doff > 5) |
th | 470 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 90 | drivers/net/slip.c | struct tcphdr *th; |
th | 96 | drivers/net/slip.c | th = (struct tcphdr *) (ptr + ip->ihl * 4); |
th | 99 | drivers/net/slip.c | ntohl(th->seq), ntohl(th->ack_seq), ntohs(ip->tot_len)); |
th | 51 | include/linux/skbuff.h | struct tcphdr *th; |
th | 122 | net/inet/tcp.c | static void __print_th(struct tcphdr *th) |
th | 128 | net/inet/tcp.c | ntohs(th->source), ntohs(th->dest), |
th | 129 | net/inet/tcp.c | ntohl(th->seq), ntohl(th->ack_seq)); |
th | 131 | net/inet/tcp.c | th->fin, th->syn, th->rst, th->psh, th->ack, |
th | 132 | net/inet/tcp.c | th->urg, th->res1, th->res2); |
th | 134 | net/inet/tcp.c | ntohs(th->window), ntohs(th->check), ntohs(th->urg_ptr)); |
th | 135 | net/inet/tcp.c | printk(" doff = %d\n", th->doff); |
th | 136 | net/inet/tcp.c | ptr =(unsigned char *)(th + 1); |
th | 140 | net/inet/tcp.c | static inline void print_th(struct tcphdr *th) |
th | 143 | net/inet/tcp.c | __print_th(th); |
th | 230 | net/inet/tcp.c | struct tcphdr *th; |
th | 239 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 240 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
th | 241 | net/inet/tcp.c | print_th(th); |
th | 313 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 315 | 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 | 316 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 320 | net/inet/tcp.c | if (skb->h.th->syn) amount--; |
th | 323 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 490 | net/inet/tcp.c | tcp_check(struct tcphdr *th, int len, |
th | 496 | net/inet/tcp.c | print_th(th); |
th | 511 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
th | 512 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
th | 530 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
th | 531 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
th | 542 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
th | 551 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 554 | net/inet/tcp.c | th->check = 0; |
th | 555 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 562 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 565 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 570 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 578 | net/inet/tcp.c | if(!th->syn && !th->fin) { |
th | 587 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 589 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 663 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 711 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 716 | net/inet/tcp.c | t1->dest = th->source; |
th | 717 | net/inet/tcp.c | t1->source = th->dest; |
th | 755 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 759 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 760 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 761 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 762 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 763 | net/inet/tcp.c | th->ack = 1; |
th | 764 | net/inet/tcp.c | th->fin = 0; |
th | 768 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 770 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 772 | net/inet/tcp.c | return(sizeof(*th)); |
th | 910 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1056 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1407 | net/inet/tcp.c | if (before(1+*seq, skb->h.th->seq)) |
th | 1409 | net/inet/tcp.c | offset = 1 + *seq - skb->h.th->seq; |
th | 1410 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1478 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1479 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1508 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1539 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1578 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1661 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1701 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1707 | net/inet/tcp.c | t1->dest = th->source; |
th | 1708 | net/inet/tcp.c | t1->source = th->dest; |
th | 1712 | net/inet/tcp.c | if(th->ack) |
th | 1715 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 1721 | net/inet/tcp.c | if(!th->syn) |
th | 1722 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1724 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1748 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1751 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1754 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1774 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 1786 | net/inet/tcp.c | if (th->syn) { |
th | 1819 | net/inet/tcp.c | struct tcphdr *th; |
th | 1827 | net/inet/tcp.c | th = skb->h.th; |
th | 1834 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 1895 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 1896 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 1897 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1908 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 1909 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 1925 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 1926 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1950 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 1988 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 1992 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2005 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 2035 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2063 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
th | 2115 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2159 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2281 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2295 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2298 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
th | 2300 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) { |
th | 2301 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 2320 | net/inet/tcp.c | if (len != th->doff*4) flag |= 1; |
th | 2323 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
th | 2341 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2379 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2597 | net/inet/tcp.c | th, sk->daddr); |
th | 2655 | net/inet/tcp.c | struct tcphdr *th; |
th | 2658 | net/inet/tcp.c | th = skb->h.th; |
th | 2659 | net/inet/tcp.c | print_th(th); |
th | 2660 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2665 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) { |
th | 2667 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 2673 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
th | 2674 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 2705 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 2706 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 2710 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 2719 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 2733 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 2734 | net/inet/tcp.c | if (th->syn) th->ack_seq++; |
th | 2735 | net/inet/tcp.c | if (th->fin) th->ack_seq++; |
th | 2743 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
th | 2744 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
th | 2747 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) { |
th | 2749 | net/inet/tcp.c | (th->ack_seq - sk->acked_seq); |
th | 2753 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 2758 | net/inet/tcp.c | if (skb->h.th->fin) { |
th | 2766 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
th | 2767 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 2770 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 2774 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 2782 | net/inet/tcp.c | if (skb2->h.th->fin) { |
th | 2800 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 2837 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 2842 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 2868 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 2870 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 2874 | net/inet/tcp.c | ptr += th->seq; |
th | 2896 | net/inet/tcp.c | static inline int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 2902 | net/inet/tcp.c | if (th->urg) |
th | 2903 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 2910 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 2915 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 2926 | net/inet/tcp.c | static int tcp_fin(struct sock *sk, struct tcphdr *th, |
th | 2930 | net/inet/tcp.c | sk, th, saddr, dev)); |
th | 2944 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 2947 | net/inet/tcp.c | if (th->rst) |
th | 2957 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 3189 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3194 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 3195 | net/inet/tcp.c | if (th->fin) |
th | 3200 | net/inet/tcp.c | next_seq += th->seq; |
th | 3213 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 3222 | net/inet/tcp.c | if (th->rst) |
th | 3233 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 3238 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3248 | net/inet/tcp.c | struct tcphdr *th; |
th | 3264 | net/inet/tcp.c | th = skb->h.th; |
th | 3267 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3281 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) { |
th | 3293 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3297 | net/inet/tcp.c | if (!th->rst) |
th | 3298 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 3352 | net/inet/tcp.c | if (th->rst) { |
th | 3370 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
th | 3378 | net/inet/tcp.c | if (th->rst) |
th | 3405 | net/inet/tcp.c | if (th->syn) |
th | 3412 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
th | 3421 | net/inet/tcp.c | if (th->ack && !tcp_ack(sk, th, saddr, len)) { |
th | 3427 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3440 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
th | 3457 | net/inet/tcp.c | if (!th->rst) { |
th | 3458 | net/inet/tcp.c | if (!th->ack) |
th | 3459 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3460 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3467 | net/inet/tcp.c | if (th->rst) { |
th | 3472 | net/inet/tcp.c | if (th->ack) { |
th | 3473 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3479 | net/inet/tcp.c | if (th->syn) |
th | 3497 | net/inet/tcp.c | if (th->syn) { |
th | 3506 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 3514 | net/inet/tcp.c | if (th->rst) |
th | 3529 | net/inet/tcp.c | if (!th->ack) |
th | 3531 | net/inet/tcp.c | if (th->syn) |
th | 3544 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 3547 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3558 | net/inet/tcp.c | if (!th->syn) |
th | 3566 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 3567 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 3568 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, th->seq+1, |
th | 3569 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 3572 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 3575 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3590 | net/inet/tcp.c | tcp_options(sk, th); |
th | 3591 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 3615 | net/inet/tcp.c | if (th->urg) { |
th | 3616 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3625 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
th | 3630 | net/inet/tcp.c | if (th->urg) { |
th | 3631 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3644 | net/inet/tcp.c | if (!th->fin) { |
th | 3648 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
th | 110 | net/inet/udp.c | struct udphdr *th; |
th | 119 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 122 | net/inet/udp.c | sport=%d,dport=%d", err, header, daddr, saddr, protocol, (int)th->source,(int)th->dest)); |
th | 124 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |