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)
th63include/linux/skbuff.hstruct tcphdr  *th;
th14include/net/arp.hunsigned char *dest_hw, unsigned char *src_hw, unsigned char *th);
th142include/net/tcp.hextern void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th155include/net/tcp.hextern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th278include/net/tcp.hstatic __inline__ u16 tcp_check(struct tcphdr *th, int len,
th493net/ipv4/ip_masq.cstruct tcphdr *th;
th494net/ipv4/ip_masq.cth = (struct tcphdr *)portptr;
th499net/ipv4/ip_masq.cif (ms->flags & IP_MASQ_F_SAW_FIN || th->fin)
th506net/ipv4/ip_masq.cskb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0);
th507net/ipv4/ip_masq.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb);
th225net/ipv4/ip_masq_app.cstatic __inline__ void masq_fix_seq(const struct ip_masq_seq *ms_seq, struct tcphdr *th)
th229net/ipv4/ip_masq_app.cseq = ntohl(th->seq);
th239net/ipv4/ip_masq_app.cth->seq = htonl(seq + ms_seq->delta);
th244net/ipv4/ip_masq_app.cth->seq = htonl(seq + ms_seq->previous_delta);
th258net/ipv4/ip_masq_app.cstatic __inline__ void masq_fix_ack_seq(const struct ip_masq_seq *ms_seq, struct tcphdr *th)
th262net/ipv4/ip_masq_app.cack_seq=ntohl(th->ack_seq);
th272net/ipv4/ip_masq_app.cth->ack_seq = htonl(ack_seq-ms_seq->delta);
th277net/ipv4/ip_masq_app.cth->ack_seq = htonl(ack_seq-ms_seq->previous_delta);
th314net/ipv4/ip_masq_app.cstruct tcphdr *th;
th329net/ipv4/ip_masq_app.cth = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th335net/ipv4/ip_masq_app.cseq = ntohl(th->seq);
th343net/ipv4/ip_masq_app.cmasq_fix_seq(&ms->out_seq, th);
th345net/ipv4/ip_masq_app.cmasq_fix_ack_seq(&ms->in_seq, th);
th377net/ipv4/ip_masq_app.cstruct tcphdr *th;
th392net/ipv4/ip_masq_app.cth = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th398net/ipv4/ip_masq_app.cseq = ntohl(th->seq);
th406net/ipv4/ip_masq_app.cmasq_fix_seq(&ms->in_seq, th);
th408net/ipv4/ip_masq_app.cmasq_fix_ack_seq(&ms->out_seq, th);
th55net/ipv4/ip_masq_ftp.cstruct tcphdr *th;
th67net/ipv4/ip_masq_ftp.cth = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th68net/ipv4/ip_masq_ftp.cdata = (char *)&th[1];
th56net/ipv4/ip_masq_irc.cstruct tcphdr *th;
th69net/ipv4/ip_masq_irc.cth = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]);
th70net/ipv4/ip_masq_irc.cdata = (char *)&th[1];
th527net/ipv4/tcp.cstruct tcphdr *th = (struct tcphdr *)header;
th536net/ipv4/tcp.cth =(struct tcphdr *)header;
th537net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th644net/ipv4/tcp.cif (skb->h.th->syn)
th649net/ipv4/tcp.cif (skb->h.th->syn)
th669net/ipv4/tcp.cif (skb->h.th->urg)
th671net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th817net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr,
th823net/ipv4/tcp.cth->check = 0;
th824net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th825net/ipv4/tcp.ccsum_partial((char *)th,sizeof(*th),skb->csum));
th828net/ipv4/tcp.ccheck = th->check;
th829net/ipv4/tcp.cth->check = 0;
th830net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th831net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th832net/ipv4/tcp.cif (check != th->check) {
th835net/ipv4/tcp.cprintk("Checksum %x (%x) from %p\n", th->check, check,
th836net/ipv4/tcp.c(&th)[-1]);
th837net/ipv4/tcp.cprintk("TCP=<off:%d a:%d s:%d f:%d>\n", th->doff*4, th->ack, th->syn, th->fin);
th848net/ipv4/tcp.cstatic inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th850net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th851net/ipv4/tcp.cth->psh = (push == 0) ? 1 : 0;
th852net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th853net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th854net/ipv4/tcp.cth->window = htons(tcp_select_window(sk));
th856net/ipv4/tcp.creturn(sizeof(*th));
th1008net/ipv4/tcp.ctcp_size = skb->tail - (unsigned char *)(skb->h.th + 1);
th1120net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1121net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
th1132net/ipv4/tcp.cskb->h.th->urg = 1;
th1133net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th1417net/ipv4/tcp.cif (skb->h.th->syn)
th1421net/ipv4/tcp.cif (skb->h.th->fin)
th1522net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th1523net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th1544net/ipv4/tcp.cif (skb->h.th->fin)
th157net/ipv4/tcp_input.cstatic void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, u32 end_seq,
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);
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);
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)
th627net/ipv4/tcp_input.cif (len != th->doff*4) 
th633net/ipv4/tcp_input.cwindow_seq = ntohs(th->window);
th1005net/ipv4/tcp_input.ctcp_options(sk,th);
th1006net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1104net/ipv4/tcp_input.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th1124net/ipv4/tcp_input.cif (th->rst)
th1218net/ipv4/tcp_input.cif (skb->h.th->fin)
th1219net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1223net/ipv4/tcp_input.cstatic void tcp_queue(struct sk_buff * skb, struct sock * sk, struct tcphdr *th)
th1275net/ipv4/tcp_input.cif (!sk->delay_acks || th->fin) {
th1284net/ipv4/tcp_input.cif (th->psh)
th1337net/ipv4/tcp_input.cstruct tcphdr *th;
th1340net/ipv4/tcp_input.cth = skb->h.th;
th1341net/ipv4/tcp_input.cskb_pull(skb,th->doff*4);
th1342net/ipv4/tcp_input.cskb_trim(skb,len-(th->doff*4));
th1351net/ipv4/tcp_input.cif (skb->len == 0 && !th->fin) 
th1357net/ipv4/tcp_input.cif (!th->ack)
th1381net/ipv4/tcp_input.cnew_seq = skb->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th1403net/ipv4/tcp_input.csk->acked_seq = new_seq + th->fin;
th1404net/ipv4/tcp_input.ctcp_send_reset(sk->saddr, sk->daddr, skb->h.th,
th1420net/ipv4/tcp_input.ctcp_queue(skb, sk, th);
th1434net/ipv4/tcp_input.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th1436net/ipv4/tcp_input.cu32 ptr = ntohs(th->urg_ptr);
th1440net/ipv4/tcp_input.cptr += ntohl(th->seq);
th1466net/ipv4/tcp_input.cstatic inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len)
th1472net/ipv4/tcp_input.cif (th->urg)
th1473net/ipv4/tcp_input.ctcp_check_urg(sk,th);
th1485net/ipv4/tcp_input.cptr = sk->urg_seq - ntohl(th->seq) + th->doff*4;
th1487net/ipv4/tcp_input.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th1557net/ipv4/tcp_input.cstruct tcphdr *th;
th1567net/ipv4/tcp_input.cth = skb->h.th;
th1586net/ipv4/tcp_input.cskb->csum = csum_partial((char *)th, len, 0);
th1588net/ipv4/tcp_input.cif (tcp_check(th, len, saddr, daddr, skb->csum))
th1593net/ipv4/tcp_input.csk = get_tcp_sock(saddr, th->source, daddr, th->dest);
th1597net/ipv4/tcp_input.cskb->seq = ntohl(th->seq);
th1598net/ipv4/tcp_input.cskb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4;
th1599net/ipv4/tcp_input.cskb->ack_seq = ntohl(th->ack_seq);
th1663net/ipv4/tcp_input.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th1664net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th1673net/ipv4/tcp_input.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th1704net/ipv4/tcp_input.cif (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq)
th1719net/ipv4/tcp_input.cif(th->ack)
th1722net/ipv4/tcp_input.cif(!tcp_ack(sk,th,skb->ack_seq,len))
th1727net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1732net/ipv4/tcp_input.cif(th->rst)
th1734net/ipv4/tcp_input.cif(!th->syn)
th1739net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1754net/ipv4/tcp_input.ctcp_options(sk,th);
th1755net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1771net/ipv4/tcp_input.cif(th->syn && !th->rst)
th1776net/ipv4/tcp_input.csk->dummy_th.source==th->source &&
th1777net/ipv4/tcp_input.csk->dummy_th.dest==th->dest)
th1812net/ipv4/tcp_input.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th1813net/ipv4/tcp_input.cafter(skb->seq, sk->acked_seq) && !th->rst)
th1824net/ipv4/tcp_input.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th1845net/ipv4/tcp_input.cif (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
th1847net/ipv4/tcp_input.cbad_tcp_sequence(sk, th, skb->end_seq-th->syn, dev);
th1852net/ipv4/tcp_input.cif(th->rst)
th1859net/ipv4/tcp_input.cif(th->syn && !syn_ok)
th1861net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th1872net/ipv4/tcp_input.cif(th->ack && !tcp_ack(sk,th,skb->ack_seq,len))
th1880net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th1898net/ipv4/tcp_input.ctcp_urg(sk, th, len);
th1924net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th47net/ipv4/tcp_output.cstruct tcphdr * th = skb->h.th;
th53net/ipv4/tcp_output.csize = skb->len - ((unsigned char *) th - skb->data);
th62net/ipv4/tcp_output.cskb, skb->data, th, skb->len);
th75net/ipv4/tcp_output.cif(!th->syn && !th->fin) 
th88net/ipv4/tcp_output.cskb->seq = ntohl(th->seq);
th89net/ipv4/tcp_output.cskb->end_seq = skb->seq + size - 4*th->doff;
th105net/ipv4/tcp_output.cth->check = 0;
th123net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th124net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th126net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th269net/ipv4/tcp_output.cstruct tcphdr *th;
th280net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th281net/ipv4/tcp_output.csize = skb->len - (((unsigned char *) th) - skb->data);
th290net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th291net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th293net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th333net/ipv4/tcp_output.cstruct tcphdr *th;
th370net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th438net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th440net/ipv4/tcp_output.cth->window = ntohs(tcp_select_window(sk));
th441net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th499net/ipv4/tcp_output.cvoid tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th511net/ipv4/tcp_output.cif(th->rst)
th548net/ipv4/tcp_output.ct1->dest = th->source;
th549net/ipv4/tcp_output.ct1->source = th->dest;
th553net/ipv4/tcp_output.cif(th->ack)
th555net/ipv4/tcp_output.ct1->seq = th->ack_seq;
th560net/ipv4/tcp_output.cif(!th->syn)
th561net/ipv4/tcp_output.ct1->ack_seq = th->seq;
th563net/ipv4/tcp_output.ct1->ack_seq = htonl(ntohl(th->seq)+1);
th578net/ipv4/tcp_output.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th634net/ipv4/tcp_output.cmemcpy(t1, th, sizeof(*t1));
th714net/ipv4/tcp_output.cmemcpy(t1, skb->h.th, sizeof(*t1));
th720net/ipv4/tcp_output.ct1->dest = skb->h.th->source;
th917net/ipv4/tcp_output.cstruct tcphdr *th;
th935net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th941net/ipv4/tcp_output.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th977net/ipv4/tcp_output.cnth = (struct tcphdr *) skb_put(buff,sizeof(*th));
th979net/ipv4/tcp_output.cmemcpy(nth, th, sizeof(*th));
th994net/ipv4/tcp_output.cbuff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
th995net/ipv4/tcp_output.cwin_size + th->doff*4 - sizeof(*th), 0);
th1003net/ipv4/tcp_output.cif(th->urg && ntohs(th->urg_ptr) < win_size)