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 | 1021 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 1093 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 1103 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 1106 | net/inet/tcp.c | th->check = 0; |
th | 1107 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 1119 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 1125 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 1134 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 1147 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 1160 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 1176 | net/inet/tcp.c | th->check = 0; |
th | 1201 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1202 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1204 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1300 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 1357 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1363 | net/inet/tcp.c | t1->dest = th->source; |
th | 1364 | net/inet/tcp.c | t1->source = th->dest; |
th | 1417 | net/inet/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 1420 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 1421 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 1422 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 1423 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 1424 | net/inet/tcp.c | th->ack = 1; |
th | 1425 | net/inet/tcp.c | th->fin = 0; |
th | 1429 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1431 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 1433 | net/inet/tcp.c | return(sizeof(*th)); |
th | 1565 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1710 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 2076 | net/inet/tcp.c | if (before(*seq, skb->h.th->seq)) |
th | 2078 | net/inet/tcp.c | offset = *seq - skb->h.th->seq; |
th | 2079 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 2083 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2191 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 2192 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 2214 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2308 | net/inet/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
th | 2369 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2495 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 2507 | net/inet/tcp.c | if(th->rst) |
th | 2541 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2547 | net/inet/tcp.c | t1->dest = th->source; |
th | 2548 | net/inet/tcp.c | t1->source = th->dest; |
th | 2552 | net/inet/tcp.c | if(th->ack) |
th | 2555 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 2561 | net/inet/tcp.c | if(!th->syn) |
th | 2562 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 2564 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 2590 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 2593 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2596 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2617 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 2629 | net/inet/tcp.c | if (th->syn) |
th | 2683 | net/inet/tcp.c | struct tcphdr *th; |
th | 2688 | net/inet/tcp.c | th = skb->h.th; |
th | 2699 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 2763 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2764 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq+1; |
th | 2765 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2782 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2783 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2802 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2803 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq + 1; |
th | 2854 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2903 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2908 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2921 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 3067 | net/inet/tcp.c | struct tcphdr *th; |
th | 3079 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 3080 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 3082 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 3083 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 3085 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 3109 | net/inet/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 3128 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 3130 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 3132 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 3185 | net/inet/tcp.c | if (len != th->doff*4) |
th | 3192 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 3216 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3272 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3638 | net/inet/tcp.c | tcp_options(sk,th); |
th | 3639 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 3712 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 3714 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3732 | net/inet/tcp.c | if (th->rst) |
th | 3803 | net/inet/tcp.c | struct tcphdr *th; |
th | 3808 | net/inet/tcp.c | th = skb->h.th; |
th | 3809 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 3818 | net/inet/tcp.c | if (skb->len == 0 && !th->fin) |
th | 3824 | net/inet/tcp.c | if (!th->ack) |
th | 3825 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 3848 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 3870 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 3871 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3910 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3911 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3924 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3938 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3959 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3960 | net/inet/tcp.c | if (th->syn) |
th | 3961 | net/inet/tcp.c | th->ack_seq++; |
th | 3962 | net/inet/tcp.c | if (th->fin) |
th | 3963 | net/inet/tcp.c | th->ack_seq++; |
th | 3977 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3979 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3983 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3985 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3989 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3998 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 4000 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4007 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 4009 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 4012 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 4016 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 4023 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 4025 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4046 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 4095 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4101 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4126 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 4128 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 4132 | net/inet/tcp.c | ptr += th->seq; |
th | 4158 | net/inet/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 4167 | net/inet/tcp.c | if (th->urg) |
th | 4168 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 4181 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 4189 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 4420 | net/inet/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 4425 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 4426 | net/inet/tcp.c | if (th->fin) |
th | 4431 | net/inet/tcp.c | next_seq += th->seq; |
th | 4444 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 4451 | net/inet/tcp.c | if (th->rst) |
th | 4463 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 4468 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4512 | net/inet/tcp.c | struct tcphdr *th; |
th | 4536 | net/inet/tcp.c | th = skb->h.th; |
th | 4542 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4558 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 4568 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 4576 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4607 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4652 | net/inet/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 4653 | net/inet/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 4662 | net/inet/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 4689 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
th | 4704 | net/inet/tcp.c | if(th->ack) |
th | 4707 | net/inet/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
th | 4712 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4718 | net/inet/tcp.c | if(th->rst) |
th | 4720 | net/inet/tcp.c | if(!th->syn) |
th | 4733 | net/inet/tcp.c | sk->acked_seq=th->seq+1; |
th | 4734 | net/inet/tcp.c | sk->fin_seq=th->seq; |
th | 4735 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 4737 | net/inet/tcp.c | tcp_options(sk,th); |
th | 4738 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 4754 | net/inet/tcp.c | if(th->syn && !th->rst) |
th | 4759 | net/inet/tcp.c | sk->dummy_th.source==th->source && |
th | 4760 | net/inet/tcp.c | sk->dummy_th.dest==th->dest) |
th | 4791 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 4792 | net/inet/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
th | 4804 | net/inet/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4826 | net/inet/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
th | 4833 | net/inet/tcp.c | if(th->rst) |
th | 4840 | net/inet/tcp.c | if(th->syn && !syn_ok) |
th | 4842 | net/inet/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 4851 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
th | 4859 | net/inet/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 4872 | 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); |