tag | line | file | source code |
th | 239 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 255 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 256 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 261 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 262 | drivers/net/slhc.c | ! (th->ack)){ |
th | 284 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 285 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 343 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 345 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){ |
th | 355 | drivers/net/slhc.c | if(th->urg){ |
th | 356 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 359 | 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 | 423 | drivers/net/slhc.c | if(th->psh) |
th | 428 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 430 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 463 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 466 | drivers/net/slhc.c | if (th->doff > 5) |
th | 467 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 51 | include/linux/skbuff.h | struct tcphdr *th; |
th | 1826 | net/inet/ip.c | struct tcphdr *th; |
th | 1831 | net/inet/ip.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 1832 | net/inet/ip.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 1837 | net/inet/ip.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1838 | net/inet/ip.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1839 | net/inet/ip.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 320 | net/inet/tcp.c | struct tcphdr *th; |
th | 327 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 328 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 405 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 407 | 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 | 408 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 413 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 433 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 435 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 580 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 652 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 662 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 665 | net/inet/tcp.c | th->check = 0; |
th | 666 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 673 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 676 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 682 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 691 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 701 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 708 | net/inet/tcp.c | th->check = 0; |
th | 722 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 723 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 725 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 786 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 830 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 836 | net/inet/tcp.c | t1->dest = th->source; |
th | 837 | net/inet/tcp.c | t1->source = th->dest; |
th | 878 | net/inet/tcp.c | static int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 882 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 883 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 884 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 885 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 886 | net/inet/tcp.c | th->ack = 1; |
th | 887 | net/inet/tcp.c | th->fin = 0; |
th | 891 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 893 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 895 | net/inet/tcp.c | return(sizeof(*th)); |
th | 1028 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1171 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1533 | net/inet/tcp.c | if (before(1+*seq, skb->h.th->seq)) |
th | 1535 | net/inet/tcp.c | offset = 1 + *seq - skb->h.th->seq; |
th | 1536 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1616 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1617 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1644 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1690 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1738 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1816 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1855 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1861 | net/inet/tcp.c | t1->dest = th->source; |
th | 1862 | net/inet/tcp.c | t1->source = th->dest; |
th | 1866 | net/inet/tcp.c | if(th->ack) |
th | 1869 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 1875 | net/inet/tcp.c | if(!th->syn) |
th | 1876 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1878 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1901 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1904 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1907 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1927 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 1939 | net/inet/tcp.c | if (th->syn) |
th | 1977 | net/inet/tcp.c | struct tcphdr *th; |
th | 1982 | net/inet/tcp.c | th = skb->h.th; |
th | 1991 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 2055 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2056 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2057 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 2069 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2070 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2089 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2090 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 2141 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2187 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2192 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2205 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 2236 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2332 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2382 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2472 | net/inet/tcp.c | struct tcphdr *th; |
th | 2484 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 2485 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 2487 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 2488 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 2490 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 2503 | net/inet/tcp.c | static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2518 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2519 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 2521 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 2553 | net/inet/tcp.c | if (len != th->doff*4) |
th | 2558 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 2577 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2625 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3024 | net/inet/tcp.c | struct tcphdr *th; |
th | 3028 | net/inet/tcp.c | th = skb->h.th; |
th | 3029 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 3036 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
th | 3042 | net/inet/tcp.c | if (!th->ack) |
th | 3043 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 3054 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 3060 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 3061 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3097 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3098 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3111 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3125 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3146 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3147 | net/inet/tcp.c | if (th->syn) |
th | 3148 | net/inet/tcp.c | th->ack_seq++; |
th | 3149 | net/inet/tcp.c | if (th->fin) |
th | 3150 | net/inet/tcp.c | th->ack_seq++; |
th | 3162 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3164 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3168 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3170 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3174 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3182 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 3193 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 3195 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 3198 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 3202 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 3209 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 3234 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 3283 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3290 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3307 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 3309 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 3313 | net/inet/tcp.c | ptr += th->seq; |
th | 3335 | net/inet/tcp.c | static inline int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 3341 | net/inet/tcp.c | if (th->urg) |
th | 3342 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 3349 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 3354 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 3374 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th, |
th | 3377 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3395 | net/inet/tcp.c | if (th->rst) |
th | 3675 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3680 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 3681 | net/inet/tcp.c | if (th->fin) |
th | 3686 | net/inet/tcp.c | next_seq += th->seq; |
th | 3699 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 3706 | net/inet/tcp.c | if (th->rst) |
th | 3717 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 3722 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3749 | net/inet/tcp.c | struct tcphdr *th; |
th | 3770 | net/inet/tcp.c | th = skb->h.th; |
th | 3776 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3788 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 3798 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3803 | net/inet/tcp.c | if (!th->rst) |
th | 3804 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 3873 | net/inet/tcp.c | if(!(sk->shutdown & RCV_SHUTDOWN) && sk->state==TCP_ESTABLISHED && !th->urg && !th->syn && !th->fin && !th->rst) |
th | 3876 | net/inet/tcp.c | if(th->seq == sk->acked_seq+1 && sk->window && tcp_clean_end(sk)) |
th | 3879 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk, th, saddr, len)) |
th | 3888 | net/inet/tcp.c | skb->len -= (th->doff *4); |
th | 3898 | net/inet/tcp.c | sk->acked_seq = th->seq+skb->len; /* Easy */ |
th | 3903 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th , saddr); |
th | 3920 | net/inet/tcp.c | if(!tcp_sequence(sk, th, len, opt, saddr, dev)) |
th | 3926 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk, th, saddr, len)) |
th | 3952 | net/inet/tcp.c | if (th->rst) |
th | 3973 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 3980 | net/inet/tcp.c | if (th->rst) |
th | 4005 | net/inet/tcp.c | if (th->syn) |
th | 4011 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
th | 4020 | net/inet/tcp.c | if (th->ack && !tcp_ack(sk, th, saddr, len)) { |
th | 4026 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 4039 | net/inet/tcp.c | if (th->fin && tcp_fin(skb, sk, th, saddr, dev)) { |
th | 4055 | net/inet/tcp.c | if (!th->rst) { |
th | 4056 | net/inet/tcp.c | if (!th->ack) |
th | 4057 | net/inet/tcp.c | th->ack_seq = 0; |
th | 4058 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 4065 | net/inet/tcp.c | if (th->rst) { |
th | 4070 | net/inet/tcp.c | if (th->ack) { |
th | 4071 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 4077 | net/inet/tcp.c | if (th->syn) |
th | 4095 | net/inet/tcp.c | if (th->syn) { |
th | 4104 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 4112 | net/inet/tcp.c | if (th->rst) |
th | 4127 | net/inet/tcp.c | if (!th->ack) |
th | 4129 | net/inet/tcp.c | if (th->syn) |
th | 4141 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 4144 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4155 | net/inet/tcp.c | if (!th->syn) |
th | 4163 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 4164 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 4165 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, th->seq+1, |
th | 4166 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 4169 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 4172 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4187 | net/inet/tcp.c | tcp_options(sk, th); |
th | 4188 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 4214 | net/inet/tcp.c | if (th->urg) |
th | 4216 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) |
th | 4226 | net/inet/tcp.c | if (th->fin) |
th | 4227 | net/inet/tcp.c | tcp_fin(skb, sk, th, saddr, dev); |
th | 4232 | net/inet/tcp.c | if (th->urg) |
th | 4234 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) |
th | 4248 | net/inet/tcp.c | if (!th->fin) |
th | 4253 | net/inet/tcp.c | tcp_fin(skb, sk, th, saddr, dev); |
th | 127 | net/inet/tcp.h | extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 100 | net/inet/udp.c | struct udphdr *th; |
th | 110 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 112 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |