taglinefilesource code
th254drivers/net/slhc.cstruct tcphdr *th, *oth;
th270drivers/net/slhc.cth = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4);
th271drivers/net/slhc.chlen = ip->ihl*4 + th->doff*4;
th276drivers/net/slhc.cif(th->syn || th->fin || th->rst ||
th277drivers/net/slhc.c! (th->ack)){
th299drivers/net/slhc.c&& th->source == cs->cs_tcp.source
th300drivers/net/slhc.c&& th->dest == cs->cs_tcp.dest)
th358drivers/net/slhc.c|| th->doff != cs->cs_tcp.doff
th360drivers/net/slhc.c|| (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){
th370drivers/net/slhc.cif(th->urg){
th371drivers/net/slhc.cdeltaS = ntohs(th->urg_ptr);
th374drivers/net/slhc.c} else if(th->urg_ptr != oth->urg_ptr){
th381drivers/net/slhc.cif((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){
th385drivers/net/slhc.cif((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){
th391drivers/net/slhc.cif((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){
th438drivers/net/slhc.cif(th->psh)
th443drivers/net/slhc.cdeltaA = ntohs(th->check);
th445drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th478drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th481drivers/net/slhc.cif (th->doff > 5)
th482drivers/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, 
th579net/ipv4/ip_fw.cstruct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th581net/ipv4/ip_fw.cchar *p, *data = (char *)&th[1];
th593net/ipv4/ip_fw.cif (ftp->delta && after(ftp->init_seq,th->seq)) 
th595net/ipv4/ip_fw.cth->seq += ftp->delta;
th683net/ipv4/ip_fw.cif(!ftp->init_seq || after(ftp->init_seq,th->seq))
th690net/ipv4/ip_fw.cftp->init_seq = th->seq;
th812net/ipv4/ip_fw.cstruct tcphdr *th;
th821net/ipv4/ip_fw.cth = (struct tcphdr *)portptr;
th826net/ipv4/ip_fw.cif (ms->sawfin || th->fin) 
th833net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk);
th857net/ipv4/ip_fw.cstruct tcphdr   *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2));
th905net/ipv4/ip_fw.cif (ms->delta && after(ms->init_seq,th->ack_seq)) 
th908net/ipv4/ip_fw.cth->ack_seq -= ms->delta;
th641net/ipv4/tcp.cstruct tcphdr *th;
th665net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th718net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th719net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th720net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1039net/ipv4/tcp.cstruct tcphdr *th;
th1046net/ipv4/tcp.cth =(struct tcphdr *)header;
th1047net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th1125net/ipv4/tcp.cif (before(counted, skb->h.th->seq))   /* Found a hole so stops here */
th1127net/ipv4/tcp.csum = skb->len -(counted - skb->h.th->seq);  /* Length - header but start from where we are up to (avoid overlaps) */
th1128net/ipv4/tcp.cif (skb->h.th->syn)
th1133net/ipv4/tcp.cif (skb->h.th->syn) 
th1153net/ipv4/tcp.cif (skb->h.th->urg)
th1155net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th1301net/ipv4/tcp.cunsigned short tcp_check(struct tcphdr *th, int len,
th1309net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th1312net/ipv4/tcp.cth->check = 0;
th1313net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th1314net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th1326net/ipv4/tcp.cstruct tcphdr * th = skb->h.th;
th1332net/ipv4/tcp.csize = skb->len - ((unsigned char *) th - skb->data);
th1341net/ipv4/tcp.cskb, skb->data, th, skb->len);
th1354net/ipv4/tcp.cif(!th->syn && !th->fin) 
th1367net/ipv4/tcp.cskb->h.seq = ntohl(th->seq) + size - 4*th->doff;
th1383net/ipv4/tcp.cth->check = 0;
th1408net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th1409net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th1411net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1507net/ipv4/tcp.cstruct tcphdr *th, unsigned long daddr)
th1561net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th1567net/ipv4/tcp.ct1->dest = th->source;
th1568net/ipv4/tcp.ct1->source = th->dest;
th1621net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th1624net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th1625net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th1626net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th1627net/ipv4/tcp.cth->doff = sizeof(*th)/4;
th1628net/ipv4/tcp.cth->ack = 1;
th1629net/ipv4/tcp.cth->fin = 0;
th1633net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th1635net/ipv4/tcp.cth->window = htons(sk->window);
th1637net/ipv4/tcp.creturn(sizeof(*th));
th1768net/ipv4/tcp.chdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data)
th1907net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1908net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, len-copy);
th1920net/ipv4/tcp.cskb->h.th->urg = 1;
th1921net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th2277net/ipv4/tcp.cif (before(*seq, skb->h.th->seq))
th2279net/ipv4/tcp.coffset = *seq - skb->h.th->seq;
th2280net/ipv4/tcp.cif (skb->h.th->syn)
th2284net/ipv4/tcp.cif (skb->h.th->fin)
th2392net/ipv4/tcp.cmemcpy_tofs(to,((unsigned char *)skb->h.th) +
th2393net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th2415net/ipv4/tcp.cif (skb->h.th->fin)
th2509net/ipv4/tcp.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th2567net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2693net/ipv4/tcp.cstatic void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th2705net/ipv4/tcp.cif(th->rst)
th2735net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2741net/ipv4/tcp.ct1->dest = th->source;
th2742net/ipv4/tcp.ct1->source = th->dest;
th2746net/ipv4/tcp.cif(th->ack)
th2749net/ipv4/tcp.ct1->seq = th->ack_seq;
th2755net/ipv4/tcp.cif(!th->syn)
th2756net/ipv4/tcp.ct1->ack_seq=htonl(th->seq);
th2758net/ipv4/tcp.ct1->ack_seq=htonl(th->seq+1);
th2784net/ipv4/tcp.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th2787net/ipv4/tcp.cint length=(th->doff*4)-sizeof(struct tcphdr);
th2790net/ipv4/tcp.cptr = (unsigned char *)(th + 1);
th2811net/ipv4/tcp.cif(opsize==4 && th->syn)
th2823net/ipv4/tcp.cif (th->syn) 
th2877net/ipv4/tcp.cstruct tcphdr *th;
th2882net/ipv4/tcp.cth = skb->h.th;
th2893net/ipv4/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th2957net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq+1;
th2958net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq+1;
th2959net/ipv4/tcp.cnewsk->fin_seq = skb->h.th->seq;
th2976net/ipv4/tcp.cnewsk->dummy_th.source = skb->h.th->dest;
th2977net/ipv4/tcp.cnewsk->dummy_th.dest = skb->h.th->source;
th2996net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq + 1;
th2997net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq + 1;
th3048net/ipv4/tcp.ctcp_options(newsk,skb->h.th);
th3095net/ipv4/tcp.cmemcpy(t1, skb->h.th, sizeof(*t1));
th3100net/ipv4/tcp.ct1->dest = skb->h.th->source;
th3113net/ipv4/tcp.ct1->ack_seq = ntohl(skb->h.th->seq+1);
th3261net/ipv4/tcp.cstruct tcphdr *th;
th3272net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th3273net/ipv4/tcp.csize = skb->len - (((unsigned char *) th) - skb->data);
th3275net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th3276net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th3278net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th3302net/ipv4/tcp.cextern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
th3321net/ipv4/tcp.cack = ntohl(th->ack_seq);
th3323net/ipv4/tcp.cif (ntohs(th->window) > sk->max_window) 
th3325net/ipv4/tcp.csk->max_window = ntohs(th->window);
th3378net/ipv4/tcp.cif (len != th->doff*4) 
th3385net/ipv4/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) 
th3409net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3465net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3831net/ipv4/tcp.ctcp_options(sk,th);
th3832net/ipv4/tcp.csk->dummy_th.dest=th->source;
th3905net/ipv4/tcp.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th3907net/ipv4/tcp.csk->fin_seq = th->seq + skb->len + th->syn + th->fin;
th3925net/ipv4/tcp.cif (th->rst)
th3996net/ipv4/tcp.cstruct tcphdr *th;
th4000net/ipv4/tcp.cth = skb->h.th;
th4001net/ipv4/tcp.cskb_pull(skb,th->doff*4);
th4002net/ipv4/tcp.cskb_trim(skb,len-(th->doff*4));
th4011net/ipv4/tcp.cif (skb->len == 0 && !th->fin) 
th4017net/ipv4/tcp.cif (!th->ack)
th4018net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th4041net/ipv4/tcp.cnew_seq= th->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th4063net/ipv4/tcp.csk->acked_seq = new_seq + th->fin;
th4064net/ipv4/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
th4103net/ipv4/tcp.cprintk("skb1->h.th->seq = %d: ", skb1->h.th->seq);
th4104net/ipv4/tcp.cprintk("skb->h.th->seq = %d\n",skb->h.th->seq);
th4117net/ipv4/tcp.cif (th->seq==skb1->h.th->seq && skb->len>= skb1->len)
th4131net/ipv4/tcp.cif (after(th->seq+1, skb1->h.th->seq))
th4152net/ipv4/tcp.cth->ack_seq = th->seq + skb->len;
th4153net/ipv4/tcp.cif (th->syn) 
th4154net/ipv4/tcp.cth->ack_seq++;
th4155net/ipv4/tcp.cif (th->fin)
th4156net/ipv4/tcp.cth->ack_seq++;
th4170net/ipv4/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) 
th4172net/ipv4/tcp.cif (before(th->seq, sk->acked_seq+1)) 
th4176net/ipv4/tcp.cif (after(th->ack_seq, sk->acked_seq)) 
th4178net/ipv4/tcp.cnewwindow = sk->window-(th->ack_seq - sk->acked_seq);
th4182net/ipv4/tcp.csk->acked_seq = th->ack_seq;
th4191net/ipv4/tcp.cif (skb->h.th->fin) 
th4193net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4200net/ipv4/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) 
th4202net/ipv4/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
th4205net/ipv4/tcp.c(skb2->h.th->ack_seq - sk->acked_seq);
th4209net/ipv4/tcp.csk->acked_seq = skb2->h.th->ack_seq;
th4216net/ipv4/tcp.cif (skb2->h.th->fin) 
th4218net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4239net/ipv4/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
th4288net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4294net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4319net/ipv4/tcp.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th4321net/ipv4/tcp.cu32 ptr = ntohs(th->urg_ptr);
th4325net/ipv4/tcp.cptr += th->seq;
th4351net/ipv4/tcp.cextern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th,
th4360net/ipv4/tcp.cif (th->urg)
th4361net/ipv4/tcp.ctcp_check_urg(sk,th);
th4374net/ipv4/tcp.cptr = sk->urg_seq - th->seq + th->doff*4;
th4382net/ipv4/tcp.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th4611net/ipv4/tcp.cextern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th4616net/ipv4/tcp.cnext_seq = len - 4*th->doff;
th4617net/ipv4/tcp.cif (th->fin)
th4622net/ipv4/tcp.cnext_seq += th->seq;
th4635net/ipv4/tcp.cif (!before(th->seq, sk->acked_seq + sk->window + 1))
th4642net/ipv4/tcp.cif (th->rst)
th4654net/ipv4/tcp.ctcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th4659net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4704net/ipv4/tcp.cstruct tcphdr *th;
th4715net/ipv4/tcp.cth = skb->h.th;
th4721net/ipv4/tcp.cif(saddr==th_cache_saddr && daddr==th_cache_daddr && th->dest==th_cache_dport && th->source==th_cache_sport)
th4725net/ipv4/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th4728net/ipv4/tcp.cth_cache_dport=th->dest;
th4729net/ipv4/tcp.cth_cache_sport=th->source;
th4755net/ipv4/tcp.c(skb->ip_summed && tcp_check(th, len, saddr, daddr, skb->csum ))||
th4756net/ipv4/tcp.c(!skb->ip_summed && tcp_check(th, len, saddr, daddr, csum_partial((char *)th, len, 0)))
th4767net/ipv4/tcp.cth->seq = ntohl(th->seq);
th4775net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4806net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4851net/ipv4/tcp.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th4852net/ipv4/tcp.ctcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th4861net/ipv4/tcp.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th4888net/ipv4/tcp.cif (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq)
th4903net/ipv4/tcp.cif(th->ack)
th4906net/ipv4/tcp.cif(!tcp_ack(sk,th,saddr,len))
th4911net/ipv4/tcp.ctcp_reset(daddr, saddr, th,
th4917net/ipv4/tcp.cif(th->rst)
th4919net/ipv4/tcp.cif(!th->syn)
th4932net/ipv4/tcp.csk->acked_seq=th->seq+1;
th4933net/ipv4/tcp.csk->fin_seq=th->seq;
th4934net/ipv4/tcp.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th4936net/ipv4/tcp.ctcp_options(sk,th);
th4937net/ipv4/tcp.csk->dummy_th.dest=th->source;
th4953net/ipv4/tcp.cif(th->syn && !th->rst)
th4958net/ipv4/tcp.csk->dummy_th.source==th->source &&
th4959net/ipv4/tcp.csk->dummy_th.dest==th->dest)
th4990net/ipv4/tcp.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th4991net/ipv4/tcp.cafter(th->seq, sk->acked_seq) && !th->rst)
th5003net/ipv4/tcp.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th5025net/ipv4/tcp.cif(!tcp_sequence(sk,th,len,opt,saddr,dev))
th5032net/ipv4/tcp.cif(th->rst)
th5039net/ipv4/tcp.cif(th->syn && !syn_ok)
th5041net/ipv4/tcp.ctcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th5050net/ipv4/tcp.cif(th->ack && !tcp_ack(sk,th,saddr,len))
th5058net/ipv4/tcp.ctcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th5071net/ipv4/tcp.cif(tcp_urg(sk, th, saddr, len))
th5138net/ipv4/tcp.cstruct tcphdr *th;
th5154net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th5160net/ipv4/tcp.cbuff = sk->prot->wmalloc(sk, win_size + th->doff * 4 + 
th5196net/ipv4/tcp.cnth = (struct tcphdr *) skb_put(buff,th->doff*4);
th5198net/ipv4/tcp.cmemcpy(nth, th, th->doff * 4);
th5214net/ipv4/tcp.c(iph->ihl << 2) + th->doff * 4;
th5233net/ipv4/tcp.cth->check = 0;
th5240net/ipv4/tcp.cth->seq = htonl(sk->sent_seq);
th5241net/ipv4/tcp.cif (th->urg)
th5245net/ipv4/tcp.curg_ptr = ntohs(th->urg_ptr);
th5247net/ipv4/tcp.cth->urg = 0;
th5251net/ipv4/tcp.cth->urg_ptr = htons(urg_ptr);
th5256net/ipv4/tcp.cif(th->urg && ntohs(th->urg_ptr) < win_size)