taglinefilesource code
th258drivers/net/slhc.cstruct tcphdr *th, *oth;
th274drivers/net/slhc.cth = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4);
th275drivers/net/slhc.chlen = ip->ihl*4 + th->doff*4;
th280drivers/net/slhc.cif(th->syn || th->fin || th->rst ||
th281drivers/net/slhc.c! (th->ack)){
th303drivers/net/slhc.c&& th->source == cs->cs_tcp.source
th304drivers/net/slhc.c&& th->dest == cs->cs_tcp.dest)
th362drivers/net/slhc.c|| th->doff != cs->cs_tcp.doff
th364drivers/net/slhc.c|| (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){
th374drivers/net/slhc.cif(th->urg){
th375drivers/net/slhc.cdeltaS = ntohs(th->urg_ptr);
th378drivers/net/slhc.c} else if(th->urg_ptr != oth->urg_ptr){
th385drivers/net/slhc.cif((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){
th389drivers/net/slhc.cif((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){
th395drivers/net/slhc.cif((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){
th442drivers/net/slhc.cif(th->psh)
th447drivers/net/slhc.cdeltaA = ntohs(th->check);
th449drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th482drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th485drivers/net/slhc.cif (th->doff > 5)
th486drivers/net/slhc.cmemcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4);
th16include/asm-alpha/ipsum.hextern inline unsigned short tcp_check(struct tcphdr *th, int len, u32 saddr, u32 daddr)
th20include/asm-sparc/ipsum.hextern inline unsigned short tcp_check(struct tcphdr *th, int len, u32 saddr, u32 daddr)
th52include/linux/skbuff.hstruct tcphdr  *th;
th137include/net/tcp.hextern void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th582net/ipv4/ip_fw.cstruct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th584net/ipv4/ip_fw.cchar *p, *data = (char *)&th[1];
th601net/ipv4/ip_fw.cseq=ntohl(th->seq);
th606net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->delta);
th613net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->previous_delta);
th853net/ipv4/ip_fw.cstruct tcphdr *th;
th862net/ipv4/ip_fw.cth = (struct tcphdr *)portptr;
th867net/ipv4/ip_fw.cif (ms->sawfin || th->fin) 
th874net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk);
th898net/ipv4/ip_fw.cstruct tcphdr   *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2));
th959net/ipv4/ip_fw.cprintk("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)));
th961net/ipv4/ip_fw.cack_seq=ntohl(th->ack_seq);
th966net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->delta);
th973net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->previous_delta);
th645net/ipv4/tcp.cstruct tcphdr *th;
th669net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th722net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th723net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th724net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1043net/ipv4/tcp.cstruct tcphdr *th;
th1050net/ipv4/tcp.cth =(struct tcphdr *)header;
th1051net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th1129net/ipv4/tcp.cif (before(counted, skb->h.th->seq))   /* Found a hole so stops here */
th1131net/ipv4/tcp.csum = skb->len -(counted - skb->h.th->seq);  /* Length - header but start from where we are up to (avoid overlaps) */
th1132net/ipv4/tcp.cif (skb->h.th->syn)
th1137net/ipv4/tcp.cif (skb->h.th->syn) 
th1157net/ipv4/tcp.cif (skb->h.th->urg)
th1159net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th1305net/ipv4/tcp.cunsigned short tcp_check(struct tcphdr *th, int len,
th1313net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th1316net/ipv4/tcp.cth->check = 0;
th1317net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th1318net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th1330net/ipv4/tcp.cstruct tcphdr * th = skb->h.th;
th1336net/ipv4/tcp.csize = skb->len - ((unsigned char *) th - skb->data);
th1345net/ipv4/tcp.cskb, skb->data, th, skb->len);
th1358net/ipv4/tcp.cif(!th->syn && !th->fin) 
th1371net/ipv4/tcp.cskb->h.seq = ntohl(th->seq) + size - 4*th->doff;
th1387net/ipv4/tcp.cth->check = 0;
th1412net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th1413net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th1415net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1511net/ipv4/tcp.cstruct tcphdr *th, unsigned long daddr)
th1565net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th1571net/ipv4/tcp.ct1->dest = th->source;
th1572net/ipv4/tcp.ct1->source = th->dest;
th1625net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th1628net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th1629net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th1630net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th1631net/ipv4/tcp.cth->doff = sizeof(*th)/4;
th1632net/ipv4/tcp.cth->ack = 1;
th1633net/ipv4/tcp.cth->fin = 0;
th1637net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th1639net/ipv4/tcp.cth->window = htons(sk->window);
th1641net/ipv4/tcp.creturn(sizeof(*th));
th1796net/ipv4/tcp.chdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data)
th1935net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1936net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, len-copy);
th1948net/ipv4/tcp.cskb->h.th->urg = 1;
th1949net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th2289net/ipv4/tcp.cif (before(*seq, skb->h.th->seq))
th2291net/ipv4/tcp.coffset = *seq - skb->h.th->seq;
th2292net/ipv4/tcp.cif (skb->h.th->syn)
th2296net/ipv4/tcp.cif (skb->h.th->fin)
th2403net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th2404net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th2425net/ipv4/tcp.cif (skb->h.th->fin)
th2532net/ipv4/tcp.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th2590net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2685net/ipv4/tcp.cstatic void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th2697net/ipv4/tcp.cif(th->rst)
th2727net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2733net/ipv4/tcp.ct1->dest = th->source;
th2734net/ipv4/tcp.ct1->source = th->dest;
th2738net/ipv4/tcp.cif(th->ack)
th2741net/ipv4/tcp.ct1->seq = th->ack_seq;
th2747net/ipv4/tcp.cif(!th->syn)
th2748net/ipv4/tcp.ct1->ack_seq=htonl(th->seq);
th2750net/ipv4/tcp.ct1->ack_seq=htonl(th->seq+1);
th2776net/ipv4/tcp.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th2779net/ipv4/tcp.cint length=(th->doff*4)-sizeof(struct tcphdr);
th2782net/ipv4/tcp.cptr = (unsigned char *)(th + 1);
th2803net/ipv4/tcp.cif(opsize==4 && th->syn)
th2815net/ipv4/tcp.cif (th->syn) 
th2869net/ipv4/tcp.cstruct tcphdr *th;
th2874net/ipv4/tcp.cth = skb->h.th;
th2885net/ipv4/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th2966net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq+1;
th2967net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq+1;
th2968net/ipv4/tcp.cnewsk->fin_seq = skb->h.th->seq;
th2985net/ipv4/tcp.cnewsk->dummy_th.source = skb->h.th->dest;
th2986net/ipv4/tcp.cnewsk->dummy_th.dest = skb->h.th->source;
th3006net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq + 1;
th3007net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq + 1;
th3058net/ipv4/tcp.ctcp_options(newsk,skb->h.th);
th3105net/ipv4/tcp.cmemcpy(t1, skb->h.th, sizeof(*t1));
th3110net/ipv4/tcp.ct1->dest = skb->h.th->source;
th3123net/ipv4/tcp.ct1->ack_seq = ntohl(skb->h.th->seq+1);
th3271net/ipv4/tcp.cstruct tcphdr *th;
th3282net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th3283net/ipv4/tcp.csize = skb->len - (((unsigned char *) th) - skb->data);
th3285net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th3286net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th3288net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th3312net/ipv4/tcp.cextern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
th3331net/ipv4/tcp.cack = ntohl(th->ack_seq);
th3333net/ipv4/tcp.cif (ntohs(th->window) > sk->max_window) 
th3335net/ipv4/tcp.csk->max_window = ntohs(th->window);
th3388net/ipv4/tcp.cif (len != th->doff*4) 
th3395net/ipv4/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) 
th3419net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3475net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3841net/ipv4/tcp.ctcp_options(sk,th);
th3842net/ipv4/tcp.csk->dummy_th.dest=th->source;
th3915net/ipv4/tcp.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th3917net/ipv4/tcp.csk->fin_seq = th->seq + skb->len + th->syn + th->fin;
th3935net/ipv4/tcp.cif (th->rst)
th4006net/ipv4/tcp.cstruct tcphdr *th;
th4010net/ipv4/tcp.cth = skb->h.th;
th4011net/ipv4/tcp.cskb_pull(skb,th->doff*4);
th4012net/ipv4/tcp.cskb_trim(skb,len-(th->doff*4));
th4021net/ipv4/tcp.cif (skb->len == 0 && !th->fin) 
th4027net/ipv4/tcp.cif (!th->ack)
th4028net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th4051net/ipv4/tcp.cnew_seq= th->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th4073net/ipv4/tcp.csk->acked_seq = new_seq + th->fin;
th4074net/ipv4/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
th4113net/ipv4/tcp.cprintk("skb1->h.th->seq = %d: ", skb1->h.th->seq);
th4114net/ipv4/tcp.cprintk("skb->h.th->seq = %d\n",skb->h.th->seq);
th4127net/ipv4/tcp.cif (th->seq==skb1->h.th->seq && skb->len>= skb1->len)
th4141net/ipv4/tcp.cif (after(th->seq+1, skb1->h.th->seq))
th4162net/ipv4/tcp.cth->ack_seq = th->seq + skb->len;
th4163net/ipv4/tcp.cif (th->syn) 
th4164net/ipv4/tcp.cth->ack_seq++;
th4165net/ipv4/tcp.cif (th->fin)
th4166net/ipv4/tcp.cth->ack_seq++;
th4180net/ipv4/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) 
th4182net/ipv4/tcp.cif (before(th->seq, sk->acked_seq+1)) 
th4186net/ipv4/tcp.cif (after(th->ack_seq, sk->acked_seq)) 
th4188net/ipv4/tcp.cnewwindow = sk->window-(th->ack_seq - sk->acked_seq);
th4192net/ipv4/tcp.csk->acked_seq = th->ack_seq;
th4201net/ipv4/tcp.cif (skb->h.th->fin) 
th4203net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4210net/ipv4/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) 
th4212net/ipv4/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
th4215net/ipv4/tcp.c(skb2->h.th->ack_seq - sk->acked_seq);
th4219net/ipv4/tcp.csk->acked_seq = skb2->h.th->ack_seq;
th4226net/ipv4/tcp.cif (skb2->h.th->fin) 
th4228net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4249net/ipv4/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
th4298net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4304net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4329net/ipv4/tcp.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th4331net/ipv4/tcp.cu32 ptr = ntohs(th->urg_ptr);
th4335net/ipv4/tcp.cptr += th->seq;
th4361net/ipv4/tcp.cextern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th,
th4370net/ipv4/tcp.cif (th->urg)
th4371net/ipv4/tcp.ctcp_check_urg(sk,th);
th4384net/ipv4/tcp.cptr = sk->urg_seq - th->seq + th->doff*4;
th4392net/ipv4/tcp.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th4638net/ipv4/tcp.cextern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th4643net/ipv4/tcp.cnext_seq = len - 4*th->doff;
th4644net/ipv4/tcp.cif (th->fin)
th4649net/ipv4/tcp.cnext_seq += th->seq;
th4662net/ipv4/tcp.cif (!before(th->seq, sk->acked_seq + sk->window + 1))
th4669net/ipv4/tcp.cif (th->rst)
th4681net/ipv4/tcp.ctcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th4686net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4731net/ipv4/tcp.cstruct tcphdr *th;
th4742net/ipv4/tcp.cth = skb->h.th;
th4748net/ipv4/tcp.cif(saddr==th_cache_saddr && daddr==th_cache_daddr && th->dest==th_cache_dport && th->source==th_cache_sport)
th4754net/ipv4/tcp.cif(sk!=get_sock(&tcp_prot,th->dest, saddr, th->source, daddr))
th4759net/ipv4/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th4762net/ipv4/tcp.cth_cache_dport=th->dest;
th4763net/ipv4/tcp.cth_cache_sport=th->source;
th4789net/ipv4/tcp.c(skb->ip_summed && tcp_check(th, len, saddr, daddr, skb->csum ))||
th4790net/ipv4/tcp.c(!skb->ip_summed && tcp_check(th, len, saddr, daddr, csum_partial((char *)th, len, 0)))
th4801net/ipv4/tcp.cth->seq = ntohl(th->seq);
th4809net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4839net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4877net/ipv4/tcp.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th4878net/ipv4/tcp.ctcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th4887net/ipv4/tcp.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th4914net/ipv4/tcp.cif (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq)
th4929net/ipv4/tcp.cif(th->ack)
th4932net/ipv4/tcp.cif(!tcp_ack(sk,th,saddr,len))
th4937net/ipv4/tcp.ctcp_reset(daddr, saddr, th,
th4943net/ipv4/tcp.cif(th->rst)
th4945net/ipv4/tcp.cif(!th->syn)
th4958net/ipv4/tcp.csk->acked_seq=th->seq+1;
th4959net/ipv4/tcp.csk->fin_seq=th->seq;
th4960net/ipv4/tcp.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th4962net/ipv4/tcp.ctcp_options(sk,th);
th4963net/ipv4/tcp.csk->dummy_th.dest=th->source;
th4979net/ipv4/tcp.cif(th->syn && !th->rst)
th4984net/ipv4/tcp.csk->dummy_th.source==th->source &&
th4985net/ipv4/tcp.csk->dummy_th.dest==th->dest)
th5016net/ipv4/tcp.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th5017net/ipv4/tcp.cafter(th->seq, sk->acked_seq) && !th->rst)
th5029net/ipv4/tcp.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th5051net/ipv4/tcp.cif(!tcp_sequence(sk,th,len,opt,saddr,dev))
th5058net/ipv4/tcp.cif(th->rst)
th5065net/ipv4/tcp.cif(th->syn && !syn_ok)
th5067net/ipv4/tcp.ctcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th5076net/ipv4/tcp.cif(th->ack && !tcp_ack(sk,th,saddr,len))
th5084net/ipv4/tcp.ctcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th5111net/ipv4/tcp.cif(tcp_urg(sk, th, saddr, len))
th5177net/ipv4/tcp.cstruct tcphdr *th;
th5196net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th5202net/ipv4/tcp.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th5238net/ipv4/tcp.cnth = (struct tcphdr *) skb_put(buff,th->doff*4);
th5240net/ipv4/tcp.cmemcpy(nth, th, th->doff * 4);
th5256net/ipv4/tcp.c(iph->ihl << 2) + th->doff * 4;
th5275net/ipv4/tcp.cth->check = 0;
th5282net/ipv4/tcp.cth->seq = htonl(sk->sent_seq);
th5283net/ipv4/tcp.cif (th->urg)
th5287net/ipv4/tcp.curg_ptr = ntohs(th->urg_ptr);
th5289net/ipv4/tcp.cth->urg = 0;
th5293net/ipv4/tcp.cth->urg_ptr = htons(urg_ptr);
th5298net/ipv4/tcp.cif(th->urg && ntohs(th->urg_ptr) < win_size)