tag | line | file | source code |
th | 252 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 268 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 269 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 274 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 275 | drivers/net/slhc.c | ! (th->ack)){ |
th | 297 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 298 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 356 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 358 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4) != 0)){ |
th | 368 | drivers/net/slhc.c | if(th->urg){ |
th | 369 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 372 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
th | 379 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
th | 383 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
th | 389 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
th | 436 | drivers/net/slhc.c | if(th->psh) |
th | 441 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 443 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 476 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 479 | drivers/net/slhc.c | if (th->doff > 5) |
th | 480 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 16 | include/asm-alpha/ipsum.h | extern inline unsigned short tcp_check(struct tcphdr *th, int len, u32 saddr, u32 daddr) |
th | 61 | include/linux/skbuff.h | struct tcphdr *th; |
th | 14 | include/net/arp.h | unsigned char *dest_hw, unsigned char *src_hw, unsigned char *th); |
th | 141 | include/net/tcp.h | extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 152 | include/net/tcp.h | extern void tcp_send_ack(u32, u32, struct sock *sk, struct tcphdr *th, u32); |
th | 153 | include/net/tcp.h | extern void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 295 | include/net/tcp.h | static __inline__ u16 tcp_check(struct tcphdr *th, int len, |
th | 480 | net/ipv4/ip_masq.c | struct tcphdr *th; |
th | 481 | net/ipv4/ip_masq.c | th = (struct tcphdr *)portptr; |
th | 486 | net/ipv4/ip_masq.c | if (ms->flags & IP_MASQ_F_SAW_FIN || th->fin) |
th | 493 | net/ipv4/ip_masq.c | skb->csum = csum_partial((void *)(th + 1), size - sizeof(*th), 0); |
th | 494 | net/ipv4/ip_masq.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb); |
th | 225 | net/ipv4/ip_masq_app.c | static __inline__ void masq_fix_seq(const struct ip_masq_seq *ms_seq, struct tcphdr *th) |
th | 229 | net/ipv4/ip_masq_app.c | seq = ntohl(th->seq); |
th | 239 | net/ipv4/ip_masq_app.c | th->seq = htonl(seq + ms_seq->delta); |
th | 244 | net/ipv4/ip_masq_app.c | th->seq = htonl(seq + ms_seq->previous_delta); |
th | 258 | net/ipv4/ip_masq_app.c | static __inline__ void masq_fix_ack_seq(const struct ip_masq_seq *ms_seq, struct tcphdr *th) |
th | 262 | net/ipv4/ip_masq_app.c | ack_seq=ntohl(th->ack_seq); |
th | 272 | net/ipv4/ip_masq_app.c | th->ack_seq = htonl(ack_seq-ms_seq->delta); |
th | 277 | net/ipv4/ip_masq_app.c | th->ack_seq = htonl(ack_seq-ms_seq->previous_delta); |
th | 314 | net/ipv4/ip_masq_app.c | struct tcphdr *th; |
th | 329 | net/ipv4/ip_masq_app.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
th | 335 | net/ipv4/ip_masq_app.c | seq = ntohl(th->seq); |
th | 343 | net/ipv4/ip_masq_app.c | masq_fix_seq(&ms->out_seq, th); |
th | 345 | net/ipv4/ip_masq_app.c | masq_fix_ack_seq(&ms->in_seq, th); |
th | 377 | net/ipv4/ip_masq_app.c | struct tcphdr *th; |
th | 392 | net/ipv4/ip_masq_app.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
th | 398 | net/ipv4/ip_masq_app.c | seq = ntohl(th->seq); |
th | 406 | net/ipv4/ip_masq_app.c | masq_fix_seq(&ms->in_seq, th); |
th | 408 | net/ipv4/ip_masq_app.c | masq_fix_ack_seq(&ms->out_seq, th); |
th | 55 | net/ipv4/ip_masq_ftp.c | struct tcphdr *th; |
th | 67 | net/ipv4/ip_masq_ftp.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
th | 68 | net/ipv4/ip_masq_ftp.c | data = (char *)&th[1]; |
th | 56 | net/ipv4/ip_masq_irc.c | struct tcphdr *th; |
th | 69 | net/ipv4/ip_masq_irc.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
th | 70 | net/ipv4/ip_masq_irc.c | data = (char *)&th[1]; |
th | 515 | net/ipv4/tcp.c | struct tcphdr *th = (struct tcphdr *)header; |
th | 524 | net/ipv4/tcp.c | th =(struct tcphdr *)header; |
th | 525 | net/ipv4/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 632 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 637 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 657 | net/ipv4/tcp.c | if (skb->h.th->urg) |
th | 659 | net/ipv4/tcp.c | if (amount && skb->h.th->psh) break; |
th | 805 | net/ipv4/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 811 | net/ipv4/tcp.c | th->check = 0; |
th | 812 | net/ipv4/tcp.c | th->check = tcp_check(th, len, saddr, daddr, |
th | 813 | net/ipv4/tcp.c | csum_partial((char *)th,sizeof(*th),skb->csum)); |
th | 816 | net/ipv4/tcp.c | check = th->check; |
th | 817 | net/ipv4/tcp.c | th->check = 0; |
th | 818 | net/ipv4/tcp.c | th->check = tcp_check(th, len, saddr, daddr, |
th | 819 | net/ipv4/tcp.c | csum_partial((char *)th,len,0)); |
th | 820 | net/ipv4/tcp.c | if (check != th->check) { |
th | 823 | net/ipv4/tcp.c | printk("Checksum %x (%x) from %p\n", th->check, check, |
th | 824 | net/ipv4/tcp.c | (&th)[-1]); |
th | 825 | net/ipv4/tcp.c | printk("TCP=<off:%d a:%d s:%d f:%d>\n", th->doff*4, th->ack, th->syn, th->fin); |
th | 836 | net/ipv4/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 839 | net/ipv4/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 840 | net/ipv4/tcp.c | th->seq = htonl(sk->write_seq); |
th | 841 | net/ipv4/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 845 | net/ipv4/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 847 | net/ipv4/tcp.c | th->window = htons(sk->window); |
th | 849 | net/ipv4/tcp.c | return(sizeof(*th)); |
th | 1001 | net/ipv4/tcp.c | tcp_size = skb->tail - (unsigned char *)(skb->h.th + 1); |
th | 1113 | net/ipv4/tcp.c | skb->h.th =(struct tcphdr *)skb_put(skb,sizeof(struct tcphdr)); |
th | 1114 | net/ipv4/tcp.c | tmp = tcp_build_header(skb->h.th, sk, seglen-copy); |
th | 1125 | net/ipv4/tcp.c | skb->h.th->urg = 1; |
th | 1126 | net/ipv4/tcp.c | skb->h.th->urg_ptr = ntohs(copy); |
th | 1466 | net/ipv4/tcp.c | if (skb->h.th->syn) |
th | 1470 | net/ipv4/tcp.c | if (skb->h.th->fin) |
th | 1571 | net/ipv4/tcp.c | memcpy_toiovec(msg->msg_iov,((unsigned char *)skb->h.th) + |
th | 1572 | net/ipv4/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 1593 | net/ipv4/tcp.c | if (skb->h.th->fin) |
th | 159 | net/ipv4/tcp_input.c | static void bad_tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 162 | net/ipv4/tcp_input.c | if (th->rst) |
th | 174 | net/ipv4/tcp_input.c | tcp_send_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 187 | net/ipv4/tcp_input.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 256 | net/ipv4/tcp_input.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 259 | net/ipv4/tcp_input.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 262 | net/ipv4/tcp_input.c | ptr = (unsigned char *)(th + 1); |
th | 283 | net/ipv4/tcp_input.c | if(opsize==4 && th->syn) |
th | 295 | net/ipv4/tcp_input.c | if (th->syn) |
th | 321 | net/ipv4/tcp_input.c | struct tcphdr *th; |
th | 324 | net/ipv4/tcp_input.c | th = skb->h.th; |
th | 335 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 444 | net/ipv4/tcp_input.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 445 | net/ipv4/tcp_input.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 514 | net/ipv4/tcp_input.c | tcp_options(newsk,skb->h.th); |
th | 593 | net/ipv4/tcp_input.c | static int tcp_ack(struct sock *sk, struct tcphdr *th, u32 ack, int len) |
th | 628 | net/ipv4/tcp_input.c | if (len != th->doff*4) |
th | 634 | net/ipv4/tcp_input.c | window_seq = ntohs(th->window); |
th | 1009 | net/ipv4/tcp_input.c | tcp_options(sk,th); |
th | 1010 | net/ipv4/tcp_input.c | sk->dummy_th.dest=th->source; |
th | 1107 | net/ipv4/tcp_input.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 1127 | net/ipv4/tcp_input.c | if (th->rst) |
th | 1196 | net/ipv4/tcp_input.c | if (skb->h.th->fin) |
th | 1197 | net/ipv4/tcp_input.c | tcp_fin(skb,sk,skb->h.th); |
th | 1207 | net/ipv4/tcp_input.c | struct tcphdr *th, unsigned long saddr) |
th | 1265 | net/ipv4/tcp_input.c | if (!sk->delay_acks || th->fin) { |
th | 1266 | net/ipv4/tcp_input.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 1295 | net/ipv4/tcp_input.c | struct tcphdr *th; |
th | 1298 | net/ipv4/tcp_input.c | th = skb->h.th; |
th | 1299 | net/ipv4/tcp_input.c | skb_pull(skb,th->doff*4); |
th | 1300 | net/ipv4/tcp_input.c | skb_trim(skb,len-(th->doff*4)); |
th | 1309 | net/ipv4/tcp_input.c | if (skb->len == 0 && !th->fin) |
th | 1315 | net/ipv4/tcp_input.c | if (!th->ack) |
th | 1316 | net/ipv4/tcp_input.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 1339 | net/ipv4/tcp_input.c | new_seq = skb->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 1361 | net/ipv4/tcp_input.c | sk->acked_seq = new_seq + th->fin; |
th | 1362 | net/ipv4/tcp_input.c | tcp_send_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 1378 | net/ipv4/tcp_input.c | tcp_queue(skb, sk, th, saddr); |
th | 1387 | net/ipv4/tcp_input.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 1414 | net/ipv4/tcp_input.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 1416 | net/ipv4/tcp_input.c | u32 ptr = ntohs(th->urg_ptr); |
th | 1420 | net/ipv4/tcp_input.c | ptr += ntohl(th->seq); |
th | 1446 | net/ipv4/tcp_input.c | static inline void tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long len) |
th | 1452 | net/ipv4/tcp_input.c | if (th->urg) |
th | 1453 | net/ipv4/tcp_input.c | tcp_check_urg(sk,th); |
th | 1465 | net/ipv4/tcp_input.c | ptr = sk->urg_seq - ntohl(th->seq) + th->doff*4; |
th | 1467 | net/ipv4/tcp_input.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 1544 | net/ipv4/tcp_input.c | struct tcphdr *th; |
th | 1554 | net/ipv4/tcp_input.c | th = skb->h.th; |
th | 1573 | net/ipv4/tcp_input.c | skb->csum = csum_partial((char *)th, len, 0); |
th | 1575 | net/ipv4/tcp_input.c | if (tcp_check(th, len, saddr, daddr, skb->csum)) |
th | 1580 | net/ipv4/tcp_input.c | sk = get_tcp_sock(saddr, th->source, daddr, th->dest); |
th | 1584 | net/ipv4/tcp_input.c | skb->seq = ntohl(th->seq); |
th | 1585 | net/ipv4/tcp_input.c | skb->end_seq = skb->seq + th->syn + th->fin + len - th->doff*4; |
th | 1586 | net/ipv4/tcp_input.c | skb->ack_seq = ntohl(th->ack_seq); |
th | 1650 | net/ipv4/tcp_input.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 1651 | net/ipv4/tcp_input.c | tcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 1660 | net/ipv4/tcp_input.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 1691 | net/ipv4/tcp_input.c | if (sk->state == TCP_SYN_RECV && th->syn && skb->seq+1 == sk->acked_seq) |
th | 1706 | net/ipv4/tcp_input.c | if(th->ack) |
th | 1709 | net/ipv4/tcp_input.c | if(!tcp_ack(sk,th,skb->ack_seq,len)) |
th | 1714 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, |
th | 1719 | net/ipv4/tcp_input.c | if(th->rst) |
th | 1721 | net/ipv4/tcp_input.c | if(!th->syn) |
th | 1726 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, |
th | 1739 | net/ipv4/tcp_input.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 1741 | net/ipv4/tcp_input.c | tcp_options(sk,th); |
th | 1742 | net/ipv4/tcp_input.c | sk->dummy_th.dest=th->source; |
th | 1758 | net/ipv4/tcp_input.c | if(th->syn && !th->rst) |
th | 1763 | net/ipv4/tcp_input.c | sk->dummy_th.source==th->source && |
th | 1764 | net/ipv4/tcp_input.c | sk->dummy_th.dest==th->dest) |
th | 1799 | net/ipv4/tcp_input.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 1800 | net/ipv4/tcp_input.c | after(skb->seq, sk->acked_seq) && !th->rst) |
th | 1811 | net/ipv4/tcp_input.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 1832 | net/ipv4/tcp_input.c | if (!tcp_sequence(sk, skb->seq, skb->end_seq-th->syn)) |
th | 1834 | net/ipv4/tcp_input.c | bad_tcp_sequence(sk, th, len, opt, saddr, dev); |
th | 1839 | net/ipv4/tcp_input.c | if(th->rst) |
th | 1846 | net/ipv4/tcp_input.c | if(th->syn && !syn_ok) |
th | 1848 | net/ipv4/tcp_input.c | tcp_send_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 1859 | net/ipv4/tcp_input.c | if(th->ack && !tcp_ack(sk,th,skb->ack_seq,len)) |
th | 1867 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 1885 | net/ipv4/tcp_input.c | tcp_urg(sk, th, len); |
th | 1911 | net/ipv4/tcp_input.c | tcp_send_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 34 | net/ipv4/tcp_output.c | struct tcphdr * th = skb->h.th; |
th | 40 | net/ipv4/tcp_output.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 49 | net/ipv4/tcp_output.c | skb, skb->data, th, skb->len); |
th | 62 | net/ipv4/tcp_output.c | if(!th->syn && !th->fin) |
th | 75 | net/ipv4/tcp_output.c | skb->seq = ntohl(th->seq); |
th | 76 | net/ipv4/tcp_output.c | skb->end_seq = skb->seq + size - 4*th->doff; |
th | 92 | net/ipv4/tcp_output.c | th->check = 0; |
th | 110 | net/ipv4/tcp_output.c | th->ack_seq = htonl(sk->acked_seq); |
th | 111 | net/ipv4/tcp_output.c | th->window = htons(tcp_select_window(sk)); |
th | 113 | net/ipv4/tcp_output.c | tcp_send_check(th, sk->saddr, sk->daddr, size, skb); |
th | 260 | net/ipv4/tcp_output.c | struct tcphdr *th; |
th | 271 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 272 | net/ipv4/tcp_output.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 281 | net/ipv4/tcp_output.c | th->ack_seq = htonl(sk->acked_seq); |
th | 282 | net/ipv4/tcp_output.c | th->window = htons(tcp_select_window(sk)); |
th | 284 | net/ipv4/tcp_output.c | tcp_send_check(th, sk->saddr, sk->daddr, size, skb); |
th | 326 | net/ipv4/tcp_output.c | struct tcphdr *th; |
th | 363 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 431 | net/ipv4/tcp_output.c | th->ack_seq = htonl(sk->acked_seq); |
th | 434 | net/ipv4/tcp_output.c | th->window = ntohs(tcp_select_window(sk)); |
th | 435 | net/ipv4/tcp_output.c | tcp_send_check(th, sk->saddr, sk->daddr, size, skb); |
th | 493 | net/ipv4/tcp_output.c | void tcp_send_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 505 | net/ipv4/tcp_output.c | if(th->rst) |
th | 542 | net/ipv4/tcp_output.c | t1->dest = th->source; |
th | 543 | net/ipv4/tcp_output.c | t1->source = th->dest; |
th | 547 | net/ipv4/tcp_output.c | if(th->ack) |
th | 549 | net/ipv4/tcp_output.c | t1->seq = th->ack_seq; |
th | 554 | net/ipv4/tcp_output.c | if(!th->syn) |
th | 555 | net/ipv4/tcp_output.c | t1->ack_seq = th->seq; |
th | 557 | net/ipv4/tcp_output.c | t1->ack_seq = htonl(ntohl(th->seq)+1); |
th | 572 | net/ipv4/tcp_output.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
th | 628 | net/ipv4/tcp_output.c | memcpy(t1, th, sizeof(*t1)); |
th | 708 | net/ipv4/tcp_output.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 714 | net/ipv4/tcp_output.c | t1->dest = skb->h.th->source; |
th | 755 | net/ipv4/tcp_output.c | struct tcphdr *th, u32 daddr) |
th | 816 | net/ipv4/tcp_output.c | t1->dest = th->source; |
th | 817 | net/ipv4/tcp_output.c | t1->source = th->dest; |
th | 893 | net/ipv4/tcp_output.c | struct tcphdr *th; |
th | 911 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 917 | net/ipv4/tcp_output.c | buff = sock_wmalloc(sk, win_size + th->doff * 4 + |
th | 953 | net/ipv4/tcp_output.c | nth = (struct tcphdr *) skb_put(buff,sizeof(*th)); |
th | 955 | net/ipv4/tcp_output.c | memcpy(nth, th, sizeof(*th)); |
th | 970 | net/ipv4/tcp_output.c | buff->csum = csum_partial_copy((void *)(th + 1), skb_put(buff,win_size), |
th | 971 | net/ipv4/tcp_output.c | win_size + th->doff*4 - sizeof(*th), 0); |
th | 979 | net/ipv4/tcp_output.c | if(th->urg && ntohs(th->urg_ptr) < win_size) |