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 | 1824 | net/inet/ip.c | struct tcphdr *th; |
th | 1829 | net/inet/ip.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 1830 | net/inet/ip.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 1835 | net/inet/ip.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1836 | net/inet/ip.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1837 | net/inet/ip.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 263 | net/inet/tcp.c | struct tcphdr *th; |
th | 270 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 271 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
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 | 356 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 360 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 524 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 596 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 606 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 609 | net/inet/tcp.c | th->check = 0; |
th | 610 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 617 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 620 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 626 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 635 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 645 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 652 | net/inet/tcp.c | th->check = 0; |
th | 666 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 667 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 669 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 730 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 774 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 780 | net/inet/tcp.c | t1->dest = th->source; |
th | 781 | net/inet/tcp.c | t1->source = th->dest; |
th | 821 | net/inet/tcp.c | static int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 825 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 826 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 827 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 828 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 829 | net/inet/tcp.c | th->ack = 1; |
th | 830 | net/inet/tcp.c | th->fin = 0; |
th | 834 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 836 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 838 | net/inet/tcp.c | return(sizeof(*th)); |
th | 971 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1114 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1457 | net/inet/tcp.c | if (before(1+*seq, skb->h.th->seq)) |
th | 1459 | net/inet/tcp.c | offset = 1 + *seq - skb->h.th->seq; |
th | 1460 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1540 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1541 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1568 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1614 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1662 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1740 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1779 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1785 | net/inet/tcp.c | t1->dest = th->source; |
th | 1786 | net/inet/tcp.c | t1->source = th->dest; |
th | 1790 | net/inet/tcp.c | if(th->ack) |
th | 1793 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 1799 | net/inet/tcp.c | if(!th->syn) |
th | 1800 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1802 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1825 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1828 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1831 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1851 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 1863 | net/inet/tcp.c | if (th->syn) |
th | 1901 | net/inet/tcp.c | struct tcphdr *th; |
th | 1906 | net/inet/tcp.c | th = skb->h.th; |
th | 1915 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 1979 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 1980 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 1981 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1992 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 1993 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2012 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2013 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 2063 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2109 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2114 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2127 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 2159 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2188 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len/* + 1 */ , sk->copied_seq)) |
th | 2256 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2306 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2396 | net/inet/tcp.c | struct tcphdr *th; |
th | 2408 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 2409 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 2411 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 2412 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 2414 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 2466 | net/inet/tcp.c | static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2481 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2482 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 2484 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 2519 | net/inet/tcp.c | if (len != th->doff*4) |
th | 2524 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 2543 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2591 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2948 | net/inet/tcp.c | struct tcphdr *th; |
th | 2952 | net/inet/tcp.c | th = skb->h.th; |
th | 2953 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2960 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
th | 2966 | net/inet/tcp.c | if (!th->ack) |
th | 2967 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 2978 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 2984 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 2985 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3027 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3028 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3041 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3055 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3076 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3077 | net/inet/tcp.c | if (th->syn) |
th | 3078 | net/inet/tcp.c | th->ack_seq++; |
th | 3079 | net/inet/tcp.c | if (th->fin) |
th | 3080 | net/inet/tcp.c | th->ack_seq++; |
th | 3092 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3094 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3098 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3100 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3104 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3112 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 3123 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 3125 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 3128 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 3132 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 3139 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 3164 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 3213 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3220 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3237 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 3239 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 3243 | net/inet/tcp.c | ptr += th->seq; |
th | 3265 | net/inet/tcp.c | static inline int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 3271 | net/inet/tcp.c | if (th->urg) |
th | 3272 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 3279 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 3284 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 3305 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th, |
th | 3308 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3328 | net/inet/tcp.c | if (th->rst) |
th | 3610 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3615 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 3616 | net/inet/tcp.c | if (th->fin) |
th | 3621 | net/inet/tcp.c | next_seq += th->seq; |
th | 3634 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 3641 | net/inet/tcp.c | if (th->rst) |
th | 3652 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 3657 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3684 | net/inet/tcp.c | struct tcphdr *th; |
th | 3705 | net/inet/tcp.c | th = skb->h.th; |
th | 3711 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3723 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 3733 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3738 | net/inet/tcp.c | if (!th->rst) |
th | 3739 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 3808 | net/inet/tcp.c | if(!(sk->shutdown & RCV_SHUTDOWN) && sk->state==TCP_ESTABLISHED && !th->urg && !th->syn && !th->fin && !th->rst) |
th | 3811 | net/inet/tcp.c | if(th->seq == sk->acked_seq+1 && sk->window && tcp_clean_end(sk)) |
th | 3814 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk, th, saddr, len)) |
th | 3823 | net/inet/tcp.c | skb->len -= (th->doff *4); |
th | 3833 | net/inet/tcp.c | sk->acked_seq = th->seq+skb->len; /* Easy */ |
th | 3838 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th , saddr); |
th | 3854 | net/inet/tcp.c | if(!tcp_sequence(sk, th, len, opt, saddr, dev)) |
th | 3860 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk, th, saddr, len)) |
th | 3886 | net/inet/tcp.c | if (th->rst) |
th | 3907 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 3914 | net/inet/tcp.c | if (th->rst) |
th | 3940 | net/inet/tcp.c | if (th->syn) |
th | 3947 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
th | 3956 | net/inet/tcp.c | if (th->ack && !tcp_ack(sk, th, saddr, len)) { |
th | 3962 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) { |
th | 3975 | net/inet/tcp.c | if (th->fin && tcp_fin(skb, sk, th, saddr, dev)) { |
th | 3991 | net/inet/tcp.c | if (!th->rst) { |
th | 3992 | net/inet/tcp.c | if (!th->ack) |
th | 3993 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3994 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 4001 | net/inet/tcp.c | if (th->rst) { |
th | 4006 | net/inet/tcp.c | if (th->ack) { |
th | 4007 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 4013 | net/inet/tcp.c | if (th->syn) |
th | 4031 | net/inet/tcp.c | if (th->syn) { |
th | 4040 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 4048 | net/inet/tcp.c | if (th->rst) |
th | 4063 | net/inet/tcp.c | if (!th->ack) |
th | 4065 | net/inet/tcp.c | if (th->syn) |
th | 4077 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 4080 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4091 | net/inet/tcp.c | if (!th->syn) |
th | 4099 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 4100 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 4101 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, th->seq+1, |
th | 4102 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 4105 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 4108 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4124 | net/inet/tcp.c | tcp_options(sk, th); |
th | 4125 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 4151 | net/inet/tcp.c | if (th->urg) |
th | 4153 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) |
th | 4163 | net/inet/tcp.c | if (th->fin) |
th | 4164 | net/inet/tcp.c | tcp_fin(skb, sk, th, saddr, dev); |
th | 4169 | net/inet/tcp.c | if (th->urg) |
th | 4171 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr, len)) |
th | 4185 | net/inet/tcp.c | if (!th->fin) |
th | 4190 | 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); |