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);
th516net/ipv4/tcp.cstruct tcphdr *th = (struct tcphdr *)header;
th525net/ipv4/tcp.cth =(struct tcphdr *)header;
th526net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th633net/ipv4/tcp.cif (skb->h.th->syn)
th638net/ipv4/tcp.cif (skb->h.th->syn) 
th658net/ipv4/tcp.cif (skb->h.th->urg)
th660net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th806net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th812net/ipv4/tcp.cth->check = 0;
th813net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th814net/ipv4/tcp.ccsum_partial((char *)th,sizeof(*th),skb->csum));
th817net/ipv4/tcp.ccheck = th->check;
th818net/ipv4/tcp.cth->check = 0;
th819net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th820net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th821net/ipv4/tcp.cif (check != th->check) {
th824net/ipv4/tcp.cprintk("Checksum %x (%x) from %p\n", th->check, check,
th825net/ipv4/tcp.c(&th)[-1]);
th826net/ipv4/tcp.cprintk("TCP=<off:%d a:%d s:%d f:%d>\n", th->doff*4, th->ack, th->syn, th->fin);
th837net/ipv4/tcp.cextern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th840net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th841net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th842net/ipv4/tcp.cth->psh =(push == 0) ? 1 : 0;
th846net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th848net/ipv4/tcp.cth->window = htons(sk->window);
th850net/ipv4/tcp.creturn(sizeof(*th));
th1002net/ipv4/tcp.ctcp_size = skb->tail - (unsigned char *)(skb->h.th + 1);
th1109net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1110net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
th1121net/ipv4/tcp.cskb->h.th->urg = 1;
th1122net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th1494net/ipv4/tcp.cif (skb->h.th->syn)
th1498net/ipv4/tcp.cif (skb->h.th->fin)
th1605net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th1606net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th1627net/ipv4/tcp.cif (skb->h.th->fin)
th154net/ipv4/tcp_input.cstatic void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th157net/ipv4/tcp_input.cif (th->rst)
th169net/ipv4/tcp_input.ctcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th182net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th251net/ipv4/tcp_input.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th254net/ipv4/tcp_input.cint length=(th->doff*4)-sizeof(struct tcphdr);
th257net/ipv4/tcp_input.cptr = (unsigned char *)(th + 1);
th278net/ipv4/tcp_input.cif(opsize==4 && th->syn)
th290net/ipv4/tcp_input.cif (th->syn) 
th316net/ipv4/tcp_input.cstruct tcphdr *th;
th319net/ipv4/tcp_input.cth = skb->h.th;
th330net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th439net/ipv4/tcp_input.cnewsk->dummy_th.source = skb->h.th->dest;
th440net/ipv4/tcp_input.cnewsk->dummy_th.dest = skb->h.th->source;
th509net/ipv4/tcp_input.ctcp_options(newsk,skb->h.th);
th588net/ipv4/tcp_input.cstatic int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
th623net/ipv4/tcp_input.cif (len != th->doff*4) 
th629net/ipv4/tcp_input.cwindow_seq = ntohs(th->window);
th1004net/ipv4/tcp_input.ctcp_options(sk,th);
th1005net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1102net/ipv4/tcp_input.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th1122net/ipv4/tcp_input.cif (th->rst)
th1193net/ipv4/tcp_input.cstruct tcphdr *th;
th1197net/ipv4/tcp_input.cth = skb->h.th;
th1198net/ipv4/tcp_input.cskb_pull(skb,th->doff*4);
th1199net/ipv4/tcp_input.cskb_trim(skb,len-(th->doff*4));
th1208net/ipv4/tcp_input.cif (skb->len == 0 && !th->fin) 
th1214net/ipv4/tcp_input.cif (!th->ack)
th1215net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th1238net/ipv4/tcp_input.cnew_seq = skb->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th1260net/ipv4/tcp_input.csk->acked_seq = new_seq + th->fin;
th1261net/ipv4/tcp_input.ctcp_send_reset(sk->saddr, sk->daddr, skb->h.th,
th1377net/ipv4/tcp_input.cif (skb->h.th->fin) 
th1379net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1396net/ipv4/tcp_input.cif (skb2->h.th->fin) 
th1398net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1424net/ipv4/tcp_input.csk->bytes_rcv > sk->max_unacked || th->fin ||
th1476net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th1482net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th1507net/ipv4/tcp_input.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th1509net/ipv4/tcp_input.cu32 ptr = ntohs(th->urg_ptr);
th1513net/ipv4/tcp_input.cptr += ntohl(th->seq);
th1539net/ipv4/tcp_input.cstatic inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len)
th1545net/ipv4/tcp_input.cif (th->urg)
th1546net/ipv4/tcp_input.ctcp_check_urg(sk,th);
th1558net/ipv4/tcp_input.cptr = sk->urg_seq - ntohl(th->seq) + th->doff*4;
th1560net/ipv4/tcp_input.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th1577net/ipv4/tcp_input.cstruct tcphdr *th;
th1587net/ipv4/tcp_input.cth = skb->h.th;
th1606net/ipv4/tcp_input.cskb->csum = csum_partial((char *)th, len, 0);
th1608net/ipv4/tcp_input.cif (tcp_check(th, len, saddr, daddr, skb->csum))
th1613net/ipv4/tcp_input.csk = get_tcp_sock(saddr, th->source, daddr, th->dest);
th1617net/ipv4/tcp_input.cskb->seq = ntohl(th->seq);
th1618net/ipv4/tcp_input.cskb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4;
th1619net/ipv4/tcp_input.cskb->ack_seq = ntohl(th->ack_seq);
th1681net/ipv4/tcp_input.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th1682net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th1691net/ipv4/tcp_input.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th1722net/ipv4/tcp_input.cif (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq)
th1737net/ipv4/tcp_input.cif(th->ack)
th1740net/ipv4/tcp_input.cif(!tcp_ack(sk,th,skb->ack_seq,len))
th1745net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1750net/ipv4/tcp_input.cif(th->rst)
th1752net/ipv4/tcp_input.cif(!th->syn)
th1757net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1770net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th1772net/ipv4/tcp_input.ctcp_options(sk,th);
th1773net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1789net/ipv4/tcp_input.cif(th->syn && !th->rst)
th1794net/ipv4/tcp_input.csk->dummy_th.source==th->source &&
th1795net/ipv4/tcp_input.csk->dummy_th.dest==th->dest)
th1830net/ipv4/tcp_input.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th1831net/ipv4/tcp_input.cafter(skb->seq, sk->acked_seq) && !th->rst)
th1842net/ipv4/tcp_input.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th1863net/ipv4/tcp_input.cif (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
th1865net/ipv4/tcp_input.cbad_tcp_sequence(sk, th, len, opt, saddr, dev);
th1870net/ipv4/tcp_input.cif(th->rst)
th1877net/ipv4/tcp_input.cif(th->syn && !syn_ok)
th1879net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th1890net/ipv4/tcp_input.cif(th->ack && !tcp_ack(sk,th,skb->ack_seq,len))
th1898net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th1923net/ipv4/tcp_input.ctcp_urg(sk, th, len);
th1942net/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));
th710net/ipv4/tcp_output.cmemcpy(t1, skb->h.th, sizeof(*t1));
th716net/ipv4/tcp_output.ct1->dest = skb->h.th->source;
th757net/ipv4/tcp_output.cstruct tcphdr *th, u32 daddr)
th818net/ipv4/tcp_output.ct1->dest = th->source;
th819net/ipv4/tcp_output.ct1->source = th->dest;
th895net/ipv4/tcp_output.cstruct tcphdr *th;
th913net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th919net/ipv4/tcp_output.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th955net/ipv4/tcp_output.cnth = (struct tcphdr *) skb_put(buff,sizeof(*th));
th957net/ipv4/tcp_output.cmemcpy(nth, th, sizeof(*th));
th972net/ipv4/tcp_output.cbuff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
th973net/ipv4/tcp_output.cwin_size + th->doff*4 - sizeof(*th), 0);
th981net/ipv4/tcp_output.cif(th->urg && ntohs(th->urg_ptr) < win_size)