taglinefilesource code
th252drivers/net/slhc.cstruct tcphdr *th, *oth;
th268drivers/net/slhc.cth = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4);
th269drivers/net/slhc.chlen = ip->ihl*4 + th->doff*4;
th274drivers/net/slhc.cif(th->syn || th->fin || th->rst ||
th275drivers/net/slhc.c! (th->ack)){
th297drivers/net/slhc.c&& th->source == cs->cs_tcp.source
th298drivers/net/slhc.c&& th->dest == cs->cs_tcp.dest)
th356drivers/net/slhc.c|| th->doff != cs->cs_tcp.doff
th358drivers/net/slhc.c|| (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){
th368drivers/net/slhc.cif(th->urg){
th369drivers/net/slhc.cdeltaS = ntohs(th->urg_ptr);
th372drivers/net/slhc.c} else if(th->urg_ptr != oth->urg_ptr){
th379drivers/net/slhc.cif((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){
th383drivers/net/slhc.cif((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){
th389drivers/net/slhc.cif((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){
th436drivers/net/slhc.cif(th->psh)
th441drivers/net/slhc.cdeltaA = ntohs(th->check);
th443drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th476drivers/net/slhc.cmemcpy(&cs->cs_tcp,th,20);
th479drivers/net/slhc.cif (th->doff > 5)
th480drivers/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, 
th521net/ipv4/ip_fw.cstruct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th523net/ipv4/ip_fw.cchar *p, *data = (char *)&th[1];
th534net/ipv4/ip_fw.cif (ftp->delta && after(ftp->init_seq,th->seq)) 
th536net/ipv4/ip_fw.cth->seq += ftp->delta;
th613net/ipv4/ip_fw.cftp->init_seq = th->seq;
th732net/ipv4/ip_fw.cstruct tcphdr *th;
th740net/ipv4/ip_fw.cth = (struct tcphdr *)portptr;
th745net/ipv4/ip_fw.cif (ms->sawfin || th->fin) 
th752net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk);
th776net/ipv4/ip_fw.cstruct tcphdr   *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2));
th824net/ipv4/ip_fw.cif (ms->delta && after(ms->init_seq,th->ack_seq)) 
th827net/ipv4/ip_fw.cth->ack_seq -= ms->delta;
th454net/ipv4/tcp.cstruct tcphdr *th;
th478net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th531net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th532net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th533net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th850net/ipv4/tcp.cstruct tcphdr *th;
th857net/ipv4/tcp.cth =(struct tcphdr *)header;
th858net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th939net/ipv4/tcp.cif (before(counted, skb->h.th->seq))   /* Found a hole so stops here */
th941net/ipv4/tcp.csum = skb->len -(counted - skb->h.th->seq);  /* Length - header but start from where we are up to (avoid overlaps) */
th942net/ipv4/tcp.cif (skb->h.th->syn)
th947net/ipv4/tcp.cif (skb->h.th->syn) 
th967net/ipv4/tcp.cif (skb->h.th->urg)
th969net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th1115net/ipv4/tcp.cunsigned short tcp_check(struct tcphdr *th, int len,
th1123net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th1126net/ipv4/tcp.cth->check = 0;
th1127net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th1128net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th1140net/ipv4/tcp.cstruct tcphdr * th = skb->h.th;
th1146net/ipv4/tcp.csize = skb->len - ((unsigned char *) th - skb->data);
th1155net/ipv4/tcp.cskb, skb->data, th, skb->len);
th1168net/ipv4/tcp.cif(!th->syn && !th->fin) 
th1181net/ipv4/tcp.cskb->h.seq = ntohl(th->seq) + size - 4*th->doff;
th1197net/ipv4/tcp.cth->check = 0;
th1222net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th1223net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th1225net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th1321net/ipv4/tcp.cstruct tcphdr *th, unsigned long daddr)
th1375net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th1381net/ipv4/tcp.ct1->dest = th->source;
th1382net/ipv4/tcp.ct1->source = th->dest;
th1435net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th1438net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th1439net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th1440net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th1441net/ipv4/tcp.cth->doff = sizeof(*th)/4;
th1442net/ipv4/tcp.cth->ack = 1;
th1443net/ipv4/tcp.cth->fin = 0;
th1447net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th1449net/ipv4/tcp.cth->window = htons(sk->window);
th1451net/ipv4/tcp.creturn(sizeof(*th));
th1582net/ipv4/tcp.chdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data)
th1721net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1722net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, len-copy);
th1734net/ipv4/tcp.cskb->h.th->urg = 1;
th1735net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th2091net/ipv4/tcp.cif (before(*seq, skb->h.th->seq))
th2093net/ipv4/tcp.coffset = *seq - skb->h.th->seq;
th2094net/ipv4/tcp.cif (skb->h.th->syn)
th2098net/ipv4/tcp.cif (skb->h.th->fin)
th2206net/ipv4/tcp.cmemcpy_tofs(to,((unsigned char *)skb->h.th) +
th2207net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th2229net/ipv4/tcp.cif (skb->h.th->fin)
th2323net/ipv4/tcp.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th2381net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2507net/ipv4/tcp.cstatic void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th2519net/ipv4/tcp.cif(th->rst)
th2549net/ipv4/tcp.cmemcpy(t1, th, sizeof(*t1));
th2555net/ipv4/tcp.ct1->dest = th->source;
th2556net/ipv4/tcp.ct1->source = th->dest;
th2560net/ipv4/tcp.cif(th->ack)
th2563net/ipv4/tcp.ct1->seq = th->ack_seq;
th2569net/ipv4/tcp.cif(!th->syn)
th2570net/ipv4/tcp.ct1->ack_seq=htonl(th->seq);
th2572net/ipv4/tcp.ct1->ack_seq=htonl(th->seq+1);
th2598net/ipv4/tcp.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th2601net/ipv4/tcp.cint length=(th->doff*4)-sizeof(struct tcphdr);
th2604net/ipv4/tcp.cptr = (unsigned char *)(th + 1);
th2625net/ipv4/tcp.cif(opsize==4 && th->syn)
th2637net/ipv4/tcp.cif (th->syn) 
th2691net/ipv4/tcp.cstruct tcphdr *th;
th2696net/ipv4/tcp.cth = skb->h.th;
th2707net/ipv4/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th2771net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq+1;
th2772net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq+1;
th2773net/ipv4/tcp.cnewsk->fin_seq = skb->h.th->seq;
th2790net/ipv4/tcp.cnewsk->dummy_th.source = skb->h.th->dest;
th2791net/ipv4/tcp.cnewsk->dummy_th.dest = skb->h.th->source;
th2810net/ipv4/tcp.cnewsk->acked_seq = skb->h.th->seq + 1;
th2811net/ipv4/tcp.cnewsk->copied_seq = skb->h.th->seq + 1;
th2862net/ipv4/tcp.ctcp_options(newsk,skb->h.th);
th2909net/ipv4/tcp.cmemcpy(t1, skb->h.th, sizeof(*t1));
th2914net/ipv4/tcp.ct1->dest = skb->h.th->source;
th2927net/ipv4/tcp.ct1->ack_seq = ntohl(skb->h.th->seq+1);
th3075net/ipv4/tcp.cstruct tcphdr *th;
th3086net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th3087net/ipv4/tcp.csize = skb->len - (((unsigned char *) th) - skb->data);
th3089net/ipv4/tcp.cth->ack_seq = ntohl(sk->acked_seq);
th3090net/ipv4/tcp.cth->window = ntohs(tcp_select_window(sk));
th3092net/ipv4/tcp.ctcp_send_check(th, sk->saddr, sk->daddr, size, sk);
th3116net/ipv4/tcp.cextern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
th3135net/ipv4/tcp.cack = ntohl(th->ack_seq);
th3137net/ipv4/tcp.cif (ntohs(th->window) > sk->max_window) 
th3139net/ipv4/tcp.csk->max_window = ntohs(th->window);
th3192net/ipv4/tcp.cif (len != th->doff*4) 
th3199net/ipv4/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) 
th3223net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3279net/ipv4/tcp.csk->window_seq = ack + ntohs(th->window);
th3645net/ipv4/tcp.ctcp_options(sk,th);
th3646net/ipv4/tcp.csk->dummy_th.dest=th->source;
th3719net/ipv4/tcp.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th3721net/ipv4/tcp.csk->fin_seq = th->seq + skb->len + th->syn + th->fin;
th3739net/ipv4/tcp.cif (th->rst)
th3810net/ipv4/tcp.cstruct tcphdr *th;
th3814net/ipv4/tcp.cth = skb->h.th;
th3815net/ipv4/tcp.cskb_pull(skb,th->doff*4);
th3816net/ipv4/tcp.cskb_trim(skb,len-(th->doff*4));
th3825net/ipv4/tcp.cif (skb->len == 0 && !th->fin) 
th3831net/ipv4/tcp.cif (!th->ack)
th3832net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th3855net/ipv4/tcp.cnew_seq= th->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th3877net/ipv4/tcp.csk->acked_seq = new_seq + th->fin;
th3878net/ipv4/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
th3917net/ipv4/tcp.cprintk("skb1->h.th->seq = %d: ", skb1->h.th->seq);
th3918net/ipv4/tcp.cprintk("skb->h.th->seq = %d\n",skb->h.th->seq);
th3931net/ipv4/tcp.cif (th->seq==skb1->h.th->seq && skb->len>= skb1->len)
th3945net/ipv4/tcp.cif (after(th->seq+1, skb1->h.th->seq))
th3966net/ipv4/tcp.cth->ack_seq = th->seq + skb->len;
th3967net/ipv4/tcp.cif (th->syn) 
th3968net/ipv4/tcp.cth->ack_seq++;
th3969net/ipv4/tcp.cif (th->fin)
th3970net/ipv4/tcp.cth->ack_seq++;
th3984net/ipv4/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) 
th3986net/ipv4/tcp.cif (before(th->seq, sk->acked_seq+1)) 
th3990net/ipv4/tcp.cif (after(th->ack_seq, sk->acked_seq)) 
th3992net/ipv4/tcp.cnewwindow = sk->window-(th->ack_seq - sk->acked_seq);
th3996net/ipv4/tcp.csk->acked_seq = th->ack_seq;
th4005net/ipv4/tcp.cif (skb->h.th->fin) 
th4007net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4014net/ipv4/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) 
th4016net/ipv4/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
th4019net/ipv4/tcp.c(skb2->h.th->ack_seq - sk->acked_seq);
th4023net/ipv4/tcp.csk->acked_seq = skb2->h.th->ack_seq;
th4030net/ipv4/tcp.cif (skb2->h.th->fin) 
th4032net/ipv4/tcp.ctcp_fin(skb,sk,skb->h.th);
th4053net/ipv4/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
th4102net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4108net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4133net/ipv4/tcp.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th4135net/ipv4/tcp.cu32 ptr = ntohs(th->urg_ptr);
th4139net/ipv4/tcp.cptr += th->seq;
th4165net/ipv4/tcp.cextern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th,
th4174net/ipv4/tcp.cif (th->urg)
th4175net/ipv4/tcp.ctcp_check_urg(sk,th);
th4188net/ipv4/tcp.cptr = sk->urg_seq - th->seq + th->doff*4;
th4196net/ipv4/tcp.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th4425net/ipv4/tcp.cextern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th4430net/ipv4/tcp.cnext_seq = len - 4*th->doff;
th4431net/ipv4/tcp.cif (th->fin)
th4436net/ipv4/tcp.cnext_seq += th->seq;
th4449net/ipv4/tcp.cif (!before(th->seq, sk->acked_seq + sk->window + 1))
th4456net/ipv4/tcp.cif (th->rst)
th4468net/ipv4/tcp.ctcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th4473net/ipv4/tcp.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th4518net/ipv4/tcp.cstruct tcphdr *th;
th4529net/ipv4/tcp.cth = skb->h.th;
th4535net/ipv4/tcp.cif(saddr==th_cache_saddr && daddr==th_cache_daddr && th->dest==th_cache_dport && th->source==th_cache_sport)
th4539net/ipv4/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th4542net/ipv4/tcp.cth_cache_dport=th->dest;
th4543net/ipv4/tcp.cth_cache_sport=th->source;
th4569net/ipv4/tcp.c(skb->ip_summed && tcp_check(th, len, saddr, daddr, skb->csum ))||
th4570net/ipv4/tcp.c(!skb->ip_summed && tcp_check(th, len, saddr, daddr, csum_partial((char *)th, len, 0)))
th4581net/ipv4/tcp.cth->seq = ntohl(th->seq);
th4589net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4620net/ipv4/tcp.ctcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th4665net/ipv4/tcp.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th4666net/ipv4/tcp.ctcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th4675net/ipv4/tcp.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th4702net/ipv4/tcp.cif (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq)
th4717net/ipv4/tcp.cif(th->ack)
th4720net/ipv4/tcp.cif(!tcp_ack(sk,th,saddr,len))
th4725net/ipv4/tcp.ctcp_reset(daddr, saddr, th,
th4731net/ipv4/tcp.cif(th->rst)
th4733net/ipv4/tcp.cif(!th->syn)
th4746net/ipv4/tcp.csk->acked_seq=th->seq+1;
th4747net/ipv4/tcp.csk->fin_seq=th->seq;
th4748net/ipv4/tcp.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th4750net/ipv4/tcp.ctcp_options(sk,th);
th4751net/ipv4/tcp.csk->dummy_th.dest=th->source;
th4767net/ipv4/tcp.cif(th->syn && !th->rst)
th4772net/ipv4/tcp.csk->dummy_th.source==th->source &&
th4773net/ipv4/tcp.csk->dummy_th.dest==th->dest)
th4804net/ipv4/tcp.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th4805net/ipv4/tcp.cafter(th->seq, sk->acked_seq) && !th->rst)
th4817net/ipv4/tcp.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th4839net/ipv4/tcp.cif(!tcp_sequence(sk,th,len,opt,saddr,dev))
th4846net/ipv4/tcp.cif(th->rst)
th4853net/ipv4/tcp.cif(th->syn && !syn_ok)
th4855net/ipv4/tcp.ctcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th4864net/ipv4/tcp.cif(th->ack && !tcp_ack(sk,th,saddr,len))
th4872net/ipv4/tcp.ctcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th4885net/ipv4/tcp.cif(tcp_urg(sk, th, saddr, len))
th4952net/ipv4/tcp.cstruct tcphdr *th;
th4968net/ipv4/tcp.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th4974net/ipv4/tcp.cbuff = sk->prot->wmalloc(sk, win_size + th->doff * 4 + 
th5010net/ipv4/tcp.cnth = (struct tcphdr *) skb_put(buff,th->doff*4);
th5012net/ipv4/tcp.cmemcpy(nth, th, th->doff * 4);
th5028net/ipv4/tcp.c(iph->ihl << 2) + th->doff * 4;
th5047net/ipv4/tcp.cth->check = 0;
th5054net/ipv4/tcp.cth->seq = htonl(sk->sent_seq);
th5055net/ipv4/tcp.cif (th->urg)
th5059net/ipv4/tcp.curg_ptr = ntohs(th->urg_ptr);
th5061net/ipv4/tcp.cth->urg = 0;
th5065net/ipv4/tcp.cth->urg_ptr = htons(urg_ptr);
th5070net/ipv4/tcp.cif(th->urg && ntohs(th->urg_ptr) < win_size)
th129net/ipv4/udp.cstruct udphdr *th;
th139net/ipv4/udp.cth = (struct udphdr *)header;  
th141net/ipv4/udp.csk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr);