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 | 83 | drivers/net/slip.c | struct tcphdr *th; |
th | 89 | drivers/net/slip.c | th = (struct tcphdr *) (ptr + ip->ihl * 4); |
th | 92 | drivers/net/slip.c | ntohl(th->seq), ntohl(th->ack_seq), ntohs(ip->tot_len)); |
th | 113 | net/inet/tcp.c | void print_th(struct tcphdr *th) |
th | 121 | net/inet/tcp.c | ptr =(unsigned char *)(th + 1); |
th | 123 | net/inet/tcp.c | ntohs(th->source), ntohs(th->dest), |
th | 124 | net/inet/tcp.c | ntohl(th->seq), ntohl(th->ack_seq)); |
th | 126 | net/inet/tcp.c | th->fin, th->syn, th->rst, th->psh, th->ack, |
th | 127 | net/inet/tcp.c | th->urg, th->res1, th->res2); |
th | 129 | net/inet/tcp.c | ntohs(th->window), ntohs(th->check), ntohs(th->urg_ptr)); |
th | 130 | net/inet/tcp.c | printk(" doff = %d\n", th->doff); |
th | 210 | net/inet/tcp.c | struct tcphdr *th; |
th | 219 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 220 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
th | 221 | net/inet/tcp.c | print_th(th); |
th | 301 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 303 | 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 | 304 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 306 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 308 | net/inet/tcp.c | sum -= ntohs(skb->h.th->urg_ptr); /* Dont count urg data */ |
th | 313 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 473 | net/inet/tcp.c | if (sk->copied_seq+1 == skb->h.th->seq && skb->h.th->urg) |
th | 508 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 515 | net/inet/tcp.c | print_th(th); |
th | 531 | net/inet/tcp.c | : "=b"(sum) , "=S"(th) |
th | 532 | net/inet/tcp.c | : "0"(sum), "c"(len/4) ,"1"(th) |
th | 551 | net/inet/tcp.c | : "=b"(sum), "=S"(th) |
th | 552 | net/inet/tcp.c | : "0"(sum) ,"1"(th) |
th | 564 | net/inet/tcp.c | : "0"(sum) ,"S"(th) |
th | 573 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 576 | net/inet/tcp.c | th->check = 0; |
th | 577 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 600 | net/inet/tcp.c | tcp_send_check(skb->h.th, sk->saddr, sk->daddr, |
th | 601 | net/inet/tcp.c | skb->len-(unsigned long)skb->h.th + |
th | 646 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 693 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 696 | net/inet/tcp.c | t1->dest = th->source; |
th | 697 | net/inet/tcp.c | t1->source = th->dest; |
th | 732 | net/inet/tcp.c | static int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 736 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 737 | net/inet/tcp.c | th->seq = htonl(sk->send_seq); |
th | 738 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 739 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 740 | net/inet/tcp.c | th->ack = 1; |
th | 741 | net/inet/tcp.c | th->fin = 0; |
th | 745 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 747 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 749 | net/inet/tcp.c | return(sizeof(*th)); |
th | 906 | net/inet/tcp.c | if (skb->len -(unsigned long)skb->h.th + (unsigned long)(skb+1) >= sk->mss ||(flags & MSG_OOB) || copy==0) |
th | 1025 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1411 | net/inet/tcp.c | if (skb->h.th->urg && !skb->urg_used) |
th | 1413 | net/inet/tcp.c | if (skb->h.th->urg_ptr == 0) |
th | 1415 | net/inet/tcp.c | skb->h.th->urg_ptr = ntohs(skb->len); |
th | 1417 | net/inet/tcp.c | amt = min(ntohs(skb->h.th->urg_ptr),len); |
th | 1421 | net/inet/tcp.c | memcpy_tofs(to,(unsigned char *)(skb->h.th) + |
th | 1422 | net/inet/tcp.c | skb->h.th->doff*4, amt); |
th | 1491 | net/inet/tcp.c | while(skb == NULL || before(sk->copied_seq+1, skb->h.th->seq) || skb->used) |
th | 1609 | net/inet/tcp.c | if (skb_peek(&sk->rqueue) == NULL || before(sk->copied_seq+1, sk->rqueue->h.th->seq)) |
th | 1649 | net/inet/tcp.c | offset = sk->copied_seq+1 - skb->h.th->seq; |
th | 1651 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1660 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 1664 | net/inet/tcp.c | sk->copied_seq += ntohs(skb->h.th->urg_ptr); |
th | 1665 | net/inet/tcp.c | offset += ntohs(skb->h.th->urg_ptr); |
th | 1696 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1697 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1715 | net/inet/tcp.c | if (!(flags & MSG_PEEK) && (!skb->h.th->urg || skb->urg_used) && (used + offset >= skb->len)) |
th | 1723 | net/inet/tcp.c | if ((skb->h.th->psh && type) || skb->h.th->urg) |
th | 1776 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 1800 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 1834 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1917 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 1952 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1955 | net/inet/tcp.c | t1->dest = th->source; |
th | 1956 | net/inet/tcp.c | t1->source = th->dest; |
th | 1964 | net/inet/tcp.c | if(th->ack) |
th | 1967 | net/inet/tcp.c | t1->seq=th->ack_seq; |
th | 1973 | net/inet/tcp.c | if(!th->syn) |
th | 1974 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 1976 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 1994 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 1997 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2000 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2058 | net/inet/tcp.c | struct tcphdr *th; |
th | 2065 | net/inet/tcp.c | th = skb->h.th; |
th | 2075 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 2131 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2132 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2133 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 2143 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2144 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2160 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2161 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq; |
th | 2167 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2210 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2214 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2226 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 2258 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2281 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
th | 2334 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2372 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2519 | net/inet/tcp.c | static int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2527 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2530 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
th | 2545 | net/inet/tcp.c | if (len != th->doff*4) |
th | 2549 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 2568 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2628 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 2800 | net/inet/tcp.c | th, sk->daddr); |
th | 2831 | net/inet/tcp.c | struct tcphdr *th; |
th | 2834 | net/inet/tcp.c | th = skb->h.th; |
th | 2835 | net/inet/tcp.c | print_th(th); |
th | 2837 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 2842 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
th | 2845 | net/inet/tcp.c | if (!th->ack) |
th | 2846 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq,sk, th, saddr); |
th | 2853 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
th | 2854 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, sk->prot, NULL, skb->dev); |
th | 2891 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 2892 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 2896 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 2905 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 2919 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 2921 | net/inet/tcp.c | if (th->syn) |
th | 2922 | net/inet/tcp.c | th->ack_seq++; |
th | 2924 | net/inet/tcp.c | if (th->fin) |
th | 2925 | net/inet/tcp.c | th->ack_seq++; |
th | 2935 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 2937 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 2939 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 2940 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 2944 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2955 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 2957 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 2958 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 2965 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 2986 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) |
th | 3029 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3036 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3066 | net/inet/tcp.c | static int tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr) |
th | 3076 | net/inet/tcp.c | th->urg = 0; |
th | 3077 | net/inet/tcp.c | th->psh = 1; |
th | 3105 | net/inet/tcp.c | static int tcp_fin(struct sock *sk, struct tcphdr *th, |
th | 3109 | net/inet/tcp.c | sk, th, saddr, dev)); |
th | 3118 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 3120 | net/inet/tcp.c | if (th->rst) |
th | 3137 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
th | 3347 | net/inet/tcp.c | static int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 3357 | net/inet/tcp.c | sk, th, len, opt, saddr)); |
th | 3360 | net/inet/tcp.c | if (between(th->seq, sk->acked_seq, sk->acked_seq + sk->window)|| |
th | 3361 | net/inet/tcp.c | between(th->seq + len-(th->doff*4), sk->acked_seq + 1, sk->acked_seq + sk->window) || |
th | 3362 | net/inet/tcp.c | (before(th->seq, sk->acked_seq) && |
th | 3363 | net/inet/tcp.c | after(th->seq + len -(th->doff*4), sk->acked_seq + sk->window))) |
th | 3378 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev); |
th | 3387 | net/inet/tcp.c | if (after(th->seq, sk->acked_seq + sk->window)) |
th | 3389 | net/inet/tcp.c | if(!th->rst) |
th | 3390 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3398 | net/inet/tcp.c | if (th->ack && len == (th->doff * 4) && after(th->seq, sk->acked_seq - 32767) && !th->fin && !th->syn) |
th | 3401 | net/inet/tcp.c | if (!th->rst) |
th | 3404 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
th | 3422 | net/inet/tcp.c | struct tcphdr *th; |
th | 3437 | net/inet/tcp.c | th = skb->h.th; |
th | 3440 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 3457 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 3477 | net/inet/tcp.c | if (!th->rst) |
th | 3479 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3481 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev); |
th | 3497 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 3563 | net/inet/tcp.c | if (th->rst) |
th | 3583 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 3587 | net/inet/tcp.c | if(!th->rst) |
th | 3589 | net/inet/tcp.c | sk, th, saddr); |
th | 3595 | net/inet/tcp.c | if (th->rst) |
th | 3622 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3631 | net/inet/tcp.c | if (th->syn) |
th | 3636 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3646 | net/inet/tcp.c | if (th->ack) |
th | 3648 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 3656 | net/inet/tcp.c | if (th->urg &&(sk->state==TCP_ESTABLISHED||sk->state==TCP_FIN_WAIT1||sk->state==TCP_FIN_WAIT2)) |
th | 3658 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) |
th | 3676 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) |
th | 3695 | net/inet/tcp.c | if (!th->rst) |
th | 3697 | net/inet/tcp.c | if (!th->ack) |
th | 3698 | net/inet/tcp.c | th->ack_seq = 0; |
th | 3699 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3706 | net/inet/tcp.c | if (th->rst) |
th | 3712 | net/inet/tcp.c | if (th->ack) |
th | 3714 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3720 | net/inet/tcp.c | if (th->syn) |
th | 3724 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
th | 3745 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr,dev)) |
th | 3753 | net/inet/tcp.c | if (th->rst) |
th | 3772 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 3781 | net/inet/tcp.c | if (!th->ack) |
th | 3783 | net/inet/tcp.c | if (th->syn) |
th | 3797 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 3799 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 3810 | net/inet/tcp.c | if (!th->syn) |
th | 3818 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
th | 3819 | net/inet/tcp.c | sk->fin_seq = th->seq; |
th | 3820 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, th->seq+1, sk, th, sk->daddr); |
th | 3823 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) |
th | 3825 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
th | 3837 | net/inet/tcp.c | tcp_options(sk, th); |
th | 3838 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
th | 3850 | net/inet/tcp.c | if (th->urg) |
th | 3852 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) |
th | 3862 | net/inet/tcp.c | if (th->fin) |
th | 3863 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
th | 3868 | net/inet/tcp.c | if (th->urg) |
th | 3870 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) |
th | 3885 | net/inet/tcp.c | if (!th->fin) |
th | 3890 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
th | 100 | net/inet/udp.c | struct udphdr *th; |
th | 106 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 109 | net/inet/udp.c | sport=%d,dport=%d", err, header, daddr, saddr, protocol, (int)th->source,(int)th->dest)); |
th | 111 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |
th | 55 | net/socket/skbuff.h | struct tcphdr *th; |