tag | line | file | source code |
th | 251 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 267 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 268 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 273 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 274 | drivers/net/slhc.c | ! (th->ack)){ |
th | 296 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 297 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 355 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 357 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){ |
th | 367 | drivers/net/slhc.c | if(th->urg){ |
th | 368 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 371 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
th | 378 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
th | 382 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
th | 388 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
th | 435 | drivers/net/slhc.c | if(th->psh) |
th | 440 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 442 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 475 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 478 | drivers/net/slhc.c | if (th->doff > 5) |
th | 479 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 16 | include/asm-alpha/ipsum.h | extern inline unsigned short tcp_check(struct tcphdr *th, int len, u32 saddr, u32 daddr) |
th | 52 | include/linux/skbuff.h | struct tcphdr *th; |
th | 14 | include/net/arp.h | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); |
th | 137 | include/net/tcp.h | extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 597 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
th | 599 | net/ipv4/ip_fw.c | char *p, *data = (char *)&th[1]; |
th | 616 | net/ipv4/ip_fw.c | seq=ntohl(th->seq); |
th | 621 | net/ipv4/ip_fw.c | th->seq = htonl(seq + ftp->delta); |
th | 628 | net/ipv4/ip_fw.c | th->seq = htonl(seq + ftp->previous_delta); |
th | 868 | net/ipv4/ip_fw.c | struct tcphdr *th; |
th | 877 | net/ipv4/ip_fw.c | th = (struct tcphdr *)portptr; |
th | 882 | net/ipv4/ip_fw.c | if (ms->sawfin || th->fin) |
th | 889 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk); |
th | 913 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2)); |
th | 974 | net/ipv4/ip_fw.c | printk("demasq : delta=%d ; previous_delta=%d ; init_seq=%lX ; ack_seq=%lX ; after=%d\n",ms->delta,ms->previous_delta,ntohl(ms->init_seq),ntohl(th->ack_seq),after(ntohl(th->ack_seq),ntohl(ms->init_seq))); |
th | 976 | net/ipv4/ip_fw.c | ack_seq=ntohl(th->ack_seq); |
th | 981 | net/ipv4/ip_fw.c | th->ack_seq = htonl(ack_seq-ms->delta); |
th | 988 | net/ipv4/ip_fw.c | th->ack_seq = htonl(ack_seq-ms->previous_delta); |
th | 645 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 669 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 737 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 738 | net/ipv4/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 739 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1057 | net/ipv4/tcp.c | struct tcphdr *th = (struct tcphdr *)header; |
th | 1066 | net/ipv4/tcp.c | th =(struct tcphdr *)header; |
th | 1067 | net/ipv4/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 1169 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 1174 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 1194 | net/ipv4/tcp.c | if (skb->h.th->urg) |
th | 1196 | net/ipv4/tcp.c | if (amount && skb->h.th->psh) break; |
th | 1342 | net/ipv4/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 1350 | net/ipv4/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 1353 | net/ipv4/tcp.c | th->check = 0; |
th | 1354 | net/ipv4/tcp.c | th->check = tcp_check(th, len, saddr, daddr, |
th | 1355 | net/ipv4/tcp.c | csum_partial((char *)th,len,0)); |
th | 1367 | net/ipv4/tcp.c | struct tcphdr * th = skb->h.th; |
th | 1373 | net/ipv4/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 1382 | net/ipv4/tcp.c | skb, skb->data, th, skb->len); |
th | 1395 | net/ipv4/tcp.c | if(!th->syn && !th->fin) |
th | 1408 | net/ipv4/tcp.c | skb->seq = ntohl(th->seq); |
th | 1409 | net/ipv4/tcp.c | skb->end_seq = skb->seq + size - 4*th->doff; |
th | 1425 | net/ipv4/tcp.c | th->check = 0; |
th | 1450 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1451 | net/ipv4/tcp.c | th->window = htons(tcp_select_window(sk)); |
th | 1453 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1549 | net/ipv4/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 1603 | net/ipv4/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1609 | net/ipv4/tcp.c | t1->dest = th->source; |
th | 1610 | net/ipv4/tcp.c | t1->source = th->dest; |
th | 1663 | net/ipv4/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 1666 | net/ipv4/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 1667 | net/ipv4/tcp.c | th->seq = htonl(sk->write_seq); |
th | 1668 | net/ipv4/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 1669 | net/ipv4/tcp.c | th->doff = sizeof(*th)/4; |
th | 1670 | net/ipv4/tcp.c | th->ack = 1; |
th | 1671 | net/ipv4/tcp.c | th->fin = 0; |
th | 1675 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1677 | net/ipv4/tcp.c | th->window = htons(sk->window); |
th | 1679 | net/ipv4/tcp.c | return(sizeof(*th)); |
th | 1852 | net/ipv4/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1993 | net/ipv4/tcp.c | skb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr)); |
th | 1994 | net/ipv4/tcp.c | tmp = tcp_build_header(skb->h.th, sk, seglen-copy); |
th | 2006 | net/ipv4/tcp.c | skb->h.th->urg = 1; |
th | 2007 | net/ipv4/tcp.c | skb->h.th->urg_ptr = ntohs(copy); |
th | 2350 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 2354 | net/ipv4/tcp.c | if (skb->h.th->fin) |
th | 2461 | net/ipv4/tcp.c | memcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) + |
th | 2462 | net/ipv4/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 2483 | net/ipv4/tcp.c | if (skb->h.th->fin) |
th | 2590 | net/ipv4/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
th | 2648 | net/ipv4/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2744 | net/ipv4/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 2756 | net/ipv4/tcp.c | if(th->rst) |
th | 2786 | net/ipv4/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2792 | net/ipv4/tcp.c | t1->dest = th->source; |
th | 2793 | net/ipv4/tcp.c | t1->source = th->dest; |
th | 2797 | net/ipv4/tcp.c | if(th->ack) |
th | 2800 | net/ipv4/tcp.c | t1->seq = th->ack_seq; |
th | 2806 | net/ipv4/tcp.c | if(!th->syn) |
th | 2807 | net/ipv4/tcp.c | t1->ack_seq = th->seq; |
th | 2809 | net/ipv4/tcp.c | t1->ack_seq = htonl(ntohl(th->seq)+1); |
th | 2835 | net/ipv4/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 2838 | net/ipv4/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2841 | net/ipv4/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2862 | net/ipv4/tcp.c | if(opsize==4 && th->syn) |
th | 2874 | net/ipv4/tcp.c | if (th->syn) |
th | 2928 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 2933 | net/ipv4/tcp.c | th = skb->h.th; |
th | 2944 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 3045 | net/ipv4/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 3046 | net/ipv4/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 3124 | net/ipv4/tcp.c | tcp_options(newsk,skb->h.th); |
th | 3171 | net/ipv4/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 3177 | net/ipv4/tcp.c | t1->dest = skb->h.th->source; |
th | 3338 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 3349 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 3350 | net/ipv4/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 3359 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 3360 | net/ipv4/tcp.c | th->window = htons(tcp_select_window(sk)); |
th | 3362 | net/ipv4/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 3386 | net/ipv4/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 3405 | net/ipv4/tcp.c | ack = ntohl(th->ack_seq); |
th | 3407 | net/ipv4/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 3409 | net/ipv4/tcp.c | sk->max_window = ntohs(th->window); |
th | 3462 | net/ipv4/tcp.c | if (len != th->doff*4) |
th | 3469 | net/ipv4/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 3493 | net/ipv4/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3549 | net/ipv4/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3915 | net/ipv4/tcp.c | tcp_options(sk,th); |
th | 3916 | net/ipv4/tcp.c | sk->dummy_th.dest=th->source; |
th | 3989 | net/ipv4/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 4009 | net/ipv4/tcp.c | if (th->rst) |
th | 4080 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 4084 | net/ipv4/tcp.c | th = skb->h.th; |
th | 4085 | net/ipv4/tcp.c | skb_pull(skb,th->doff*4); |
th | 4086 | net/ipv4/tcp.c | skb_trim(skb,len-(th->doff*4)); |
th | 4095 | net/ipv4/tcp.c | if (skb->len == 0 && !th->fin) |
th | 4101 | net/ipv4/tcp.c | if (!th->ack) |
th | 4102 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 4125 | net/ipv4/tcp.c | new_seq = skb->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 4147 | net/ipv4/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 4148 | net/ipv4/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 4269 | net/ipv4/tcp.c | if (skb->h.th->fin) |
th | 4271 | net/ipv4/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4294 | net/ipv4/tcp.c | if (skb2->h.th->fin) |
th | 4296 | net/ipv4/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4317 | net/ipv4/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 4366 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4372 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4397 | net/ipv4/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 4399 | net/ipv4/tcp.c | u32 ptr = ntohs(th->urg_ptr); |
th | 4403 | net/ipv4/tcp.c | ptr += ntohl(th->seq); |
th | 4429 | net/ipv4/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 4438 | net/ipv4/tcp.c | if (th->urg) |
th | 4439 | net/ipv4/tcp.c | tcp_check_urg(sk,th); |
th | 4452 | net/ipv4/tcp.c | ptr = sk->urg_seq - ntohl(th->seq) + th->doff*4; |
th | 4460 | net/ipv4/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 4702 | net/ipv4/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 4707 | net/ipv4/tcp.c | next_seq = len - 4*th->doff; |
th | 4708 | net/ipv4/tcp.c | if (th->fin) |
th | 4713 | net/ipv4/tcp.c | next_seq += ntohl(th->seq); |
th | 4726 | net/ipv4/tcp.c | if (!before(ntohl(th->seq), sk->acked_seq + sk->window + 1)) |
th | 4733 | net/ipv4/tcp.c | if (th->rst) |
th | 4745 | net/ipv4/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 4750 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4795 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 4806 | net/ipv4/tcp.c | th = skb->h.th; |
th | 4812 | net/ipv4/tcp.c | if(saddr==th_cache_saddr && daddr==th_cache_daddr && th->dest==th_cache_dport && th->source==th_cache_sport) |
th | 4818 | net/ipv4/tcp.c | if(sk!=get_sock(&tcp_prot,th->dest, saddr, th->source, daddr)) |
th | 4823 | net/ipv4/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4826 | net/ipv4/tcp.c | th_cache_dport=th->dest; |
th | 4827 | net/ipv4/tcp.c | th_cache_sport=th->source; |
th | 4853 | net/ipv4/tcp.c | (skb->ip_summed && tcp_check(th, len, saddr, daddr, skb->csum ))|| |
th | 4854 | net/ipv4/tcp.c | (!skb->ip_summed && tcp_check(th, len, saddr, daddr, csum_partial((char *)th, len, 0))) |
th | 4866 | net/ipv4/tcp.c | skb->seq = ntohl(th->seq); |
th | 4867 | net/ipv4/tcp.c | skb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4; |
th | 4868 | net/ipv4/tcp.c | skb->ack_seq = ntohl(th->ack_seq); |
th | 4876 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4906 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4944 | net/ipv4/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 4945 | net/ipv4/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 4954 | net/ipv4/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 4981 | net/ipv4/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq) |
th | 4996 | net/ipv4/tcp.c | if(th->ack) |
th | 4999 | net/ipv4/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
th | 5004 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th, |
th | 5010 | net/ipv4/tcp.c | if(th->rst) |
th | 5012 | net/ipv4/tcp.c | if(!th->syn) |
th | 5027 | net/ipv4/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 5029 | net/ipv4/tcp.c | tcp_options(sk,th); |
th | 5030 | net/ipv4/tcp.c | sk->dummy_th.dest=th->source; |
th | 5046 | net/ipv4/tcp.c | if(th->syn && !th->rst) |
th | 5051 | net/ipv4/tcp.c | sk->dummy_th.source==th->source && |
th | 5052 | net/ipv4/tcp.c | sk->dummy_th.dest==th->dest) |
th | 5083 | net/ipv4/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 5084 | net/ipv4/tcp.c | after(skb->seq, sk->acked_seq) && !th->rst) |
th | 5096 | net/ipv4/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 5118 | net/ipv4/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
th | 5125 | net/ipv4/tcp.c | if(th->rst) |
th | 5132 | net/ipv4/tcp.c | if(th->syn && !syn_ok) |
th | 5134 | net/ipv4/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 5143 | net/ipv4/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
th | 5151 | net/ipv4/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 5178 | net/ipv4/tcp.c | if(tcp_urg(sk, th, saddr, len)) |
th | 5244 | net/ipv4/tcp.c | struct tcphdr *th; |
th | 5263 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 5269 | net/ipv4/tcp.c | buff = sock_wmalloc(sk, win_size + th->doff * 4 + |
th | 5305 | net/ipv4/tcp.c | nth = (struct tcphdr *) skb_put(buff,th->doff*4); |
th | 5307 | net/ipv4/tcp.c | memcpy(nth, th, th->doff * 4); |
th | 5323 | net/ipv4/tcp.c | (iph->ihl << 2) + th->doff * 4; |
th | 5342 | net/ipv4/tcp.c | th->check = 0; |
th | 5349 | net/ipv4/tcp.c | th->seq = htonl(sk->sent_seq); |
th | 5350 | net/ipv4/tcp.c | if (th->urg) |
th | 5354 | net/ipv4/tcp.c | urg_ptr = ntohs(th->urg_ptr); |
th | 5356 | net/ipv4/tcp.c | th->urg = 0; |
th | 5360 | net/ipv4/tcp.c | th->urg_ptr = htons(urg_ptr); |
th | 5365 | net/ipv4/tcp.c | if(th->urg && ntohs(th->urg_ptr) < win_size) |