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);
th141include/net/tcp.hextern void tcp_send_check(struct tcphdr *th, unsigned long saddr, 
th152include/net/tcp.hextern void tcp_send_ack(u32, u32, struct sock *sk, struct tcphdr *th, u32);
th153include/net/tcp.hextern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th295include/net/tcp.hstatic __inline__ u16 tcp_check(struct tcphdr *th, int len,
th480net/ipv4/ip_masq.cstruct tcphdr *th;
th481net/ipv4/ip_masq.cth = (struct tcphdr *)portptr;
th486net/ipv4/ip_masq.cif (ms->flags & IP_MASQ_F_SAW_FIN || th->fin)
th493net/ipv4/ip_masq.cskb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0);
th494net/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];
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);
th1113net/ipv4/tcp.cskb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr));
th1114net/ipv4/tcp.ctmp = tcp_build_header(skb->h.th, sk, seglen-copy);
th1125net/ipv4/tcp.cskb->h.th->urg = 1;
th1126net/ipv4/tcp.cskb->h.th->urg_ptr = ntohs(copy);
th1466net/ipv4/tcp.cif (skb->h.th->syn)
th1470net/ipv4/tcp.cif (skb->h.th->fin)
th1571net/ipv4/tcp.cmemcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) +
th1572net/ipv4/tcp.cskb->h.th->doff*4 + offset, used);
th1593net/ipv4/tcp.cif (skb->h.th->fin)
th159net/ipv4/tcp_input.cstatic void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len,
th162net/ipv4/tcp_input.cif (th->rst)
th174net/ipv4/tcp_input.ctcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl);
th187net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th256net/ipv4/tcp_input.cstatic void tcp_options(struct sock *sk, struct tcphdr *th)
th259net/ipv4/tcp_input.cint length=(th->doff*4)-sizeof(struct tcphdr);
th262net/ipv4/tcp_input.cptr = (unsigned char *)(th + 1);
th283net/ipv4/tcp_input.cif(opsize==4 && th->syn)
th295net/ipv4/tcp_input.cif (th->syn) 
th321net/ipv4/tcp_input.cstruct tcphdr *th;
th324net/ipv4/tcp_input.cth = skb->h.th;
th335net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl);
th444net/ipv4/tcp_input.cnewsk->dummy_th.source = skb->h.th->dest;
th445net/ipv4/tcp_input.cnewsk->dummy_th.dest = skb->h.th->source;
th514net/ipv4/tcp_input.ctcp_options(newsk,skb->h.th);
th593net/ipv4/tcp_input.cstatic int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len)
th628net/ipv4/tcp_input.cif (len != th->doff*4) 
th634net/ipv4/tcp_input.cwindow_seq = ntohs(th->window);
th1009net/ipv4/tcp_input.ctcp_options(sk,th);
th1010net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1107net/ipv4/tcp_input.cstatic int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th)
th1127net/ipv4/tcp_input.cif (th->rst)
th1196net/ipv4/tcp_input.cif (skb->h.th->fin)
th1197net/ipv4/tcp_input.ctcp_fin(skb,sk,skb->h.th);
th1207net/ipv4/tcp_input.cstruct tcphdr *th, unsigned long saddr)
th1265net/ipv4/tcp_input.cif (!sk->delay_acks || th->fin) {
th1266net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th1295net/ipv4/tcp_input.cstruct tcphdr *th;
th1298net/ipv4/tcp_input.cth = skb->h.th;
th1299net/ipv4/tcp_input.cskb_pull(skb,th->doff*4);
th1300net/ipv4/tcp_input.cskb_trim(skb,len-(th->doff*4));
th1309net/ipv4/tcp_input.cif (skb->len == 0 && !th->fin) 
th1315net/ipv4/tcp_input.cif (!th->ack)
th1316net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr);
th1339net/ipv4/tcp_input.cnew_seq = skb->seq + skb->len + th->syn;  /* Right edge of _data_ part of frame */
th1361net/ipv4/tcp_input.csk->acked_seq = new_seq + th->fin;
th1362net/ipv4/tcp_input.ctcp_send_reset(sk->saddr, sk->daddr, skb->h.th,
th1378net/ipv4/tcp_input.ctcp_queue(skb, sk, th, saddr);
th1387net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr);
th1414net/ipv4/tcp_input.cstatic void tcp_check_urg(struct sock * sk, struct tcphdr * th)
th1416net/ipv4/tcp_input.cu32 ptr = ntohs(th->urg_ptr);
th1420net/ipv4/tcp_input.cptr += ntohl(th->seq);
th1446net/ipv4/tcp_input.cstatic inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len)
th1452net/ipv4/tcp_input.cif (th->urg)
th1453net/ipv4/tcp_input.ctcp_check_urg(sk,th);
th1465net/ipv4/tcp_input.cptr = sk->urg_seq - ntohl(th->seq) + th->doff*4;
th1467net/ipv4/tcp_input.csk->urg_data = URG_VALID | *(ptr + (unsigned char *) th);
th1544net/ipv4/tcp_input.cstruct tcphdr *th;
th1554net/ipv4/tcp_input.cth = skb->h.th;
th1573net/ipv4/tcp_input.cskb->csum = csum_partial((char *)th, len, 0);
th1575net/ipv4/tcp_input.cif (tcp_check(th, len, saddr, daddr, skb->csum))
th1580net/ipv4/tcp_input.csk = get_tcp_sock(saddr, th->source, daddr, th->dest);
th1584net/ipv4/tcp_input.cskb->seq = ntohl(th->seq);
th1585net/ipv4/tcp_input.cskb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4;
th1586net/ipv4/tcp_input.cskb->ack_seq = ntohl(th->ack_seq);
th1650net/ipv4/tcp_input.cif(th->ack)  /* These use the socket TOS.. might want to be the received TOS */
th1651net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl);
th1660net/ipv4/tcp_input.cif(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR)
th1691net/ipv4/tcp_input.cif (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq)
th1706net/ipv4/tcp_input.cif(th->ack)
th1709net/ipv4/tcp_input.cif(!tcp_ack(sk,th,skb->ack_seq,len))
th1714net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1719net/ipv4/tcp_input.cif(th->rst)
th1721net/ipv4/tcp_input.cif(!th->syn)
th1726net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,
th1739net/ipv4/tcp_input.ctcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr);
th1741net/ipv4/tcp_input.ctcp_options(sk,th);
th1742net/ipv4/tcp_input.csk->dummy_th.dest=th->source;
th1758net/ipv4/tcp_input.cif(th->syn && !th->rst)
th1763net/ipv4/tcp_input.csk->dummy_th.source==th->source &&
th1764net/ipv4/tcp_input.csk->dummy_th.dest==th->dest)
th1799net/ipv4/tcp_input.cif (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && 
th1800net/ipv4/tcp_input.cafter(skb->seq, sk->acked_seq) && !th->rst)
th1811net/ipv4/tcp_input.csk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
th1832net/ipv4/tcp_input.cif (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn))
th1834net/ipv4/tcp_input.cbad_tcp_sequence(sk, th, len, opt, saddr, dev);
th1839net/ipv4/tcp_input.cif(th->rst)
th1846net/ipv4/tcp_input.cif(th->syn && !syn_ok)
th1848net/ipv4/tcp_input.ctcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255);
th1859net/ipv4/tcp_input.cif(th->ack && !tcp_ack(sk,th,skb->ack_seq,len))
th1867net/ipv4/tcp_input.ctcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl);
th1885net/ipv4/tcp_input.ctcp_urg(sk, th, len);
th1911net/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);
th493net/ipv4/tcp_output.cvoid tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th,
th505net/ipv4/tcp_output.cif(th->rst)
th542net/ipv4/tcp_output.ct1->dest = th->source;
th543net/ipv4/tcp_output.ct1->source = th->dest;
th547net/ipv4/tcp_output.cif(th->ack)
th549net/ipv4/tcp_output.ct1->seq = th->ack_seq;
th554net/ipv4/tcp_output.cif(!th->syn)
th555net/ipv4/tcp_output.ct1->ack_seq = th->seq;
th557net/ipv4/tcp_output.ct1->ack_seq = htonl(ntohl(th->seq)+1);
th572net/ipv4/tcp_output.cstruct tcphdr *th =(struct tcphdr *)&sk->dummy_th;
th628net/ipv4/tcp_output.cmemcpy(t1, th, sizeof(*t1));
th708net/ipv4/tcp_output.cmemcpy(t1, skb->h.th, sizeof(*t1));
th714net/ipv4/tcp_output.ct1->dest = skb->h.th->source;
th755net/ipv4/tcp_output.cstruct tcphdr *th, u32 daddr)
th816net/ipv4/tcp_output.ct1->dest = th->source;
th817net/ipv4/tcp_output.ct1->source = th->dest;
th893net/ipv4/tcp_output.cstruct tcphdr *th;
th911net/ipv4/tcp_output.cth = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2));
th917net/ipv4/tcp_output.cbuff = sock_wmalloc(sk, win_size + th->doff * 4 + 
th953net/ipv4/tcp_output.cnth = (struct tcphdr *) skb_put(buff,sizeof(*th));
th955net/ipv4/tcp_output.cmemcpy(nth, th, sizeof(*th));
th970net/ipv4/tcp_output.cbuff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size),
th971net/ipv4/tcp_output.cwin_size + th->doff*4 - sizeof(*th), 0);
th979net/ipv4/tcp_output.cif(th->urg && ntohs(th->urg_ptr) < win_size)