| 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 | 408 | net/inet/tcp.c | struct tcphdr *th; |
| th | 426 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
| th | 427 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
| th | 451 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
| th | 452 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
| th | 453 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
| th | 751 | net/inet/tcp.c | struct tcphdr *th; |
| th | 758 | net/inet/tcp.c | th =(struct tcphdr *)header; |
| th | 759 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
| th | 840 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
| th | 842 | 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 | 843 | net/inet/tcp.c | if (skb->h.th->syn) |
| th | 848 | net/inet/tcp.c | if (skb->h.th->syn) |
| th | 868 | net/inet/tcp.c | if (skb->h.th->urg) |
| th | 870 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
| th | 1014 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
| th | 1086 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
| th | 1096 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
| th | 1099 | net/inet/tcp.c | th->check = 0; |
| th | 1100 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
| th | 1112 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
| th | 1118 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
| th | 1127 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
| th | 1140 | net/inet/tcp.c | if(!th->syn && !th->fin) |
| th | 1153 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
| th | 1169 | net/inet/tcp.c | th->check = 0; |
| th | 1194 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
| th | 1195 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
| th | 1197 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
| th | 1293 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
| th | 1350 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 1356 | net/inet/tcp.c | t1->dest = th->source; |
| th | 1357 | net/inet/tcp.c | t1->source = th->dest; |
| th | 1410 | net/inet/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
| th | 1413 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
| th | 1414 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
| th | 1415 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
| th | 1416 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
| th | 1417 | net/inet/tcp.c | th->ack = 1; |
| th | 1418 | net/inet/tcp.c | th->fin = 0; |
| th | 1422 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
| th | 1424 | net/inet/tcp.c | th->window = htons(sk->window); |
| th | 1426 | net/inet/tcp.c | return(sizeof(*th)); |
| th | 1558 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
| th | 1703 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
| th | 2069 | net/inet/tcp.c | if (before(*seq, skb->h.th->seq)) |
| th | 2071 | net/inet/tcp.c | offset = *seq - skb->h.th->seq; |
| th | 2072 | net/inet/tcp.c | if (skb->h.th->syn) |
| th | 2076 | net/inet/tcp.c | if (skb->h.th->fin) |
| th | 2184 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
| th | 2185 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
| th | 2207 | net/inet/tcp.c | if (skb->h.th->fin) |
| th | 2301 | net/inet/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
| th | 2356 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 2482 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
| th | 2494 | net/inet/tcp.c | if(th->rst) |
| th | 2528 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
| th | 2534 | net/inet/tcp.c | t1->dest = th->source; |
| th | 2535 | net/inet/tcp.c | t1->source = th->dest; |
| th | 2539 | net/inet/tcp.c | if(th->ack) |
| th | 2542 | net/inet/tcp.c | t1->seq = th->ack_seq; |
| th | 2548 | net/inet/tcp.c | if(!th->syn) |
| th | 2549 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
| th | 2551 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
| th | 2577 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
| th | 2580 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
| th | 2583 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
| th | 2603 | net/inet/tcp.c | if(opsize==4 && th->syn) |
| th | 2615 | net/inet/tcp.c | if (th->syn) |
| th | 2662 | net/inet/tcp.c | struct tcphdr *th; |
| th | 2667 | net/inet/tcp.c | th = skb->h.th; |
| th | 2678 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
| th | 2742 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
| th | 2743 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq+1; |
| th | 2744 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
| th | 2761 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
| th | 2762 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
| th | 2781 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
| th | 2782 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq + 1; |
| th | 2833 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
| th | 2879 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
| th | 2884 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
| th | 2897 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
| th | 3055 | net/inet/tcp.c | struct tcphdr *th; |
| th | 3067 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
| th | 3068 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
| th | 3070 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
| th | 3071 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
| th | 3073 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
| th | 3097 | net/inet/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
| th | 3116 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
| th | 3118 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
| th | 3120 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
| th | 3173 | net/inet/tcp.c | if (len != th->doff*4) |
| th | 3180 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
| th | 3204 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
| th | 3260 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
| th | 3626 | net/inet/tcp.c | tcp_options(sk,th); |
| th | 3627 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
| th | 3700 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
| th | 3702 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
| th | 3721 | net/inet/tcp.c | if (th->rst) |
| th | 3792 | net/inet/tcp.c | struct tcphdr *th; |
| th | 3797 | net/inet/tcp.c | th = skb->h.th; |
| th | 3798 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
| th | 3807 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
| th | 3813 | net/inet/tcp.c | if (!th->ack) |
| th | 3814 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
| th | 3837 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
| th | 3859 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
| th | 3860 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
| th | 3899 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
| th | 3900 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
| th | 3913 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
| th | 3927 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
| th | 3948 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
| th | 3949 | net/inet/tcp.c | if (th->syn) |
| th | 3950 | net/inet/tcp.c | th->ack_seq++; |
| th | 3951 | net/inet/tcp.c | if (th->fin) |
| th | 3952 | net/inet/tcp.c | th->ack_seq++; |
| th | 3966 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
| th | 3968 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
| th | 3972 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
| th | 3974 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
| th | 3978 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
| th | 3987 | net/inet/tcp.c | if (skb->h.th->fin) |
| th | 3989 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
| th | 3996 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
| th | 3998 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
| th | 4001 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
| th | 4005 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
| th | 4012 | net/inet/tcp.c | if (skb2->h.th->fin) |
| th | 4014 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
| th | 4035 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
| th | 4084 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 4090 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 4115 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
| th | 4117 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
| th | 4121 | net/inet/tcp.c | ptr += th->seq; |
| th | 4147 | net/inet/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
| th | 4156 | net/inet/tcp.c | if (th->urg) |
| th | 4157 | net/inet/tcp.c | tcp_check_urg(sk,th); |
| th | 4170 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
| th | 4178 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
| th | 4407 | net/inet/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
| th | 4412 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
| th | 4413 | net/inet/tcp.c | if (th->fin) |
| th | 4418 | net/inet/tcp.c | next_seq += th->seq; |
| th | 4431 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
| th | 4438 | net/inet/tcp.c | if (th->rst) |
| th | 4450 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
| th | 4455 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
| th | 4499 | net/inet/tcp.c | struct tcphdr *th; |
| th | 4523 | net/inet/tcp.c | th = skb->h.th; |
| th | 4529 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
| th | 4545 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
| th | 4555 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
| th | 4563 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
| th | 4594 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
| th | 4639 | net/inet/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
| th | 4640 | net/inet/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
| th | 4649 | net/inet/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
| th | 4676 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
| th | 4691 | net/inet/tcp.c | if(th->ack) |
| th | 4694 | net/inet/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
| th | 4699 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
| th | 4705 | net/inet/tcp.c | if(th->rst) |
| th | 4707 | net/inet/tcp.c | if(!th->syn) |
| th | 4720 | net/inet/tcp.c | sk->acked_seq=th->seq+1; |
| th | 4721 | net/inet/tcp.c | sk->fin_seq=th->seq; |
| th | 4722 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
| th | 4724 | net/inet/tcp.c | tcp_options(sk,th); |
| th | 4725 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
| th | 4741 | net/inet/tcp.c | if(th->syn && !th->rst) |
| th | 4746 | net/inet/tcp.c | sk->dummy_th.source==th->source && |
| th | 4747 | net/inet/tcp.c | sk->dummy_th.dest==th->dest) |
| th | 4778 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
| th | 4779 | net/inet/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
| th | 4791 | net/inet/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
| th | 4813 | net/inet/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
| th | 4820 | net/inet/tcp.c | if(th->rst) |
| th | 4827 | net/inet/tcp.c | if(th->syn && !syn_ok) |
| th | 4829 | net/inet/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
| th | 4838 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
| th | 4846 | net/inet/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
| th | 4859 | 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); |