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 | 81 | drivers/net/slip.c | struct tcphdr *th; |
th | 87 | drivers/net/slip.c | th = (struct tcphdr *) (ptr + ip->ihl * 4); |
th | 90 | 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 | 116 | net/inet/tcp.c | print_th(struct tcphdr *th) |
th | 123 | net/inet/tcp.c | ptr =(unsigned char *)(th + 1); |
th | 125 | net/inet/tcp.c | ntohs(th->source), ntohs(th->dest), |
th | 126 | net/inet/tcp.c | ntohl(th->seq), ntohl(th->ack_seq)); |
th | 128 | net/inet/tcp.c | th->fin, th->syn, th->rst, th->psh, th->ack, |
th | 129 | net/inet/tcp.c | th->urg, th->res1, th->res2); |
th | 131 | net/inet/tcp.c | ntohs(th->window), ntohs(th->check), ntohs(th->urg_ptr)); |
th | 132 | net/inet/tcp.c | printk(" doff = %d\n", th->doff); |
th | 241 | net/inet/tcp.c | struct tcphdr *th; |
th | 250 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 251 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
th | 252 | net/inet/tcp.c | print_th(th); |
th | 335 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 337 | 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 | 338 | net/inet/tcp.c | if (skb->h.th->syn) sum++; |
th | 339 | net/inet/tcp.c | if (skb->h.th->urg) { |
th | 340 | net/inet/tcp.c | sum -= ntohs(skb->h.th->urg_ptr); /* Dont count urg data */ |
th | 344 | net/inet/tcp.c | if (skb->h.th->syn) amount--; |
th | 347 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 493 | net/inet/tcp.c | if (sk->copied_seq+1 == skb->h.th->seq && skb->h.th->urg) |
th | 525 | net/inet/tcp.c | tcp_check(struct tcphdr *th, int len, |
th | 531 | net/inet/tcp.c | print_th(th); |
th | 546 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
th | 547 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
th | 565 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
th | 566 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
th | 577 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
th | 586 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 589 | net/inet/tcp.c | th->check = 0; |
th | 590 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 599 | net/inet/tcp.c | size = skb->len - ((unsigned char *) skb->h.th - skb->data); |
th | 604 | net/inet/tcp.c | skb, skb->data, skb->h.th, skb->len); |
th | 612 | net/inet/tcp.c | if(!skb->h.th->syn && !skb->h.th->fin) { |
th | 620 | net/inet/tcp.c | tcp_send_check(skb->h.th, sk->saddr, sk->daddr, size, sk); |
th | 694 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 737 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 740 | net/inet/tcp.c | t1->dest = th->source; |
th | 741 | net/inet/tcp.c | t1->source = th->dest; |
th | 776 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 780 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 781 | net/inet/tcp.c | th->seq = htonl(sk->send_seq); |
th | 782 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 783 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 784 | net/inet/tcp.c | th->ack = 1; |
th | 785 | net/inet/tcp.c | th->fin = 0; |
th | 789 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 791 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 793 | net/inet/tcp.c | return(sizeof(*th)); |
th | 893 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1008 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1286 | net/inet/tcp.c | if (skb->h.th->urg && !skb->urg_used) { |
th | 1287 | net/inet/tcp.c | if (skb->h.th->urg_ptr == 0) { |
th | 1288 | net/inet/tcp.c | skb->h.th->urg_ptr = ntohs(skb->len); |
th | 1290 | net/inet/tcp.c | amt = min(ntohs(skb->h.th->urg_ptr),len); |
th | 1293 | net/inet/tcp.c | memcpy_tofs(to,(unsigned char *)(skb->h.th) + |
th | 1294 | net/inet/tcp.c | skb->h.th->doff*4, amt); |
th | 1354 | net/inet/tcp.c | before(sk->copied_seq+1, skb->h.th->seq) || skb->used) { |
th | 1433 | net/inet/tcp.c | before(sk->copied_seq+1, sk->rqueue->h.th->seq)) { |
th | 1462 | net/inet/tcp.c | offset = sk->copied_seq+1 - skb->h.th->seq; |
th | 1464 | net/inet/tcp.c | if (skb->h.th->syn) offset--; |
th | 1471 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 1475 | net/inet/tcp.c | sk->copied_seq += ntohs(skb->h.th->urg_ptr); |
th | 1476 | net/inet/tcp.c | offset += ntohs(skb->h.th->urg_ptr); |
th | 1496 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1497 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1512 | net/inet/tcp.c | (!skb->h.th->urg || skb->urg_used) && |
th | 1520 | net/inet/tcp.c | if (/*skb->h.th->psh || */skb->h.th->urg) |
th | 1550 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1571 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1599 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1671 | net/inet/tcp.c | tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1705 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1708 | net/inet/tcp.c | t1->dest = th->source; |
th | 1709 | net/inet/tcp.c | t1->source = th->dest; |
th | 1713 | net/inet/tcp.c | if(th->ack) |
th | 1716 | net/inet/tcp.c | t1->seq=th->ack_seq; |
th | 1722 | net/inet/tcp.c | if(!th->syn) |
th | 1723 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1725 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1744 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1747 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 1749 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 1799 | net/inet/tcp.c | struct tcphdr *th; |
th | 1806 | net/inet/tcp.c | th = skb->h.th; |
th | 1813 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 1866 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 1867 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 1868 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1878 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 1879 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 1895 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 1896 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 1912 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 1949 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 1953 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 1965 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 1995 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2020 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
th | 2061 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2094 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2217 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2225 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2228 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
th | 2244 | net/inet/tcp.c | if (len != th->doff*4) flag |= 1; |
th | 2247 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
th | 2265 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2308 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2499 | net/inet/tcp.c | th, sk->daddr); |
th | 2528 | net/inet/tcp.c | struct tcphdr *th; |
th | 2531 | net/inet/tcp.c | th = skb->h.th; |
th | 2532 | net/inet/tcp.c | print_th(th); |
th | 2533 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2538 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) { |
th | 2540 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->send_seq, sk->acked_seq,sk, th, saddr); |
th | 2546 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
th | 2547 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 2584 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 2585 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 2590 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) { |
th | 2608 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 2617 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 2632 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 2633 | net/inet/tcp.c | if (th->syn) th->ack_seq++; |
th | 2634 | net/inet/tcp.c | if (th->fin) th->ack_seq++; |
th | 2642 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
th | 2643 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
th | 2644 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 2645 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 2649 | net/inet/tcp.c | if (skb->h.th->fin) { |
th | 2657 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
th | 2658 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 2661 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 2677 | net/inet/tcp.c | if (skb2->h.th->fin) { |
th | 2695 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 2740 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2745 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 2772 | net/inet/tcp.c | tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr) |
th | 2781 | net/inet/tcp.c | th->urg = 0; |
th | 2782 | net/inet/tcp.c | th->psh = 1; |
th | 2803 | net/inet/tcp.c | tcp_fin(struct sock *sk, struct tcphdr *th, |
th | 2807 | net/inet/tcp.c | sk, th, saddr, dev)); |
th | 2818 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 2820 | net/inet/tcp.c | if (th->rst) sk->shutdown = SHUTDOWN_MASK; |
th | 2829 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 3011 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3021 | net/inet/tcp.c | sk, th, len, opt, saddr)); |
th | 3023 | net/inet/tcp.c | if (between(th->seq, sk->acked_seq, sk->acked_seq + sk->window)|| |
th | 3024 | net/inet/tcp.c | between(th->seq + len-(th->doff*4), sk->acked_seq + 1, |
th | 3026 | net/inet/tcp.c | (before(th->seq, sk->acked_seq) && |
th | 3027 | net/inet/tcp.c | after(th->seq + len -(th->doff*4), sk->acked_seq + sk->window))) { |
th | 3041 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 3049 | net/inet/tcp.c | if (after(th->seq, sk->acked_seq + sk->window)) { |
th | 3050 | net/inet/tcp.c | if(!th->rst) |
th | 3051 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3064 | net/inet/tcp.c | if (th->ack && len == (th->doff * 4) && |
th | 3065 | net/inet/tcp.c | after(th->seq, sk->acked_seq - 32767) && |
th | 3066 | net/inet/tcp.c | !th->fin && !th->syn) return(1); |
th | 3069 | net/inet/tcp.c | if (!th->rst) { |
th | 3071 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3085 | net/inet/tcp.c | struct tcphdr *th; |
th | 3106 | net/inet/tcp.c | th = skb->h.th; |
th | 3109 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3123 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) { |
th | 3137 | net/inet/tcp.c | if (!th->rst) |
th | 3139 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3141 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 3157 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3208 | net/inet/tcp.c | if (th->rst) { |
th | 3226 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
th | 3230 | net/inet/tcp.c | if(!th->rst) |
th | 3232 | net/inet/tcp.c | sk, th, saddr); |
th | 3239 | net/inet/tcp.c | if (th->rst) { |
th | 3266 | net/inet/tcp.c | th->syn) { |
th | 3270 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev, sk->ip_tos,sk->ip_ttl); |
th | 3278 | net/inet/tcp.c | if (th->ack) { |
th | 3279 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3285 | net/inet/tcp.c | if (th->urg) { |
th | 3286 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3300 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
th | 3317 | net/inet/tcp.c | if (!th->rst) { |
th | 3318 | net/inet/tcp.c | if (!th->ack) |
th | 3319 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3320 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3327 | net/inet/tcp.c | if (th->rst) { |
th | 3332 | net/inet/tcp.c | if (th->ack) { |
th | 3333 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev,sk->ip_tos,sk->ip_ttl); |
th | 3339 | net/inet/tcp.c | if (th->syn) { |
th | 3342 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, prot, opt,dev); |
th | 3364 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) { |
th | 3371 | net/inet/tcp.c | if (th->rst) { |
th | 3388 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 3397 | net/inet/tcp.c | if (!th->ack) { |
th | 3398 | net/inet/tcp.c | if (th->syn) { |
th | 3409 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3410 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3421 | net/inet/tcp.c | if (!th->syn) { |
th | 3428 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 3429 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 3430 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, th->seq+1, |
th | 3431 | net/inet/tcp.c | sk, th, sk->daddr); |
th | 3434 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
th | 3435 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3448 | net/inet/tcp.c | tcp_options(sk, th); |
th | 3449 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 3459 | net/inet/tcp.c | if (th->urg) { |
th | 3460 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3469 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
th | 3474 | net/inet/tcp.c | if (th->urg) { |
th | 3475 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
th | 3488 | net/inet/tcp.c | if (!th->fin) { |
th | 3492 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
th | 3623 | net/inet/tcp.c | t1 = skb2->h.th; |
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); |