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 | 52 | include/linux/skbuff.h | struct tcphdr *th; |
th | 416 | net/inet/tcp.c | struct tcphdr *th; |
th | 434 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 435 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 459 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 460 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 461 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 756 | net/inet/tcp.c | struct tcphdr *th; |
th | 763 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 764 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 845 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 847 | 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 | 848 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 853 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 873 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 875 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 1019 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 1091 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 1101 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 1104 | net/inet/tcp.c | th->check = 0; |
th | 1105 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 1117 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 1123 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 1132 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 1145 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 1158 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 1174 | net/inet/tcp.c | th->check = 0; |
th | 1199 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1200 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1202 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1298 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 1355 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1361 | net/inet/tcp.c | t1->dest = th->source; |
th | 1362 | net/inet/tcp.c | t1->source = th->dest; |
th | 1415 | net/inet/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 1418 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 1419 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 1420 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 1421 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 1422 | net/inet/tcp.c | th->ack = 1; |
th | 1423 | net/inet/tcp.c | th->fin = 0; |
th | 1427 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1429 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 1431 | net/inet/tcp.c | return(sizeof(*th)); |
th | 1563 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1708 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 2074 | net/inet/tcp.c | if (before(*seq, skb->h.th->seq)) |
th | 2076 | net/inet/tcp.c | offset = *seq - skb->h.th->seq; |
th | 2077 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 2081 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2189 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 2190 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 2212 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2306 | net/inet/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
th | 2367 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2493 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 2505 | net/inet/tcp.c | if(th->rst) |
th | 2539 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2545 | net/inet/tcp.c | t1->dest = th->source; |
th | 2546 | net/inet/tcp.c | t1->source = th->dest; |
th | 2550 | net/inet/tcp.c | if(th->ack) |
th | 2553 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 2559 | net/inet/tcp.c | if(!th->syn) |
th | 2560 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 2562 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 2588 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 2591 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2594 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2615 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 2627 | net/inet/tcp.c | if (th->syn) |
th | 2681 | net/inet/tcp.c | struct tcphdr *th; |
th | 2686 | net/inet/tcp.c | th = skb->h.th; |
th | 2697 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 2761 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2762 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq+1; |
th | 2763 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2780 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2781 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2800 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2801 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq + 1; |
th | 2852 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2901 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2906 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2919 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 3065 | net/inet/tcp.c | struct tcphdr *th; |
th | 3077 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 3078 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 3080 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 3081 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 3083 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 3107 | net/inet/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 3126 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 3128 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 3130 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 3183 | net/inet/tcp.c | if (len != th->doff*4) |
th | 3190 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 3214 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3270 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3636 | net/inet/tcp.c | tcp_options(sk,th); |
th | 3637 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 3710 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 3712 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3730 | net/inet/tcp.c | if (th->rst) |
th | 3801 | net/inet/tcp.c | struct tcphdr *th; |
th | 3806 | net/inet/tcp.c | th = skb->h.th; |
th | 3807 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 3816 | net/inet/tcp.c | if (skb->len == 0 && !th->fin) |
th | 3822 | net/inet/tcp.c | if (!th->ack) |
th | 3823 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 3846 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 3868 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 3869 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3908 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3909 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3922 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3936 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3957 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3958 | net/inet/tcp.c | if (th->syn) |
th | 3959 | net/inet/tcp.c | th->ack_seq++; |
th | 3960 | net/inet/tcp.c | if (th->fin) |
th | 3961 | net/inet/tcp.c | th->ack_seq++; |
th | 3975 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3977 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3981 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3983 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3987 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3996 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 3998 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4005 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 4007 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 4010 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 4014 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 4021 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 4023 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4044 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 4093 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4099 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4124 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 4126 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 4130 | net/inet/tcp.c | ptr += th->seq; |
th | 4156 | net/inet/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 4165 | net/inet/tcp.c | if (th->urg) |
th | 4166 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 4179 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 4187 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 4418 | net/inet/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 4423 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 4424 | net/inet/tcp.c | if (th->fin) |
th | 4429 | net/inet/tcp.c | next_seq += th->seq; |
th | 4442 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 4449 | net/inet/tcp.c | if (th->rst) |
th | 4461 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 4466 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4510 | net/inet/tcp.c | struct tcphdr *th; |
th | 4534 | net/inet/tcp.c | th = skb->h.th; |
th | 4540 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4556 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 4566 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 4574 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4605 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4650 | net/inet/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 4651 | net/inet/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 4660 | net/inet/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 4687 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
th | 4702 | net/inet/tcp.c | if(th->ack) |
th | 4705 | net/inet/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
th | 4710 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4716 | net/inet/tcp.c | if(th->rst) |
th | 4718 | net/inet/tcp.c | if(!th->syn) |
th | 4731 | net/inet/tcp.c | sk->acked_seq=th->seq+1; |
th | 4732 | net/inet/tcp.c | sk->fin_seq=th->seq; |
th | 4733 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 4735 | net/inet/tcp.c | tcp_options(sk,th); |
th | 4736 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 4752 | net/inet/tcp.c | if(th->syn && !th->rst) |
th | 4757 | net/inet/tcp.c | sk->dummy_th.source==th->source && |
th | 4758 | net/inet/tcp.c | sk->dummy_th.dest==th->dest) |
th | 4789 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 4790 | net/inet/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
th | 4802 | net/inet/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4824 | net/inet/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
th | 4831 | net/inet/tcp.c | if(th->rst) |
th | 4838 | net/inet/tcp.c | if(th->syn && !syn_ok) |
th | 4840 | net/inet/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 4849 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
th | 4857 | net/inet/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 4870 | net/inet/tcp.c | if(tcp_urg(sk, th, saddr, len)) |
th | 135 | 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); |