tag | line | file | source code |
th | 251 | drivers/net/slhc.c | struct tcphdr *th, *oth; |
th | 267 | drivers/net/slhc.c | th = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4); |
th | 268 | drivers/net/slhc.c | hlen = ip->ihl*4 + th->doff*4; |
th | 273 | drivers/net/slhc.c | if(th->syn || th->fin || th->rst || |
th | 274 | drivers/net/slhc.c | ! (th->ack)){ |
th | 296 | drivers/net/slhc.c | && th->source == cs->cs_tcp.source |
th | 297 | drivers/net/slhc.c | && th->dest == cs->cs_tcp.dest) |
th | 355 | drivers/net/slhc.c | || th->doff != cs->cs_tcp.doff |
th | 357 | drivers/net/slhc.c | || (th->doff > 5 && memcmp(th+1,cs->cs_tcpopt,((th->doff)-5)*4 != 0))){ |
th | 367 | drivers/net/slhc.c | if(th->urg){ |
th | 368 | drivers/net/slhc.c | deltaS = ntohs(th->urg_ptr); |
th | 371 | drivers/net/slhc.c | } else if(th->urg_ptr != oth->urg_ptr){ |
th | 378 | drivers/net/slhc.c | if((deltaS = ntohs(th->window) - ntohs(oth->window)) != 0){ |
th | 382 | drivers/net/slhc.c | if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){ |
th | 388 | drivers/net/slhc.c | if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){ |
th | 435 | drivers/net/slhc.c | if(th->psh) |
th | 440 | drivers/net/slhc.c | deltaA = ntohs(th->check); |
th | 442 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 475 | drivers/net/slhc.c | memcpy(&cs->cs_tcp,th,20); |
th | 478 | drivers/net/slhc.c | if (th->doff > 5) |
th | 479 | drivers/net/slhc.c | memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4); |
th | 52 | include/linux/skbuff.h | struct tcphdr *th; |
th | 413 | net/inet/tcp.c | struct tcphdr *th; |
th | 431 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
th | 432 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 456 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 457 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 458 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 753 | net/inet/tcp.c | struct tcphdr *th; |
th | 760 | net/inet/tcp.c | th =(struct tcphdr *)header; |
th | 761 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source, daddr, th->dest, saddr); |
th | 842 | net/inet/tcp.c | if (before(counted, skb->h.th->seq)) /* Found a hole so stops here */ |
th | 844 | net/inet/tcp.c | sum = skb->len -(counted - skb->h.th->seq); /* Length - header but start from where we are up to (avoid overlaps) */ |
th | 845 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 850 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 870 | net/inet/tcp.c | if (skb->h.th->urg) |
th | 872 | net/inet/tcp.c | if (amount && skb->h.th->psh) break; |
th | 1016 | net/inet/tcp.c | unsigned short tcp_check(struct tcphdr *th, int len, |
th | 1088 | net/inet/tcp.c | : "0"(sum), "c"(len), "S"(th) |
th | 1098 | net/inet/tcp.c | void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 1101 | net/inet/tcp.c | th->check = 0; |
th | 1102 | net/inet/tcp.c | th->check = tcp_check(th, len, saddr, daddr); |
th | 1114 | net/inet/tcp.c | struct tcphdr * th = skb->h.th; |
th | 1120 | net/inet/tcp.c | size = skb->len - ((unsigned char *) th - skb->data); |
th | 1129 | net/inet/tcp.c | skb, skb->data, th, skb->len); |
th | 1142 | net/inet/tcp.c | if(!th->syn && !th->fin) |
th | 1155 | net/inet/tcp.c | skb->h.seq = ntohl(th->seq) + size - 4*th->doff; |
th | 1171 | net/inet/tcp.c | th->check = 0; |
th | 1196 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 1197 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 1199 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 1295 | net/inet/tcp.c | struct tcphdr *th, unsigned long daddr) |
th | 1352 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 1358 | net/inet/tcp.c | t1->dest = th->source; |
th | 1359 | net/inet/tcp.c | t1->source = th->dest; |
th | 1412 | net/inet/tcp.c | extern __inline int tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
th | 1415 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
th | 1416 | net/inet/tcp.c | th->seq = htonl(sk->write_seq); |
th | 1417 | net/inet/tcp.c | th->psh =(push == 0) ? 1 : 0; |
th | 1418 | net/inet/tcp.c | th->doff = sizeof(*th)/4; |
th | 1419 | net/inet/tcp.c | th->ack = 1; |
th | 1420 | net/inet/tcp.c | th->fin = 0; |
th | 1424 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
th | 1426 | net/inet/tcp.c | th->window = htons(sk->window); |
th | 1428 | net/inet/tcp.c | return(sizeof(*th)); |
th | 1560 | net/inet/tcp.c | hdrlen = ((unsigned long)skb->h.th - (unsigned long)skb->data) |
th | 1705 | net/inet/tcp.c | skb->h.th =(struct tcphdr *) buff; |
th | 2071 | net/inet/tcp.c | if (before(*seq, skb->h.th->seq)) |
th | 2073 | net/inet/tcp.c | offset = *seq - skb->h.th->seq; |
th | 2074 | net/inet/tcp.c | if (skb->h.th->syn) |
th | 2078 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2186 | net/inet/tcp.c | memcpy_tofs(to,((unsigned char *)skb->h.th) + |
th | 2187 | net/inet/tcp.c | skb->h.th->doff*4 + offset, used); |
th | 2209 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 2303 | net/inet/tcp.c | struct tcphdr *th =(struct tcphdr *)&sk->dummy_th; |
th | 2364 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2490 | net/inet/tcp.c | static void tcp_reset(unsigned long saddr, unsigned long daddr, struct tcphdr *th, |
th | 2502 | net/inet/tcp.c | if(th->rst) |
th | 2536 | net/inet/tcp.c | memcpy(t1, th, sizeof(*t1)); |
th | 2542 | net/inet/tcp.c | t1->dest = th->source; |
th | 2543 | net/inet/tcp.c | t1->source = th->dest; |
th | 2547 | net/inet/tcp.c | if(th->ack) |
th | 2550 | net/inet/tcp.c | t1->seq = th->ack_seq; |
th | 2556 | net/inet/tcp.c | if(!th->syn) |
th | 2557 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq); |
th | 2559 | net/inet/tcp.c | t1->ack_seq=htonl(th->seq+1); |
th | 2585 | net/inet/tcp.c | static void tcp_options(struct sock *sk, struct tcphdr *th) |
th | 2588 | net/inet/tcp.c | int length=(th->doff*4)-sizeof(struct tcphdr); |
th | 2591 | net/inet/tcp.c | ptr = (unsigned char *)(th + 1); |
th | 2612 | net/inet/tcp.c | if(opsize==4 && th->syn) |
th | 2624 | net/inet/tcp.c | if (th->syn) |
th | 2678 | net/inet/tcp.c | struct tcphdr *th; |
th | 2683 | net/inet/tcp.c | th = skb->h.th; |
th | 2694 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev, sk->ip_tos,sk->ip_ttl); |
th | 2758 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq+1; |
th | 2759 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq+1; |
th | 2760 | net/inet/tcp.c | newsk->fin_seq = skb->h.th->seq; |
th | 2777 | net/inet/tcp.c | newsk->dummy_th.source = skb->h.th->dest; |
th | 2778 | net/inet/tcp.c | newsk->dummy_th.dest = skb->h.th->source; |
th | 2797 | net/inet/tcp.c | newsk->acked_seq = skb->h.th->seq + 1; |
th | 2798 | net/inet/tcp.c | newsk->copied_seq = skb->h.th->seq + 1; |
th | 2849 | net/inet/tcp.c | tcp_options(newsk,skb->h.th); |
th | 2898 | net/inet/tcp.c | memcpy(t1, skb->h.th, sizeof(*t1)); |
th | 2903 | net/inet/tcp.c | t1->dest = skb->h.th->source; |
th | 2916 | net/inet/tcp.c | t1->ack_seq = ntohl(skb->h.th->seq+1); |
th | 3062 | net/inet/tcp.c | struct tcphdr *th; |
th | 3074 | net/inet/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
th | 3075 | net/inet/tcp.c | size = skb->len - (((unsigned char *) th) - skb->data); |
th | 3077 | net/inet/tcp.c | th->ack_seq = ntohl(sk->acked_seq); |
th | 3078 | net/inet/tcp.c | th->window = ntohs(tcp_select_window(sk)); |
th | 3080 | net/inet/tcp.c | tcp_send_check(th, sk->saddr, sk->daddr, size, sk); |
th | 3104 | net/inet/tcp.c | extern __inline__ int tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
th | 3123 | net/inet/tcp.c | ack = ntohl(th->ack_seq); |
th | 3125 | net/inet/tcp.c | if (ntohs(th->window) > sk->max_window) |
th | 3127 | net/inet/tcp.c | sk->max_window = ntohs(th->window); |
th | 3180 | net/inet/tcp.c | if (len != th->doff*4) |
th | 3187 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) |
th | 3211 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3267 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
th | 3633 | net/inet/tcp.c | tcp_options(sk,th); |
th | 3634 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 3707 | net/inet/tcp.c | static int tcp_fin(struct sk_buff *skb, struct sock *sk, struct tcphdr *th) |
th | 3709 | net/inet/tcp.c | sk->fin_seq = th->seq + skb->len + th->syn + th->fin; |
th | 3727 | net/inet/tcp.c | if (th->rst) |
th | 3798 | net/inet/tcp.c | struct tcphdr *th; |
th | 3803 | net/inet/tcp.c | th = skb->h.th; |
th | 3804 | net/inet/tcp.c | skb->len = len -(th->doff*4); |
th | 3813 | net/inet/tcp.c | if (skb->len == 0 && !th->fin && !th->urg && !th->psh) |
th | 3819 | net/inet/tcp.c | if (!th->ack) |
th | 3820 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq,sk, th, saddr); |
th | 3843 | net/inet/tcp.c | new_seq= th->seq + skb->len + th->syn; /* Right edge of _data_ part of frame */ |
th | 3865 | net/inet/tcp.c | sk->acked_seq = new_seq + th->fin; |
th | 3866 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
th | 3905 | net/inet/tcp.c | printk("skb1->h.th->seq = %ld: ", skb1->h.th->seq); |
th | 3906 | net/inet/tcp.c | printk("skb->h.th->seq = %ld\n",skb->h.th->seq); |
th | 3919 | net/inet/tcp.c | if (th->seq==skb1->h.th->seq && skb->len>= skb1->len) |
th | 3933 | net/inet/tcp.c | if (after(th->seq+1, skb1->h.th->seq)) |
th | 3954 | net/inet/tcp.c | th->ack_seq = th->seq + skb->len; |
th | 3955 | net/inet/tcp.c | if (th->syn) |
th | 3956 | net/inet/tcp.c | th->ack_seq++; |
th | 3957 | net/inet/tcp.c | if (th->fin) |
th | 3958 | net/inet/tcp.c | th->ack_seq++; |
th | 3972 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) |
th | 3974 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) |
th | 3978 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
th | 3980 | net/inet/tcp.c | newwindow = sk->window-(th->ack_seq - sk->acked_seq); |
th | 3984 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
th | 3993 | net/inet/tcp.c | if (skb->h.th->fin) |
th | 3995 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4002 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) |
th | 4004 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
th | 4007 | net/inet/tcp.c | (skb2->h.th->ack_seq - sk->acked_seq); |
th | 4011 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
th | 4018 | net/inet/tcp.c | if (skb2->h.th->fin) |
th | 4020 | net/inet/tcp.c | tcp_fin(skb,sk,skb->h.th); |
th | 4041 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
th | 4090 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4096 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4121 | net/inet/tcp.c | static void tcp_check_urg(struct sock * sk, struct tcphdr * th) |
th | 4123 | net/inet/tcp.c | unsigned long ptr = ntohs(th->urg_ptr); |
th | 4127 | net/inet/tcp.c | ptr += th->seq; |
th | 4153 | net/inet/tcp.c | extern __inline__ int tcp_urg(struct sock *sk, struct tcphdr *th, |
th | 4162 | net/inet/tcp.c | if (th->urg) |
th | 4163 | net/inet/tcp.c | tcp_check_urg(sk,th); |
th | 4176 | net/inet/tcp.c | ptr = sk->urg_seq - th->seq + th->doff*4; |
th | 4184 | net/inet/tcp.c | sk->urg_data = URG_VALID | *(ptr + (unsigned char *) th); |
th | 4415 | net/inet/tcp.c | extern __inline__ int tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
th | 4420 | net/inet/tcp.c | next_seq = len - 4*th->doff; |
th | 4421 | net/inet/tcp.c | if (th->fin) |
th | 4426 | net/inet/tcp.c | next_seq += th->seq; |
th | 4439 | net/inet/tcp.c | if (!before(th->seq, sk->acked_seq + sk->window + 1)) |
th | 4446 | net/inet/tcp.c | if (th->rst) |
th | 4458 | net/inet/tcp.c | tcp_reset(sk->saddr,sk->daddr,th,sk->prot,NULL,dev, sk->ip_tos,sk->ip_ttl); |
th | 4463 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq, sk->acked_seq, sk, th, saddr); |
th | 4507 | net/inet/tcp.c | struct tcphdr *th; |
th | 4531 | net/inet/tcp.c | th = skb->h.th; |
th | 4537 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4553 | net/inet/tcp.c | if (tcp_check(th, len, saddr, daddr )) |
th | 4563 | net/inet/tcp.c | th->seq = ntohl(th->seq); |
th | 4571 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4602 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, &tcp_prot, opt,dev,skb->ip_hdr->tos,255); |
th | 4647 | net/inet/tcp.c | if(th->ack) /* These use the socket TOS.. might want to be the received TOS */ |
th | 4648 | net/inet/tcp.c | tcp_reset(daddr,saddr,th,sk->prot,opt,dev,sk->ip_tos, sk->ip_ttl); |
th | 4657 | net/inet/tcp.c | if(th->rst || !th->syn || th->ack || ip_chk_addr(daddr)!=IS_MYADDR) |
th | 4684 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV && th->syn && th->seq+1 == sk->acked_seq) |
th | 4699 | net/inet/tcp.c | if(th->ack) |
th | 4702 | net/inet/tcp.c | if(!tcp_ack(sk,th,saddr,len)) |
th | 4707 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, |
th | 4713 | net/inet/tcp.c | if(th->rst) |
th | 4715 | net/inet/tcp.c | if(!th->syn) |
th | 4728 | net/inet/tcp.c | sk->acked_seq=th->seq+1; |
th | 4729 | net/inet/tcp.c | sk->fin_seq=th->seq; |
th | 4730 | net/inet/tcp.c | tcp_send_ack(sk->sent_seq,sk->acked_seq,sk,th,sk->daddr); |
th | 4732 | net/inet/tcp.c | tcp_options(sk,th); |
th | 4733 | net/inet/tcp.c | sk->dummy_th.dest=th->source; |
th | 4749 | net/inet/tcp.c | if(th->syn && !th->rst) |
th | 4754 | net/inet/tcp.c | sk->dummy_th.source==th->source && |
th | 4755 | net/inet/tcp.c | sk->dummy_th.dest==th->dest) |
th | 4786 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT && th->syn && sk->dead && |
th | 4787 | net/inet/tcp.c | after(th->seq, sk->acked_seq) && !th->rst) |
th | 4799 | net/inet/tcp.c | sk=get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
th | 4821 | net/inet/tcp.c | if(!tcp_sequence(sk,th,len,opt,saddr,dev)) |
th | 4828 | net/inet/tcp.c | if(th->rst) |
th | 4835 | net/inet/tcp.c | if(th->syn && !syn_ok) |
th | 4837 | net/inet/tcp.c | tcp_reset(daddr,saddr,th, &tcp_prot, opt, dev, skb->ip_hdr->tos, 255); |
th | 4846 | net/inet/tcp.c | if(th->ack && !tcp_ack(sk,th,saddr,len)) |
th | 4854 | net/inet/tcp.c | tcp_reset(daddr, saddr, th,sk->prot, opt, dev,sk->ip_tos,sk->ip_ttl); |
th | 4867 | net/inet/tcp.c | if(tcp_urg(sk, th, saddr, len)) |
th | 135 | net/inet/tcp.h | extern void tcp_send_check(struct tcphdr *th, unsigned long saddr, |
th | 102 | net/inet/udp.c | struct udphdr *th; |
th | 112 | net/inet/udp.c | th = (struct udphdr *)header; |
th | 114 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |