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);
th146include/net/tcp.hextern void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th159include/net/tcp.hextern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th240include/net/tcp.hstatic __inline__ u16 tcp_check(struct tcphdr *th, int len,
th510net/ipv4/ip_masq.cstruct tcphdr *th;
th511net/ipv4/ip_masq.cth = (struct tcphdr *)portptr;
th517net/ipv4/ip_masq.cif (ms->flags & IP_MASQ_F_SAW_RST || th->rst)
th522net/ipv4/ip_masq.celse if (ms->flags & IP_MASQ_F_SAW_FIN || th->fin)
th529net/ipv4/ip_masq.cskb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0);
th530net/ipv4/ip_masq.ctcp_send_check(th,iph->saddr,iph->daddr,size,skb);
th648net/ipv4/ip_masq.cstruct tcphdr *th;
th653net/ipv4/ip_masq.cth = (struct tcphdr *)portptr;
th654net/ipv4/ip_masq.cif (th->rst)
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];
th503net/ipv4/tcp.cstruct tcphdr *th = (struct tcphdr *)header;
th512net/ipv4/tcp.cth =(struct tcphdr *)header;
th513net/ipv4/tcp.csk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr);
th620net/ipv4/tcp.cif (skb->h.th->syn)
th625net/ipv4/tcp.cif (skb->h.th->syn)
th645net/ipv4/tcp.cif (skb->h.th->urg)
th647net/ipv4/tcp.cif (amount && skb->h.th->psh) break;
th794net/ipv4/tcp.cvoid tcp_send_check(struct tcphdr *th, unsigned long saddr,
th800net/ipv4/tcp.cth->check = 0;
th801net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th802net/ipv4/tcp.ccsum_partial((char *)th,sizeof(*th),skb->csum));
th805net/ipv4/tcp.ccheck = th->check;
th806net/ipv4/tcp.cth->check = 0;
th807net/ipv4/tcp.cth->check = tcp_check(th, len, saddr, daddr,
th808net/ipv4/tcp.ccsum_partial((char *)th,len,0));
th809net/ipv4/tcp.cif (check != th->check) {
th812net/ipv4/tcp.cprintk("Checksum %x (%x) from %p\n", th->check, check,
th813net/ipv4/tcp.c(&th)[-1]);
th814net/ipv4/tcp.cprintk("TCP=<off:%d a:%d s:%d f:%d>\n", th->doff*4, th->ack, th->syn, th->fin);
th825net/ipv4/tcp.cstatic inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push)
th827net/ipv4/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
th828net/ipv4/tcp.cth->psh = (push == 0) ? 1 : 0;
th829net/ipv4/tcp.cth->seq = htonl(sk->write_seq);
th830net/ipv4/tcp.cth->ack_seq = htonl(sk->acked_seq);
th831net/ipv4/tcp.cth->window = htons(tcp_select_window(sk));
th833net/ipv4/tcp.creturn(sizeof(*th));
th980net/ipv4/tcp.ctcp_size = skb->tail - (unsigned char *)(skb->h.th + 1);
th1090net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1091net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
th1102net/ipv4/tcp.cskb->h.th->urg = 1;
th1103net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th1387net/ipv4/tcp.cif (skb->h.th->syn)
th1391net/ipv4/tcp.cif (skb->h.th->fin)
th1492net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th1493net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th1514net/ipv4/tcp.cif (skb->h.th->fin)
th163net/ipv4/tcp_input.cstatic void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, u32 end_seq,
th166net/ipv4/tcp_input.cif (th->rst)
th178net/ipv4/tcp_input.ctcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th257net/ipv4/tcp_input.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th260net/ipv4/tcp_input.cint length=(th->doff*4)-sizeof(struct tcphdr);
th263net/ipv4/tcp_input.cptr = (unsigned char *)(th + 1);
th284net/ipv4/tcp_input.cif(opsize==4 && th->syn)
th296net/ipv4/tcp_input.cif (th->syn) 
th322net/ipv4/tcp_input.cstruct tcphdr *th;
th325net/ipv4/tcp_input.cth = skb->h.th;
th336net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th448net/ipv4/tcp_input.cnewsk->dummy_th.source = skb->h.th->dest;
th449net/ipv4/tcp_input.cnewsk->dummy_th.dest = skb->h.th->source;
th518net/ipv4/tcp_input.ctcp_options(newsk,skb->h.th);
th597net/ipv4/tcp_input.cstatic int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
th632net/ipv4/tcp_input.cif (len != th->doff*4) 
th638net/ipv4/tcp_input.cwindow_seq = ntohs(th->window);
th1045net/ipv4/tcp_input.ctcp_options(sk,th);
th1046net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1143net/ipv4/tcp_input.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th1163net/ipv4/tcp_input.cif (th->rst)
th1257net/ipv4/tcp_input.cif (skb->h.th->fin)
th1258net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1262net/ipv4/tcp_input.cstatic void tcp_queue(struct sk_buff * skb, struct sock * sk, struct tcphdr *th)
th1314net/ipv4/tcp_input.cif (!sk->delay_acks || th->fin) {
th1323net/ipv4/tcp_input.cif (th->psh)
th1375net/ipv4/tcp_input.cstruct tcphdr *th;
th1378net/ipv4/tcp_input.cth = skb->h.th;
th1379net/ipv4/tcp_input.cskb_pull(skb,th->doff*4);
th1380net/ipv4/tcp_input.cskb_trim(skb,len-(th->doff*4));
th1389net/ipv4/tcp_input.cif (skb->len == 0 && !th->fin) 
th1395net/ipv4/tcp_input.cif (!th->ack)
th1419net/ipv4/tcp_input.cnew_seq = skb->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th1441net/ipv4/tcp_input.csk->acked_seq = new_seq + th->fin;
th1442net/ipv4/tcp_input.ctcp_send_reset(sk->saddr, sk->daddr, skb->h.th,
th1458net/ipv4/tcp_input.ctcp_queue(skb, sk, th);
th1472net/ipv4/tcp_input.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th1474net/ipv4/tcp_input.cu32 ptr = ntohs(th->urg_ptr);
th1478net/ipv4/tcp_input.cptr += ntohl(th->seq);
th1504net/ipv4/tcp_input.cstatic inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len)
th1510net/ipv4/tcp_input.cif (th->urg)
th1511net/ipv4/tcp_input.ctcp_check_urg(sk,th);
th1523net/ipv4/tcp_input.cptr = sk->urg_seq - ntohl(th->seq) + th->doff*4;
th1525net/ipv4/tcp_input.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th1595net/ipv4/tcp_input.cstruct tcphdr *th;
th1605net/ipv4/tcp_input.cth = skb->h.th;
th1624net/ipv4/tcp_input.cskb->csum = csum_partial((char *)th, len, 0);
th1626net/ipv4/tcp_input.cif (tcp_check(th, len, saddr, daddr, skb->csum))
th1631net/ipv4/tcp_input.csk = get_tcp_sock(saddr, th->source, daddr, th->dest);
th1635net/ipv4/tcp_input.cskb->seq = ntohl(th->seq);
th1636net/ipv4/tcp_input.cskb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4;
th1637net/ipv4/tcp_input.cskb->ack_seq = ntohl(th->ack_seq);
th1701net/ipv4/tcp_input.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th1702net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th1711net/ipv4/tcp_input.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th1742net/ipv4/tcp_input.cif (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq)
th1757net/ipv4/tcp_input.cif(th->ack)
th1760net/ipv4/tcp_input.cif(!tcp_ack(sk,th,skb->ack_seq,len))
th1765net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1770net/ipv4/tcp_input.cif(th->rst)
th1772net/ipv4/tcp_input.cif(!th->syn)
th1777net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1792net/ipv4/tcp_input.ctcp_options(sk,th);
th1793net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1809net/ipv4/tcp_input.cif(th->syn && !th->rst)
th1814net/ipv4/tcp_input.csk->dummy_th.source==th->source &&
th1815net/ipv4/tcp_input.csk->dummy_th.dest==th->dest)
th1850net/ipv4/tcp_input.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th1851net/ipv4/tcp_input.cafter(skb->seq, sk->acked_seq) && !th->rst)
th1862net/ipv4/tcp_input.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th1883net/ipv4/tcp_input.cif (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
th1885net/ipv4/tcp_input.cbad_tcp_sequence(sk, th, skb->end_seq-th->syn, dev);
th1890net/ipv4/tcp_input.cif(th->rst)
th1897net/ipv4/tcp_input.cif(th->syn && !syn_ok)
th1899net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th1910net/ipv4/tcp_input.cif(th->ack && !tcp_ack(sk,th,skb->ack_seq,len))
th1918net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th1936net/ipv4/tcp_input.ctcp_urg(sk, th, len);
th1962net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255);
th109net/ipv4/tcp_output.cstruct tcphdr * th = skb->h.th;
th115net/ipv4/tcp_output.csize = skb->len - ((unsigned char *) th - skb->data);
th124net/ipv4/tcp_output.cskb, skb->data, th, skb->len);
th137net/ipv4/tcp_output.cif(!th->syn && !th->fin) 
th150net/ipv4/tcp_output.cskb->seq = ntohl(th->seq);
th151net/ipv4/tcp_output.cskb->end_seq = skb->seq + size - 4*th->doff;
th167net/ipv4/tcp_output.cth->check = 0;
th185net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th186net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th188net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th331net/ipv4/tcp_output.cstruct tcphdr *th;
th342net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th343net/ipv4/tcp_output.csize = skb->len - (((unsigned char *) th) - skb->data);
th352net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th353net/ipv4/tcp_output.cth->window = htons(tcp_select_window(sk));
th355net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th395net/ipv4/tcp_output.cstruct tcphdr *th;
th432net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2));
th500net/ipv4/tcp_output.cth->ack_seq = htonl(sk->acked_seq);
th502net/ipv4/tcp_output.cth->window = ntohs(tcp_select_window(sk));
th503net/ipv4/tcp_output.ctcp_send_check(th, sk->saddr, sk->daddr, size, skb);
th561net/ipv4/tcp_output.cvoid tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th573net/ipv4/tcp_output.cif(th->rst)
th610net/ipv4/tcp_output.ct1->dest = th->source;
th611net/ipv4/tcp_output.ct1->source = th->dest;
th615net/ipv4/tcp_output.cif(th->ack)
th617net/ipv4/tcp_output.ct1->seq = th->ack_seq;
th622net/ipv4/tcp_output.cif(!th->syn)
th623net/ipv4/tcp_output.ct1->ack_seq = th->seq;
th625net/ipv4/tcp_output.ct1->ack_seq = htonl(ntohl(th->seq)+1);
th640net/ipv4/tcp_output.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th696net/ipv4/tcp_output.cmemcpy(t1, th, sizeof(*t1));
th776net/ipv4/tcp_output.cmemcpy(t1, skb->h.th, sizeof(*t1));
th782net/ipv4/tcp_output.ct1->dest = skb->h.th->source;
th979net/ipv4/tcp_output.cstruct tcphdr *th;
th997net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th1003net/ipv4/tcp_output.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th1039net/ipv4/tcp_output.cnth = (struct tcphdr *) skb_put(buff,sizeof(*th));
th1041net/ipv4/tcp_output.cmemcpy(nth, th, sizeof(*th));
th1056net/ipv4/tcp_output.cbuff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
th1057net/ipv4/tcp_output.cwin_size + th->doff*4 - sizeof(*th), 0);
th1065net/ipv4/tcp_output.cif(th->urg && ntohs(th->urg_ptr) < win_size)