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 | 82 | drivers/net/slip.c | struct tcphdr *th; |
th | 88 | drivers/net/slip.c | th = (struct tcphdr *) (ptr + ip->ihl * 4); |
th | 91 | 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 | 105 | net/inet/tcp.c | print_th(struct tcphdr *th) |
th | 112 | net/inet/tcp.c | ptr =(unsigned char *)(th + 1); |
th | 114 | net/inet/tcp.c | ntohs(th->source), ntohs(th->dest), |
th | 115 | net/inet/tcp.c | ntohl(th->seq), ntohl(th->ack_seq)); |
th | 117 | net/inet/tcp.c | th->fin, th->syn, th->rst, th->psh, th->ack, |
th | 118 | net/inet/tcp.c | th->urg, th->res1, th->res2); |
th | 120 | net/inet/tcp.c | ntohs(th->window), ntohs(th->check), ntohs(th->urg_ptr)); |
th | 121 | net/inet/tcp.c | printk(" doff = %d\n", th->doff); |
th | 198 | net/inet/tcp.c | struct tcphdr *th; |
th | 207 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 208 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
th | 209 | net/inet/tcp.c | print_th(th); |
th | 292 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 294 | 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 | 295 | net/inet/tcp.c | if (skb->h.th->syn) sum++; |
th | 296 | net/inet/tcp.c | if (skb->h.th->urg) { |
th | 297 | net/inet/tcp.c | sum -= ntohs(skb->h.th->urg_ptr); /* Dont count urg data */ |
th | 301 | net/inet/tcp.c | if (skb->h.th->syn) amount--; |
th | 450 | net/inet/tcp.c | if (sk->copied_seq+1 == skb->h.th->seq && skb->h.th->urg) |
th | 482 | net/inet/tcp.c | tcp_check(struct tcphdr *th, int len, |
th | 488 | net/inet/tcp.c | print_th(th); |
th | 503 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
th | 504 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
th | 522 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
th | 523 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
th | 534 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
th | 544 | net/inet/tcp.c | tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 547 | net/inet/tcp.c | th->check = 0; |
th | 548 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 563 | net/inet/tcp.c | tcp_send_check(skb->h.th, sk->saddr, sk->daddr, |
th | 564 | net/inet/tcp.c | skb->len-(unsigned long)skb->h.th + |
th | 593 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 636 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 639 | net/inet/tcp.c | t1->dest = th->source; |
th | 640 | net/inet/tcp.c | t1->source = th->dest; |
th | 671 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 675 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 676 | net/inet/tcp.c | th->seq = htonl(sk->send_seq); |
th | 677 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 678 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 679 | net/inet/tcp.c | th->ack = 1; |
th | 680 | net/inet/tcp.c | th->fin = 0; |
th | 684 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 686 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 688 | net/inet/tcp.c | return(sizeof(*th)); |
th | 807 | net/inet/tcp.c | if (skb->len -(unsigned long)skb->h.th + |
th | 901 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1185 | net/inet/tcp.c | if (skb->h.th->urg && !skb->urg_used) { |
th | 1186 | net/inet/tcp.c | if (skb->h.th->urg_ptr == 0) { |
th | 1187 | net/inet/tcp.c | skb->h.th->urg_ptr = ntohs(skb->len); |
th | 1189 | net/inet/tcp.c | amt = min(ntohs(skb->h.th->urg_ptr),len); |
th | 1193 | net/inet/tcp.c | memcpy_tofs(to,(unsigned char *)(skb->h.th) + |
th | 1194 | net/inet/tcp.c | skb->h.th->doff*4, amt); |
th | 1254 | net/inet/tcp.c | before(sk->copied_seq+1, skb->h.th->seq) || skb->used) { |
th | 1333 | net/inet/tcp.c | before(sk->copied_seq+1, sk->rqueue->h.th->seq)) { |
th | 1362 | net/inet/tcp.c | offset = sk->copied_seq+1 - skb->h.th->seq; |
th | 1364 | net/inet/tcp.c | if (skb->h.th->syn) offset--; |
th | 1371 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 1375 | net/inet/tcp.c | sk->copied_seq += ntohs(skb->h.th->urg_ptr); |
th | 1376 | net/inet/tcp.c | offset += ntohs(skb->h.th->urg_ptr); |
th | 1396 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1397 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1412 | net/inet/tcp.c | (!skb->h.th->urg || skb->urg_used) && |
th | 1420 | net/inet/tcp.c | if (/*skb->h.th->psh || */skb->h.th->urg) |
th | 1450 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1471 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1499 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1571 | net/inet/tcp.c | tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1605 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1608 | net/inet/tcp.c | t1->dest = th->source; |
th | 1609 | net/inet/tcp.c | t1->source = th->dest; |
th | 1613 | net/inet/tcp.c | if(th->ack) |
th | 1616 | net/inet/tcp.c | t1->seq=th->ack_seq; |
th | 1622 | net/inet/tcp.c | if(!th->syn) |
th | 1623 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1625 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1644 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1647 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1650 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1706 | net/inet/tcp.c | struct tcphdr *th; |
th | 1713 | net/inet/tcp.c | th = skb->h.th; |
th | 1720 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 1773 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 1774 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 1775 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1785 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 1786 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 1802 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 1803 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1806 | net/inet/tcp.c | if (skb->h.th->doff == 5) { |
th | 1809 | net/inet/tcp.c | ptr =(unsigned char *)(skb->h.th + 1); |
th | 1818 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 1855 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 1859 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 1871 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 1901 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1928 | net/inet/tcp.c | after(skb->h.th->seq + skb->len + 1, sk->copied_seq)) |
th | 1938 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
th | 1980 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2013 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2133 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2141 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2144 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
th | 2157 | net/inet/tcp.c | if (len != th->doff*4) flag |= 1; |
th | 2160 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
th | 2178 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2244 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2375 | net/inet/tcp.c | th, sk->daddr); |
th | 2404 | net/inet/tcp.c | struct tcphdr *th; |
th | 2407 | net/inet/tcp.c | th = skb->h.th; |
th | 2408 | net/inet/tcp.c | print_th(th); |
th | 2409 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2414 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) { |
th | 2416 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->send_seq, sk->acked_seq,sk, th, saddr); |
th | 2422 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
th | 2423 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 2460 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 2461 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 2466 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) { |
th | 2484 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 2493 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 2508 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 2509 | net/inet/tcp.c | if (th->syn) th->ack_seq++; |
th | 2510 | net/inet/tcp.c | if (th->fin) th->ack_seq++; |
th | 2518 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
th | 2519 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
th | 2520 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 2521 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 2525 | net/inet/tcp.c | if (skb->h.th->fin) { |
th | 2533 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
th | 2534 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 2535 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 2542 | net/inet/tcp.c | if (skb2->h.th->fin) { |
th | 2560 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 2605 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2610 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2637 | net/inet/tcp.c | tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr) |
th | 2645 | net/inet/tcp.c | th->urg = 0; |
th | 2646 | net/inet/tcp.c | th->psh = 1; |
th | 2667 | net/inet/tcp.c | tcp_fin(struct sock *sk, struct tcphdr *th, |
th | 2671 | net/inet/tcp.c | sk, th, saddr, dev)); |
th | 2682 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 2684 | net/inet/tcp.c | if (th->rst) sk->shutdown = SHUTDOWN_MASK; |
th | 2693 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 2864 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 2874 | net/inet/tcp.c | sk, th, len, opt, saddr)); |
th | 2876 | net/inet/tcp.c | if (between(th->seq, sk->acked_seq, sk->acked_seq + sk->window)|| |
th | 2877 | net/inet/tcp.c | between(th->seq + len-(th->doff*4), sk->acked_seq + 1, |
th | 2879 | net/inet/tcp.c | (before(th->seq, sk->acked_seq) && |
th | 2880 | net/inet/tcp.c | after(th->seq + len -(th->doff*4), sk->acked_seq + sk->window))) { |
th | 2889 | net/inet/tcp.c | if (after(th->seq, sk->acked_seq + sk->window)) { |
th | 2890 | net/inet/tcp.c | if(!th->rst) |
th | 2891 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2896 | net/inet/tcp.c | if (th->ack && len == (th->doff * 4) && |
th | 2897 | net/inet/tcp.c | after(th->seq, sk->acked_seq - 32767) && |
th | 2898 | net/inet/tcp.c | !th->fin && !th->syn) return(1); |
th | 2900 | net/inet/tcp.c | if (!th->rst) { |
th | 2902 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2916 | net/inet/tcp.c | struct tcphdr *th; |
th | 2937 | net/inet/tcp.c | th = skb->h.th; |
th | 2940 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 2954 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) { |
th | 2968 | net/inet/tcp.c | if (!th->rst) |
th | 2970 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 2972 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev); |
th | 2988 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3039 | net/inet/tcp.c | if (th->rst) { |
th | 3057 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr)) { |
th | 3059 | net/inet/tcp.c | if(!th->rst) |
th | 3061 | net/inet/tcp.c | sk, th, saddr); |
th | 3067 | net/inet/tcp.c | if (th->rst) { |
th | 3094 | net/inet/tcp.c | opt->compartment != 0 || th->syn)) { |
th | 3098 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3107 | net/inet/tcp.c | if (th->ack) { |
th | 3108 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3114 | net/inet/tcp.c | if (th->urg) { |
th | 3115 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3122 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
th | 3145 | net/inet/tcp.c | if (!th->rst) { |
th | 3146 | net/inet/tcp.c | if (!th->ack) |
th | 3147 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3148 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3155 | net/inet/tcp.c | if (th->rst) { |
th | 3160 | net/inet/tcp.c | if (th->ack) { |
th | 3161 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3167 | net/inet/tcp.c | if (th->syn) { |
th | 3170 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
th | 3192 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr)) { |
th | 3199 | net/inet/tcp.c | if (th->rst) { |
th | 3216 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 3225 | net/inet/tcp.c | if (!th->ack) { |
th | 3226 | net/inet/tcp.c | if (th->syn) { |
th | 3237 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3238 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3249 | net/inet/tcp.c | if (!th->syn) { |
th | 3256 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 3257 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 3258 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, th->seq+1, |
th | 3259 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 3262 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3263 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3276 | net/inet/tcp.c | tcp_options(sk, th); |
th | 3277 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 3287 | net/inet/tcp.c | if (th->urg) { |
th | 3288 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3297 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
th | 3302 | net/inet/tcp.c | if (th->urg) { |
th | 3303 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3316 | net/inet/tcp.c | if (!th->fin) { |
th | 3320 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
th | 98 | net/inet/udp.c | struct udphdr *th; |
th | 104 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 107 | net/inet/udp.c | sport=%d,dport=%d", err, header, daddr, saddr, protocol, (int)th->source,(int)th->dest)); |
th | 109 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |