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, 
th581net/ipv4/ip_fw.cstruct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th583net/ipv4/ip_fw.cchar *p, *data = (char *)&th[1];
th600net/ipv4/ip_fw.cseq=ntohl(th->seq);
th605net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->delta);
th612net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->previous_delta);
th852net/ipv4/ip_fw.cstruct tcphdr *th;
th861net/ipv4/ip_fw.cth = (struct tcphdr *)portptr;
th866net/ipv4/ip_fw.cif (ms->sawfin || th->fin) 
th873net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk);
th897net/ipv4/ip_fw.cstruct tcphdr   *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2));
th958net/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)));
th960net/ipv4/ip_fw.cack_seq=ntohl(th->ack_seq);
th965net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->delta);
th972net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->previous_delta);
th643net/ipv4/tcp.cstruct tcphdr *th;
th667net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th720net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th721net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th722net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1041net/ipv4/tcp.cstruct tcphdr *th;
th1048net/ipv4/tcp.cth =(struct tcphdr *)header;
th1049net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th1127net/ipv4/tcp.cif (before(counted, skb->h.th->seq))   /* Found a hole so stops here */
th1129net/ipv4/tcp.csum = skb->len -(counted - skb->h.th->seq);  /* Length - header but start from where we are up to (avoid overlaps) */
th1130net/ipv4/tcp.cif (skb->h.th->syn)
th1135net/ipv4/tcp.cif (skb->h.th->syn) 
th1155net/ipv4/tcp.cif (skb->h.th->urg)
th1157net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th1303net/ipv4/tcp.cunsigned short tcp_check(struct tcphdr *th, int len,
th1311net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th1314net/ipv4/tcp.cth->check = 0;
th1315net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th1316net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th1328net/ipv4/tcp.cstruct tcphdr * th = skb->h.th;
th1334net/ipv4/tcp.csize = skb->len - ((unsigned char *) th - skb->data);
th1343net/ipv4/tcp.cskb, skb->data, th, skb->len);
th1356net/ipv4/tcp.cif(!th->syn && !th->fin) 
th1369net/ipv4/tcp.cskb->h.seq = ntohl(th->seq) + size - 4*th->doff;
th1385net/ipv4/tcp.cth->check = 0;
th1410net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th1411net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th1413net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1509net/ipv4/tcp.cstruct tcphdr *th, unsigned long daddr)
th1563net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th1569net/ipv4/tcp.ct1->dest = th->source;
th1570net/ipv4/tcp.ct1->source = th->dest;
th1623net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th1626net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th1627net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th1628net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th1629net/ipv4/tcp.cth->doff = sizeof(*th)/4;
th1630net/ipv4/tcp.cth->ack = 1;
th1631net/ipv4/tcp.cth->fin = 0;
th1635net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th1637net/ipv4/tcp.cth->window = htons(sk->window);
th1639net/ipv4/tcp.creturn(sizeof(*th));
th1770net/ipv4/tcp.chdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data)
th1909net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1910net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, len-copy);
th1922net/ipv4/tcp.cskb->h.th->urg = 1;
th1923net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th2279net/ipv4/tcp.cif (before(*seq, skb->h.th->seq))
th2281net/ipv4/tcp.coffset = *seq - skb->h.th->seq;
th2282net/ipv4/tcp.cif (skb->h.th->syn)
th2286net/ipv4/tcp.cif (skb->h.th->fin)
th2394net/ipv4/tcp.cmemcpy_tofs(to,((unsigned char *)skb->h.th) +
th2395net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th2417net/ipv4/tcp.cif (skb->h.th->fin)
th2511net/ipv4/tcp.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th2569net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2695net/ipv4/tcp.cstatic void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th2707net/ipv4/tcp.cif(th->rst)
th2737net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2743net/ipv4/tcp.ct1->dest = th->source;
th2744net/ipv4/tcp.ct1->source = th->dest;
th2748net/ipv4/tcp.cif(th->ack)
th2751net/ipv4/tcp.ct1->seq = th->ack_seq;
th2757net/ipv4/tcp.cif(!th->syn)
th2758net/ipv4/tcp.ct1->ack_seq=htonl(th->seq);
th2760net/ipv4/tcp.ct1->ack_seq=htonl(th->seq+1);
th2786net/ipv4/tcp.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th2789net/ipv4/tcp.cint length=(th->doff*4)-sizeof(struct tcphdr);
th2792net/ipv4/tcp.cptr = (unsigned char *)(th + 1);
th2813net/ipv4/tcp.cif(opsize==4 && th->syn)
th2825net/ipv4/tcp.cif (th->syn) 
th2879net/ipv4/tcp.cstruct tcphdr *th;
th2884net/ipv4/tcp.cth = skb->h.th;
th2895net/ipv4/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th2976net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq+1;
th2977net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq+1;
th2978net/ipv4/tcp.cnewsk->fin_seq = skb->h.th->seq;
th2995net/ipv4/tcp.cnewsk->dummy_th.source = skb->h.th->dest;
th2996net/ipv4/tcp.cnewsk->dummy_th.dest = skb->h.th->source;
th3015net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq + 1;
th3016net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq + 1;
th3067net/ipv4/tcp.ctcp_options(newsk,skb->h.th);
th3114net/ipv4/tcp.cmemcpy(t1, skb->h.th, sizeof(*t1));
th3119net/ipv4/tcp.ct1->dest = skb->h.th->source;
th3132net/ipv4/tcp.ct1->ack_seq = ntohl(skb->h.th->seq+1);
th3280net/ipv4/tcp.cstruct tcphdr *th;
th3291net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th3292net/ipv4/tcp.csize = skb->len - (((unsigned char *) th) - skb->data);
th3294net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th3295net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th3297net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th3321net/ipv4/tcp.cextern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
th3340net/ipv4/tcp.cack = ntohl(th->ack_seq);
th3342net/ipv4/tcp.cif (ntohs(th->window) > sk->max_window) 
th3344net/ipv4/tcp.csk->max_window = ntohs(th->window);
th3397net/ipv4/tcp.cif (len != th->doff*4) 
th3404net/ipv4/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) 
th3428net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3484net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3850net/ipv4/tcp.ctcp_options(sk,th);
th3851net/ipv4/tcp.csk->dummy_th.dest=th->source;
th3924net/ipv4/tcp.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th3926net/ipv4/tcp.csk->fin_seq = th->seq + skb->len + th->syn + th->fin;
th3944net/ipv4/tcp.cif (th->rst)
th4015net/ipv4/tcp.cstruct tcphdr *th;
th4019net/ipv4/tcp.cth = skb->h.th;
th4020net/ipv4/tcp.cskb_pull(skb,th->doff*4);
th4021net/ipv4/tcp.cskb_trim(skb,len-(th->doff*4));
th4030net/ipv4/tcp.cif (skb->len == 0 && !th->fin) 
th4036net/ipv4/tcp.cif (!th->ack)
th4037net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th4060net/ipv4/tcp.cnew_seq= th->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th4082net/ipv4/tcp.csk->acked_seq = new_seq + th->fin;
th4083net/ipv4/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
th4122net/ipv4/tcp.cprintk("skb1->h.th->seq = %d: ", skb1->h.th->seq);
th4123net/ipv4/tcp.cprintk("skb->h.th->seq = %d\n",skb->h.th->seq);
th4136net/ipv4/tcp.cif (th->seq==skb1->h.th->seq && skb->len>= skb1->len)
th4150net/ipv4/tcp.cif (after(th->seq+1, skb1->h.th->seq))
th4171net/ipv4/tcp.cth->ack_seq = th->seq + skb->len;
th4172net/ipv4/tcp.cif (th->syn) 
th4173net/ipv4/tcp.cth->ack_seq++;
th4174net/ipv4/tcp.cif (th->fin)
th4175net/ipv4/tcp.cth->ack_seq++;
th4189net/ipv4/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) 
th4191net/ipv4/tcp.cif (before(th->seq, sk->acked_seq+1)) 
th4195net/ipv4/tcp.cif (after(th->ack_seq, sk->acked_seq)) 
th4197net/ipv4/tcp.cnewwindow = sk->window-(th->ack_seq - sk->acked_seq);
th4201net/ipv4/tcp.csk->acked_seq = th->ack_seq;
th4210net/ipv4/tcp.cif (skb->h.th->fin) 
th4212net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4219net/ipv4/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) 
th4221net/ipv4/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
th4224net/ipv4/tcp.c(skb2->h.th->ack_seq - sk->acked_seq);
th4228net/ipv4/tcp.csk->acked_seq = skb2->h.th->ack_seq;
th4235net/ipv4/tcp.cif (skb2->h.th->fin) 
th4237net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4258net/ipv4/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
th4307net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4313net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4338net/ipv4/tcp.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th4340net/ipv4/tcp.cu32 ptr = ntohs(th->urg_ptr);
th4344net/ipv4/tcp.cptr += th->seq;
th4370net/ipv4/tcp.cextern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th,
th4379net/ipv4/tcp.cif (th->urg)
th4380net/ipv4/tcp.ctcp_check_urg(sk,th);
th4393net/ipv4/tcp.cptr = sk->urg_seq - th->seq + th->doff*4;
th4401net/ipv4/tcp.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th4632net/ipv4/tcp.cextern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th4637net/ipv4/tcp.cnext_seq = len - 4*th->doff;
th4638net/ipv4/tcp.cif (th->fin)
th4643net/ipv4/tcp.cnext_seq += th->seq;
th4656net/ipv4/tcp.cif (!before(th->seq, sk->acked_seq + sk->window + 1))
th4663net/ipv4/tcp.cif (th->rst)
th4675net/ipv4/tcp.ctcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th4680net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4725net/ipv4/tcp.cstruct tcphdr *th;
th4736net/ipv4/tcp.cth = skb->h.th;
th4742net/ipv4/tcp.cif(saddr==th_cache_saddr && daddr==th_cache_daddr && th->dest==th_cache_dport && th->source==th_cache_sport)
th4748net/ipv4/tcp.cif(sk!=get_sock(&tcp_prot,th->dest, saddr, th->source, daddr))
th4753net/ipv4/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th4756net/ipv4/tcp.cth_cache_dport=th->dest;
th4757net/ipv4/tcp.cth_cache_sport=th->source;
th4783net/ipv4/tcp.c(skb->ip_summed && tcp_check(th, len, saddr, daddr, skb->csum ))||
th4784net/ipv4/tcp.c(!skb->ip_summed && tcp_check(th, len, saddr, daddr, csum_partial((char *)th, len, 0)))
th4795net/ipv4/tcp.cth->seq = ntohl(th->seq);
th4803net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4834net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4879net/ipv4/tcp.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th4880net/ipv4/tcp.ctcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th4889net/ipv4/tcp.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th4916net/ipv4/tcp.cif (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq)
th4931net/ipv4/tcp.cif(th->ack)
th4934net/ipv4/tcp.cif(!tcp_ack(sk,th,saddr,len))
th4939net/ipv4/tcp.ctcp_reset(daddr, saddr, th,
th4945net/ipv4/tcp.cif(th->rst)
th4947net/ipv4/tcp.cif(!th->syn)
th4960net/ipv4/tcp.csk->acked_seq=th->seq+1;
th4961net/ipv4/tcp.csk->fin_seq=th->seq;
th4962net/ipv4/tcp.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th4964net/ipv4/tcp.ctcp_options(sk,th);
th4965net/ipv4/tcp.csk->dummy_th.dest=th->source;
th4981net/ipv4/tcp.cif(th->syn && !th->rst)
th4986net/ipv4/tcp.csk->dummy_th.source==th->source &&
th4987net/ipv4/tcp.csk->dummy_th.dest==th->dest)
th5018net/ipv4/tcp.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th5019net/ipv4/tcp.cafter(th->seq, sk->acked_seq) && !th->rst)
th5031net/ipv4/tcp.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th5053net/ipv4/tcp.cif(!tcp_sequence(sk,th,len,opt,saddr,dev))
th5060net/ipv4/tcp.cif(th->rst)
th5067net/ipv4/tcp.cif(th->syn && !syn_ok)
th5069net/ipv4/tcp.ctcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th5078net/ipv4/tcp.cif(th->ack && !tcp_ack(sk,th,saddr,len))
th5086net/ipv4/tcp.ctcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th5099net/ipv4/tcp.cif(tcp_urg(sk, th, saddr, len))
th5166net/ipv4/tcp.cstruct tcphdr *th;
th5185net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th5191net/ipv4/tcp.cbuff = sk->prot->wmalloc(sk, win_size + th->doff * 4 + 
th5227net/ipv4/tcp.cnth = (struct tcphdr *) skb_put(buff,th->doff*4);
th5229net/ipv4/tcp.cmemcpy(nth, th, th->doff * 4);
th5245net/ipv4/tcp.c(iph->ihl << 2) + th->doff * 4;
th5264net/ipv4/tcp.cth->check = 0;
th5271net/ipv4/tcp.cth->seq = htonl(sk->sent_seq);
th5272net/ipv4/tcp.cif (th->urg)
th5276net/ipv4/tcp.curg_ptr = ntohs(th->urg_ptr);
th5278net/ipv4/tcp.cth->urg = 0;
th5282net/ipv4/tcp.cth->urg_ptr = htons(urg_ptr);
th5287net/ipv4/tcp.cif(th->urg && ntohs(th->urg_ptr) < win_size)