Home
last modified time | relevance | path

Searched refs:th (Results 1 – 25 of 25) sorted by relevance

/net/ipv6/netfilter/
Dip6t_LOG.c206 const struct tcphdr *th; in dump_packet() local
215 th = skb_header_pointer(skb, ptr, sizeof(_tcph), &_tcph); in dump_packet()
216 if (th == NULL) { in dump_packet()
223 ntohs(th->source), ntohs(th->dest)); in dump_packet()
227 ntohl(th->seq), ntohl(th->ack_seq)); in dump_packet()
229 printk("WINDOW=%u ", ntohs(th->window)); in dump_packet()
231 printk("RES=0x%02x ", (u_int8_t)(ntohl(tcp_flag_word(th) & TCP_RESERVED_BITS) >> 22)); in dump_packet()
233 if (th->cwr) in dump_packet()
235 if (th->ece) in dump_packet()
237 if (th->urg) in dump_packet()
[all …]
/net/ipv4/netfilter/
Dipt_LOG.c101 const struct tcphdr *th; in dump_packet() local
110 th = skb_header_pointer(skb, iphoff + ih->ihl * 4, in dump_packet()
112 if (th == NULL) { in dump_packet()
120 ntohs(th->source), ntohs(th->dest)); in dump_packet()
124 ntohl(th->seq), ntohl(th->ack_seq)); in dump_packet()
126 printk("WINDOW=%u ", ntohs(th->window)); in dump_packet()
128 printk("RES=0x%02x ", (u8)(ntohl(tcp_flag_word(th) & TCP_RESERVED_BITS) >> 22)); in dump_packet()
130 if (th->cwr) in dump_packet()
132 if (th->ece) in dump_packet()
134 if (th->urg) in dump_packet()
[all …]
Dipt_ecn.c36 const struct tcphdr *th; in match_tcp() local
41 th = skb_header_pointer(skb, ip_hdrlen(skb), sizeof(_tcph), &_tcph); in match_tcp()
42 if (th == NULL) { in match_tcp()
49 if (th->ece == 1) in match_tcp()
52 if (th->ece == 0) in match_tcp()
59 if (th->cwr == 1) in match_tcp()
62 if (th->cwr == 0) in match_tcp()
Dnf_nat_h323.c35 const struct tcphdr *th; in set_addr() local
53 th = skb_header_pointer(skb, ip_hdrlen(skb), in set_addr()
55 if (th == NULL) in set_addr()
57 *data = skb->data + ip_hdrlen(skb) + th->doff * 4 + dataoff; in set_addr()
/net/ipv4/
Dtcp_ipv4.c92 __be32 daddr, __be32 saddr, struct tcphdr *th);
334 struct tcphdr *th = (struct tcphdr *)(skb->data + (iph->ihl << 2)); in tcp_v4_err() local
349 sk = inet_lookup(net, &tcp_hashinfo, iph->daddr, th->dest, in tcp_v4_err()
350 iph->saddr, th->source, inet_iif(skb)); in tcp_v4_err()
371 seq = ntohl(th->seq); in tcp_v4_err()
410 req = inet_csk_search_req(sk, &prev, th->dest, in tcp_v4_err()
483 struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_check() local
486 th->check = ~tcp_v4_check(len, inet->saddr, in tcp_v4_send_check()
491 th->check = tcp_v4_check(len, inet->saddr, inet->daddr, in tcp_v4_send_check()
492 csum_partial(th, in tcp_v4_send_check()
[all …]
Dsyncookies.c166 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_init_sequence() local
180 th->source, th->dest, ntohl(th->seq), in cookie_v4_init_sequence()
198 const struct tcphdr *th = tcp_hdr(skb); in cookie_check() local
199 __u32 seq = ntohl(th->seq) - 1; in cookie_check()
201 th->source, th->dest, seq, in cookie_check()
259 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_check() local
260 __u32 cookie = ntohl(th->ack_seq) - 1; in cookie_v4_check()
268 if (!sysctl_tcp_syncookies || !th->ack) in cookie_v4_check()
297 treq->rcv_isn = ntohl(th->seq) - 1; in cookie_v4_check()
300 ireq->loc_port = th->dest; in cookie_v4_check()
[all …]
Dtcp_minisocks.c97 const struct tcphdr *th) in tcp_timewait_state_process() argument
104 if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) { in tcp_timewait_state_process()
110 paws_reject = tcp_paws_check(&tmp_opt, th->rst); in tcp_timewait_state_process()
124 if (th->rst) in tcp_timewait_state_process()
127 if (th->syn && !before(TCP_SKB_CB(skb)->seq, tcptw->tw_rcv_nxt)) in tcp_timewait_state_process()
140 if (!th->fin || in tcp_timewait_state_process()
191 (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq || th->rst))) { in tcp_timewait_state_process()
194 if (th->rst) { in tcp_timewait_state_process()
235 if (th->syn && !th->rst && !th->ack && !paws_reject && in tcp_timewait_state_process()
249 if (!th->rst) { in tcp_timewait_state_process()
[all …]
Dtcp.c2388 struct tcphdr *th; in tcp_tso_segment() local
2395 if (!pskb_may_pull(skb, sizeof(*th))) in tcp_tso_segment()
2398 th = tcp_hdr(skb); in tcp_tso_segment()
2399 thlen = th->doff * 4; in tcp_tso_segment()
2400 if (thlen < sizeof(*th)) in tcp_tso_segment()
2439 th = tcp_hdr(skb); in tcp_tso_segment()
2440 seq = ntohl(th->seq); in tcp_tso_segment()
2443 th->fin = th->psh = 0; in tcp_tso_segment()
2445 th->check = ~csum_fold((__force __wsum)((__force u32)th->check + in tcp_tso_segment()
2448 th->check = in tcp_tso_segment()
[all …]
Dtcp_input.c226 static inline void TCP_ECN_rcv_synack(struct tcp_sock *tp, struct tcphdr *th) in TCP_ECN_rcv_synack() argument
228 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || th->cwr)) in TCP_ECN_rcv_synack()
232 static inline void TCP_ECN_rcv_syn(struct tcp_sock *tp, struct tcphdr *th) in TCP_ECN_rcv_syn() argument
234 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || !th->cwr)) in TCP_ECN_rcv_syn()
238 static inline int TCP_ECN_rcv_ecn_echo(struct tcp_sock *tp, struct tcphdr *th) in TCP_ECN_rcv_ecn_echo() argument
240 if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK)) in TCP_ECN_rcv_ecn_echo()
3693 struct tcphdr *th = tcp_hdr(skb); in tcp_parse_options() local
3694 int length = (th->doff * 4) - sizeof(struct tcphdr); in tcp_parse_options()
3696 ptr = (unsigned char *)(th + 1); in tcp_parse_options()
3717 if (opsize == TCPOLEN_MSS && th->syn && !estab) { in tcp_parse_options()
[all …]
Dtcp_output.c298 TCP_ECN_make_synack(struct request_sock *req, struct tcphdr *th) in TCP_ECN_make_synack() argument
301 th->ece = 1; in TCP_ECN_make_synack()
606 struct tcphdr *th; in tcp_transmit_skb() local
646 th = tcp_hdr(skb); in tcp_transmit_skb()
647 th->source = inet->sport; in tcp_transmit_skb()
648 th->dest = inet->dport; in tcp_transmit_skb()
649 th->seq = htonl(tcb->seq); in tcp_transmit_skb()
650 th->ack_seq = htonl(tp->rcv_nxt); in tcp_transmit_skb()
651 *(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) | in tcp_transmit_skb()
658 th->window = htons(min(tp->rcv_wnd, 65535U)); in tcp_transmit_skb()
[all …]
Dtcp_probe.c91 struct tcphdr *th, unsigned len) in jtcp_rcv_established() argument
/net/netfilter/ipvs/
Dip_vs_app.c253 static inline void vs_fix_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_seq() argument
255 __u32 seq = ntohl(th->seq); in vs_fix_seq()
264 th->seq = htonl(seq + vseq->delta); in vs_fix_seq()
268 th->seq = htonl(seq + vseq->previous_delta); in vs_fix_seq()
280 vs_fix_ack_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_ack_seq() argument
282 __u32 ack_seq = ntohl(th->ack_seq); in vs_fix_ack_seq()
293 th->ack_seq = htonl(ack_seq - vseq->delta); in vs_fix_ack_seq()
298 th->ack_seq = htonl(ack_seq - vseq->previous_delta); in vs_fix_ack_seq()
330 struct tcphdr *th; in app_tcp_pkt_out() local
333 if (!skb_make_writable(skb, tcp_offset + sizeof(*th))) in app_tcp_pkt_out()
[all …]
Dip_vs_proto_tcp.c78 struct tcphdr _tcph, *th; in tcp_conn_schedule() local
83 th = skb_header_pointer(skb, iph.len, sizeof(_tcph), &_tcph); in tcp_conn_schedule()
84 if (th == NULL) { in tcp_conn_schedule()
89 if (th->syn && in tcp_conn_schedule()
91 th->dest))) { in tcp_conn_schedule()
484 static inline int tcp_state_idx(struct tcphdr *th) in tcp_state_idx() argument
486 if (th->rst) in tcp_state_idx()
488 if (th->syn) in tcp_state_idx()
490 if (th->fin) in tcp_state_idx()
492 if (th->ack) in tcp_state_idx()
[all …]
Dip_vs_ftp.c140 struct tcphdr *th; in ip_vs_ftp_out() local
170 th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); in ip_vs_ftp_out()
171 data = (char *)th + (th->doff << 2); in ip_vs_ftp_out()
250 struct tcphdr *th; in ip_vs_ftp_in() local
280 th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); in ip_vs_ftp_in()
285 data = data_start = (char *)th + (th->doff << 2); in ip_vs_ftp_in()
Dip_vs_core.c859 struct tcphdr _tcph, *th; in is_tcp_reset() local
861 th = skb_header_pointer(skb, nh_len, sizeof(_tcph), &_tcph); in is_tcp_reset()
862 if (th == NULL) in is_tcp_reset()
864 return th->rst; in is_tcp_reset()
/net/netfilter/
Dxt_tcpmss.c31 const struct tcphdr *th; in tcpmss_mt() local
39 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt()
40 if (th == NULL) in tcpmss_mt()
44 if (th->doff*4 < sizeof(*th)) in tcpmss_mt()
47 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt()
52 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
Dnf_conntrack_proto_tcp.c757 const struct tcphdr *th; in tcp_error() local
763 th = skb_header_pointer(skb, dataoff, sizeof(_tcph), &_tcph); in tcp_error()
764 if (th == NULL) { in tcp_error()
772 if (th->doff*4 < sizeof(struct tcphdr) || tcplen < th->doff*4) { in tcp_error()
793 tcpflags = (((u_int8_t *)th)[13] & ~(TH_ECE|TH_CWR|TH_PUSH)); in tcp_error()
816 const struct tcphdr *th; in tcp_packet() local
821 th = skb_header_pointer(skb, dataoff, sizeof(_tcph), &_tcph); in tcp_packet()
822 BUG_ON(th == NULL); in tcp_packet()
827 index = get_conntrack_index(th); in tcp_packet()
882 && ntohl(th->ack_seq) == ct->proto.tcp.last_end) { in tcp_packet()
[all …]
Dxt_tcpudp.c73 const struct tcphdr *th; in tcp_mt() local
94 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt()
95 if (th == NULL) { in tcp_mt()
104 ntohs(th->source), in tcp_mt()
108 ntohs(th->dest), in tcp_mt()
111 if (!FWINVTCP((((unsigned char *)th)[13] & tcpinfo->flg_mask) in tcp_mt()
116 if (th->doff * 4 < sizeof(_tcph)) { in tcp_mt()
121 th->doff*4 - sizeof(_tcph), in tcp_mt()
Dnf_conntrack_irc.c108 const struct tcphdr *th; in help() local
132 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help()
133 if (th == NULL) in help()
137 dataoff = protoff + th->doff*4; in help()
161 &iph->saddr, ntohs(th->source), in help()
162 &iph->daddr, ntohs(th->dest)); in help()
Dnf_conntrack_sane.c66 const struct tcphdr *th; in help() local
84 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help()
85 if (th == NULL) in help()
89 dataoff = protoff + th->doff * 4; in help()
Dnf_conntrack_ftp.c355 const struct tcphdr *th; in help() local
377 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help()
378 if (th == NULL) in help()
381 dataoff = protoff + th->doff * 4; in help()
395 seq = ntohl(th->seq) + datalen; in help()
398 if (!find_nl_seq(ntohl(th->seq), ct_ftp_info, dir)) { in help()
432 search[dir][i].pattern, ntohl(th->seq), datalen); in help()
442 matchlen, ntohl(th->seq) + matchoff); in help()
Dnf_conntrack_h323_main.c117 const struct tcphdr *th; in get_tpkt_data() local
126 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in get_tpkt_data()
127 if (th == NULL) in get_tpkt_data()
131 tcpdataoff = protoff + th->doff * 4; in get_tpkt_data()
/net/ipv6/
Dsyncookies.c130 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_init_sequence() local
142 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in cookie_v6_init_sequence()
143 th->dest, ntohl(th->seq), in cookie_v6_init_sequence()
150 const struct tcphdr *th = tcp_hdr(skb); in cookie_check() local
151 __u32 seq = ntohl(th->seq) - 1; in cookie_check()
153 th->source, th->dest, seq, in cookie_check()
166 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_check() local
167 __u32 cookie = ntohl(th->ack_seq) - 1; in cookie_v6_check()
175 if (!sysctl_tcp_syncookies || !th->ack) in cookie_v6_check()
206 ireq->rmt_port = th->source; in cookie_v6_check()
[all …]
Dtcp_ipv6.c323 const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); in tcp_v6_err() local
332 th->dest, &hdr->saddr, th->source, skb->dev->ifindex); in tcp_v6_err()
353 seq = ntohl(th->seq); in tcp_v6_err()
420 req = inet6_csk_search_req(sk, &prev, th->dest, &hdr->daddr, in tcp_v6_err()
502 struct tcphdr *th = tcp_hdr(skb); in tcp_v6_send_synack() local
504 th->check = tcp_v6_check(skb->len, in tcp_v6_send_synack()
506 csum_partial(th, skb->len, skb->csum)); in tcp_v6_send_synack()
763 struct tcphdr *th) in tcp_v6_md5_hash_hdr() argument
775 if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v6_md5_hash_hdr()
777 if (tcp_md5_hash_header(hp, th)) in tcp_v6_md5_hash_hdr()
[all …]
/net/sched/
Dcls_route.c435 unsigned int h, th; in route4_change() local
492 th = to_hash(old_handle); in route4_change()
494 if ((b = head->table[th]) != NULL) { in route4_change()