tag | line | file | source code |
th | 252 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 268 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 269 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 274 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 275 | drivers/net/slhc.c | ! (th->ack)){ |
th | 297 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 298 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 356 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 358 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){ |
th | 368 | drivers/net/slhc.c | if(th->urg){ |
th | 369 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 372 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
th | 379 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
th | 383 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
th | 389 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
th | 436 | drivers/net/slhc.c | if(th->psh) |
th | 441 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 443 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 476 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 479 | drivers/net/slhc.c | if (th->doff > 5) |
th | 480 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 52 | include/linux/skbuff.h | struct tcphdr *th; |
th | 380 | net/inet/tcp.c | struct tcphdr *th; |
th | 399 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 400 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 416 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 417 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 418 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 700 | net/inet/tcp.c | struct tcphdr *th; |
th | 707 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 708 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 785 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 787 | 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 | 788 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 793 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 813 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 815 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 950 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 1022 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 1032 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 1035 | net/inet/tcp.c | th->check = 0; |
th | 1036 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 1043 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 1046 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 1052 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 1061 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 1071 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 1078 | net/inet/tcp.c | th->check = 0; |
th | 1092 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1093 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1095 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1157 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 1201 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); /* this should probably be removed */ |
th | 1207 | net/inet/tcp.c | t1->dest = th->source; |
th | 1208 | net/inet/tcp.c | t1->source = th->dest; |
th | 1249 | net/inet/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 1253 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 1254 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 1255 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 1256 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 1257 | net/inet/tcp.c | th->ack = 1; |
th | 1258 | net/inet/tcp.c | th->fin = 0; |
th | 1262 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1264 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 1266 | net/inet/tcp.c | return(sizeof(*th)); |
th | 1399 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1544 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 1880 | net/inet/tcp.c | if (before(*seq, skb->h.th->seq)) |
th | 1882 | net/inet/tcp.c | offset = *seq - skb->h.th->seq; |
th | 1883 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 1887 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 1967 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 1968 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1977 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2010 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2056 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2104 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2183 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 2195 | net/inet/tcp.c | if(th->rst) |
th | 2229 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2235 | net/inet/tcp.c | t1->dest = th->source; |
th | 2236 | net/inet/tcp.c | t1->source = th->dest; |
th | 2240 | net/inet/tcp.c | if(th->ack) |
th | 2243 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 2249 | net/inet/tcp.c | if(!th->syn) |
th | 2250 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 2252 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 2278 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 2281 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2284 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2304 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 2316 | net/inet/tcp.c | if (th->syn) |
th | 2363 | net/inet/tcp.c | struct tcphdr *th; |
th | 2368 | net/inet/tcp.c | th = skb->h.th; |
th | 2379 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 2443 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2444 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq+1; |
th | 2445 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2462 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2463 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2482 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2483 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq + 1; |
th | 2534 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2580 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2585 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2598 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 2630 | net/inet/tcp.c | struct tcphdr *t1, *th; |
th | 2729 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
th | 2779 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2870 | net/inet/tcp.c | struct tcphdr *th; |
th | 2882 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 2883 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 2885 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 2886 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 2888 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 2902 | net/inet/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 2917 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 2918 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 2920 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 2952 | net/inet/tcp.c | if (len != th->doff*4) |
th | 2957 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 2981 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3033 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3369 | net/inet/tcp.c | tcp_options(sk,th); |
th | 3370 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 3443 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 3445 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3464 | net/inet/tcp.c | if (th->rst) |
th | 3535 | net/inet/tcp.c | struct tcphdr *th; |
th | 3540 | net/inet/tcp.c | th = skb->h.th; |
th | 3541 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 3550 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
th | 3556 | net/inet/tcp.c | if (!th->ack) |
th | 3557 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 3578 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 3600 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 3601 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3642 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3643 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3656 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3670 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3691 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3692 | net/inet/tcp.c | if (th->syn) |
th | 3693 | net/inet/tcp.c | th->ack_seq++; |
th | 3694 | net/inet/tcp.c | if (th->fin) |
th | 3695 | net/inet/tcp.c | th->ack_seq++; |
th | 3709 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3711 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3715 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3717 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3721 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3730 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 3732 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 3739 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 3741 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 3744 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 3748 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 3755 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 3757 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 3778 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 3827 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3833 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 3858 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 3860 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 3864 | net/inet/tcp.c | ptr += th->seq; |
th | 3890 | net/inet/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 3899 | net/inet/tcp.c | if (th->urg) |
th | 3900 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 3913 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 3921 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 4150 | net/inet/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 4155 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 4156 | net/inet/tcp.c | if (th->fin) |
th | 4161 | net/inet/tcp.c | next_seq += th->seq; |
th | 4174 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 4181 | net/inet/tcp.c | if (th->rst) |
th | 4193 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 4198 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4242 | net/inet/tcp.c | struct tcphdr *th; |
th | 4266 | net/inet/tcp.c | th = skb->h.th; |
th | 4272 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4288 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 4298 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 4306 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4337 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4382 | net/inet/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 4383 | net/inet/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 4392 | net/inet/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 4419 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
th | 4434 | net/inet/tcp.c | if(th->ack) |
th | 4437 | net/inet/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
th | 4442 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4448 | net/inet/tcp.c | if(th->rst) |
th | 4450 | net/inet/tcp.c | if(!th->syn) |
th | 4463 | net/inet/tcp.c | sk->acked_seq=th->seq+1; |
th | 4464 | net/inet/tcp.c | sk->fin_seq=th->seq; |
th | 4465 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 4467 | net/inet/tcp.c | tcp_options(sk,th); |
th | 4468 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 4484 | net/inet/tcp.c | if(th->syn && !th->rst) |
th | 4489 | net/inet/tcp.c | sk->dummy_th.source==th->source && |
th | 4490 | net/inet/tcp.c | sk->dummy_th.dest==th->dest) |
th | 4519 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 4520 | net/inet/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
th | 4532 | net/inet/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4552 | net/inet/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
th | 4559 | net/inet/tcp.c | if(th->rst) |
th | 4566 | net/inet/tcp.c | if(th->syn && !syn_ok) |
th | 4568 | net/inet/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 4577 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
th | 4585 | net/inet/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 4598 | net/inet/tcp.c | if(tcp_urg(sk, th, saddr, len)) |
th | 128 | net/inet/tcp.h | extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 102 | net/inet/udp.c | struct udphdr *th; |
th | 112 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 114 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |