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)
th61include/linux/skbuff.hstruct tcphdr  *th;
th14include/net/arp.hunsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
th134include/net/tcp.hextern void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th145include/net/tcp.hextern void tcp_send_ack(u32, u32, struct sock *sk, struct tcphdr *th, u32);
th146include/net/tcp.hextern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th280include/net/tcp.hstatic __inline__ u16 tcp_check(struct tcphdr *th, int len,
th616net/ipv4/ip_fw.cstruct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th618net/ipv4/ip_fw.cchar *p, *data = (char *)&th[1];
th635net/ipv4/ip_fw.cseq=ntohl(th->seq);
th640net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->delta);
th647net/ipv4/ip_fw.cth->seq = htonl(seq + ftp->previous_delta);
th887net/ipv4/ip_fw.cstruct tcphdr *th;
th896net/ipv4/ip_fw.cth = (struct tcphdr *)portptr;
th901net/ipv4/ip_fw.cif (ms->sawfin || th->fin) 
th908net/ipv4/ip_fw.cskb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0);
th909net/ipv4/ip_fw.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb);
th933net/ipv4/ip_fw.cstruct tcphdr   *th = (struct tcphdr *)(skb->h.raw+(iph->ihl<<2));
th994net/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)));
th996net/ipv4/ip_fw.cack_seq=ntohl(th->ack_seq);
th1001net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->delta);
th1008net/ipv4/ip_fw.cth->ack_seq = htonl(ack_seq-ms->previous_delta);
th515net/ipv4/tcp.cstruct tcphdr *th = (struct tcphdr *)header;
th524net/ipv4/tcp.cth =(struct tcphdr *)header;
th525net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th632net/ipv4/tcp.cif (skb->h.th->syn)
th637net/ipv4/tcp.cif (skb->h.th->syn) 
th657net/ipv4/tcp.cif (skb->h.th->urg)
th659net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th805net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th811net/ipv4/tcp.cth->check = 0;
th812net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th813net/ipv4/tcp.ccsum_partial((char *)th,sizeof(*th),skb->csum));
th816net/ipv4/tcp.ccheck = th->check;
th817net/ipv4/tcp.cth->check = 0;
th818net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th819net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th820net/ipv4/tcp.cif (check != th->check) {
th823net/ipv4/tcp.cprintk("Checksum %x (%x) from %p\n", th->check, check,
th824net/ipv4/tcp.c(&th)[-1]);
th825net/ipv4/tcp.cprintk("TCP=<off:%d a:%d s:%d f:%d>\n", th->doff*4, th->ack, th->syn, th->fin);
th836net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th839net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th840net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th841net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th845net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th847net/ipv4/tcp.cth->window = htons(sk->window);
th849net/ipv4/tcp.creturn(sizeof(*th));
th1001net/ipv4/tcp.ctcp_size = skb->tail - (unsigned char *)(skb->h.th + 1);
th1108net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1109net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
th1120net/ipv4/tcp.cskb->h.th->urg = 1;
th1121net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th1493net/ipv4/tcp.cif (skb->h.th->syn)
th1497net/ipv4/tcp.cif (skb->h.th->fin)
th1604net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th1605net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th1626net/ipv4/tcp.cif (skb->h.th->fin)
th157net/ipv4/tcp_input.cstatic void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th160net/ipv4/tcp_input.cif (th->rst)
th172net/ipv4/tcp_input.ctcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th185net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th254net/ipv4/tcp_input.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th257net/ipv4/tcp_input.cint length=(th->doff*4)-sizeof(struct tcphdr);
th260net/ipv4/tcp_input.cptr = (unsigned char *)(th + 1);
th281net/ipv4/tcp_input.cif(opsize==4 && th->syn)
th293net/ipv4/tcp_input.cif (th->syn) 
th319net/ipv4/tcp_input.cstruct tcphdr *th;
th322net/ipv4/tcp_input.cth = skb->h.th;
th333net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th442net/ipv4/tcp_input.cnewsk->dummy_th.source = skb->h.th->dest;
th443net/ipv4/tcp_input.cnewsk->dummy_th.dest = skb->h.th->source;
th512net/ipv4/tcp_input.ctcp_options(newsk,skb->h.th);
th591net/ipv4/tcp_input.cstatic int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
th626net/ipv4/tcp_input.cif (len != th->doff*4) 
th632net/ipv4/tcp_input.cwindow_seq = ntohs(th->window);
th1007net/ipv4/tcp_input.ctcp_options(sk,th);
th1008net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1105net/ipv4/tcp_input.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th1125net/ipv4/tcp_input.cif (th->rst)
th1196net/ipv4/tcp_input.cstruct tcphdr *th;
th1200net/ipv4/tcp_input.cth = skb->h.th;
th1201net/ipv4/tcp_input.cskb_pull(skb,th->doff*4);
th1202net/ipv4/tcp_input.cskb_trim(skb,len-(th->doff*4));
th1211net/ipv4/tcp_input.cif (skb->len == 0 && !th->fin) 
th1217net/ipv4/tcp_input.cif (!th->ack)
th1218net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th1241net/ipv4/tcp_input.cnew_seq = skb->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th1263net/ipv4/tcp_input.csk->acked_seq = new_seq + th->fin;
th1264net/ipv4/tcp_input.ctcp_send_reset(sk->saddr, sk->daddr, skb->h.th,
th1380net/ipv4/tcp_input.cif (skb->h.th->fin) 
th1382net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1399net/ipv4/tcp_input.cif (skb2->h.th->fin) 
th1401net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1427net/ipv4/tcp_input.csk->bytes_rcv > sk->max_unacked || th->fin ||
th1430net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk,th, saddr);
th1481net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th1508net/ipv4/tcp_input.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th1510net/ipv4/tcp_input.cu32 ptr = ntohs(th->urg_ptr);
th1514net/ipv4/tcp_input.cptr += ntohl(th->seq);
th1540net/ipv4/tcp_input.cstatic inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len)
th1546net/ipv4/tcp_input.cif (th->urg)
th1547net/ipv4/tcp_input.ctcp_check_urg(sk,th);
th1559net/ipv4/tcp_input.cptr = sk->urg_seq - ntohl(th->seq) + th->doff*4;
th1561net/ipv4/tcp_input.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th1578net/ipv4/tcp_input.cstruct tcphdr *th;
th1588net/ipv4/tcp_input.cth = skb->h.th;
th1607net/ipv4/tcp_input.cskb->csum = csum_partial((char *)th, len, 0);
th1609net/ipv4/tcp_input.cif (tcp_check(th, len, saddr, daddr, skb->csum))
th1614net/ipv4/tcp_input.csk = get_tcp_sock(saddr, th->source, daddr, th->dest);
th1618net/ipv4/tcp_input.cskb->seq = ntohl(th->seq);
th1619net/ipv4/tcp_input.cskb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4;
th1620net/ipv4/tcp_input.cskb->ack_seq = ntohl(th->ack_seq);
th1682net/ipv4/tcp_input.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th1683net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th1692net/ipv4/tcp_input.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th1723net/ipv4/tcp_input.cif (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq)
th1738net/ipv4/tcp_input.cif(th->ack)
th1741net/ipv4/tcp_input.cif(!tcp_ack(sk,th,skb->ack_seq,len))
th1746net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1751net/ipv4/tcp_input.cif(th->rst)
th1753net/ipv4/tcp_input.cif(!th->syn)
th1758net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1771net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th1773net/ipv4/tcp_input.ctcp_options(sk,th);
th1774net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1790net/ipv4/tcp_input.cif(th->syn && !th->rst)
th1795net/ipv4/tcp_input.csk->dummy_th.source==th->source &&
th1796net/ipv4/tcp_input.csk->dummy_th.dest==th->dest)
th1831net/ipv4/tcp_input.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th1832net/ipv4/tcp_input.cafter(skb->seq, sk->acked_seq) && !th->rst)
th1843net/ipv4/tcp_input.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th1864net/ipv4/tcp_input.cif (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
th1866net/ipv4/tcp_input.cbad_tcp_sequence(sk, th, len, opt, saddr, dev);
th1871net/ipv4/tcp_input.cif(th->rst)
th1878net/ipv4/tcp_input.cif(th->syn && !syn_ok)
th1880net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th1891net/ipv4/tcp_input.cif(th->ack && !tcp_ack(sk,th,skb->ack_seq,len))
th1899net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th1924net/ipv4/tcp_input.ctcp_urg(sk, th, len);
th1943net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th34net/ipv4/tcp_output.cstruct tcphdr * th = skb->h.th;
th40net/ipv4/tcp_output.csize = skb->len - ((unsigned char *) th - skb->data);
th49net/ipv4/tcp_output.cskb, skb->data, th, skb->len);
th62net/ipv4/tcp_output.cif(!th->syn && !th->fin) 
th75net/ipv4/tcp_output.cskb->seq = ntohl(th->seq);
th76net/ipv4/tcp_output.cskb->end_seq = skb->seq + size - 4*th->doff;
th92net/ipv4/tcp_output.cth->check = 0;
th110net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th111net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th113net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th260net/ipv4/tcp_output.cstruct tcphdr *th;
th271net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th272net/ipv4/tcp_output.csize = skb->len - (((unsigned char *) th) - skb->data);
th281net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th282net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th284net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th326net/ipv4/tcp_output.cstruct tcphdr *th;
th363net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th431net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th434net/ipv4/tcp_output.cth->window = ntohs(tcp_select_window(sk));
th435net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th492net/ipv4/tcp_output.cvoid tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th504net/ipv4/tcp_output.cif(th->rst)
th541net/ipv4/tcp_output.ct1->dest = th->source;
th542net/ipv4/tcp_output.ct1->source = th->dest;
th546net/ipv4/tcp_output.cif(th->ack)
th548net/ipv4/tcp_output.ct1->seq = th->ack_seq;
th553net/ipv4/tcp_output.cif(!th->syn)
th554net/ipv4/tcp_output.ct1->ack_seq = th->seq;
th556net/ipv4/tcp_output.ct1->ack_seq = htonl(ntohl(th->seq)+1);
th571net/ipv4/tcp_output.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th627net/ipv4/tcp_output.cmemcpy(t1, th, sizeof(*t1));
th707net/ipv4/tcp_output.cmemcpy(t1, skb->h.th, sizeof(*t1));
th713net/ipv4/tcp_output.ct1->dest = skb->h.th->source;
th754net/ipv4/tcp_output.cstruct tcphdr *th, u32 daddr)
th815net/ipv4/tcp_output.ct1->dest = th->source;
th816net/ipv4/tcp_output.ct1->source = th->dest;
th892net/ipv4/tcp_output.cstruct tcphdr *th;
th910net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th916net/ipv4/tcp_output.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th952net/ipv4/tcp_output.cnth = (struct tcphdr *) skb_put(buff,sizeof(*th));
th954net/ipv4/tcp_output.cmemcpy(nth, th, sizeof(*th));
th969net/ipv4/tcp_output.cbuff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
th970net/ipv4/tcp_output.cwin_size + th->doff*4 - sizeof(*th), 0);
th978net/ipv4/tcp_output.cif(th->urg && ntohs(th->urg_ptr) < win_size)