/net/ceph/ |
D | auth_x.c | 100 struct ceph_x_ticket_handler *th; in get_ticket_handler() local 106 th = rb_entry(parent, struct ceph_x_ticket_handler, node); in get_ticket_handler() 107 if (service < th->service) in get_ticket_handler() 109 else if (service > th->service) in get_ticket_handler() 112 return th; in get_ticket_handler() 116 th = kzalloc(sizeof(*th), GFP_NOFS); in get_ticket_handler() 117 if (!th) in get_ticket_handler() 119 th->service = service; in get_ticket_handler() 120 rb_link_node(&th->node, parent, p); in get_ticket_handler() 121 rb_insert_color(&th->node, &xi->ticket_handlers); in get_ticket_handler() [all …]
|
/net/ipv4/netfilter/ |
D | ipt_SYNPROXY.c | 75 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack() argument 97 nth->source = th->dest; in synproxy_send_client_synack() 98 nth->dest = th->source; in synproxy_send_client_synack() 99 nth->seq = htonl(__cookie_v4_init_sequence(iph, th, &mss)); in synproxy_send_client_synack() 100 nth->ack_seq = htonl(ntohl(th->seq) + 1); in synproxy_send_client_synack() 117 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_server_syn() argument 138 nth->source = th->source; in synproxy_send_server_syn() 139 nth->dest = th->dest; in synproxy_send_server_syn() 144 nth->ack_seq = htonl(ntohl(th->ack_seq) - 1); in synproxy_send_server_syn() 149 nth->window = th->window; in synproxy_send_server_syn() [all …]
|
/net/ipv4/ |
D | tcp_offload.c | 40 struct tcphdr *th = tcp_hdr(skb); in tcp4_gso_segment() local 46 th->check = 0; in tcp4_gso_segment() 59 struct tcphdr *th; in tcp_gso_segment() local 69 th = tcp_hdr(skb); in tcp_gso_segment() 70 thlen = th->doff * 4; in tcp_gso_segment() 71 if (thlen < sizeof(*th)) in tcp_gso_segment() 125 th = tcp_hdr(skb); in tcp_gso_segment() 126 seq = ntohl(th->seq); in tcp_gso_segment() 131 newcheck = ~csum_fold((__force __wsum)((__force u32)th->check + in tcp_gso_segment() 135 th->fin = th->psh = 0; in tcp_gso_segment() [all …]
|
D | syncookies.c | 178 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, in __cookie_v4_init_sequence() argument 190 th->source, th->dest, ntohl(th->seq), in __cookie_v4_init_sequence() 198 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_init_sequence() local 200 return __cookie_v4_init_sequence(iph, th, mssp); in cookie_v4_init_sequence() 207 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th, in __cookie_v4_check() argument 210 __u32 seq = ntohl(th->seq) - 1; in __cookie_v4_check() 212 th->source, th->dest, seq); in __cookie_v4_check() 306 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_check() local 307 __u32 cookie = ntohl(th->ack_seq) - 1; in cookie_v4_check() 315 if (!sysctl_tcp_syncookies || !th->ack || th->rst) in cookie_v4_check() [all …]
|
D | tcp_ipv4.c | 94 __be32 daddr, __be32 saddr, const struct tcphdr *th); 361 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2)); in tcp_v4_err() local 376 th->dest, iph->saddr, ntohs(th->source), in tcp_v4_err() 386 seq = ntohl(th->seq); in tcp_v4_err() 551 struct tcphdr *th = tcp_hdr(skb); in __tcp_v4_send_check() local 554 th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); in __tcp_v4_send_check() 558 th->check = tcp_v4_check(skb->len, saddr, daddr, in __tcp_v4_send_check() 559 csum_partial(th, in __tcp_v4_send_check() 560 th->doff << 2, in __tcp_v4_send_check() 589 const struct tcphdr *th = tcp_hdr(skb); in tcp_v4_send_reset() local [all …]
|
D | tcp_minisocks.c | 101 const struct tcphdr *th) in tcp_timewait_state_process() argument 108 if (th->doff > (sizeof(*th) >> 2) && tcptw->tw_ts_recent_stamp) { in tcp_timewait_state_process() 115 paws_reject = tcp_paws_reject(&tmp_opt, th->rst); in tcp_timewait_state_process() 130 if (th->rst) in tcp_timewait_state_process() 133 if (th->syn && !before(TCP_SKB_CB(skb)->seq, tcptw->tw_rcv_nxt)) in tcp_timewait_state_process() 137 if (!th->ack || in tcp_timewait_state_process() 147 if (!th->fin || in tcp_timewait_state_process() 190 (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq || th->rst))) { in tcp_timewait_state_process() 193 if (th->rst) { in tcp_timewait_state_process() 233 if (th->syn && !th->rst && !th->ack && !paws_reject && in tcp_timewait_state_process() [all …]
|
D | tcp_input.c | 270 static void tcp_ecn_rcv_synack(struct tcp_sock *tp, const struct tcphdr *th) in tcp_ecn_rcv_synack() argument 272 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || th->cwr)) in tcp_ecn_rcv_synack() 276 static void tcp_ecn_rcv_syn(struct tcp_sock *tp, const struct tcphdr *th) in tcp_ecn_rcv_syn() argument 278 if ((tp->ecn_flags & TCP_ECN_OK) && (!th->ece || !th->cwr)) in tcp_ecn_rcv_syn() 282 static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr *th) in tcp_ecn_rcv_ecn_echo() argument 284 if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK)) in tcp_ecn_rcv_ecn_echo() 3754 const struct tcphdr *th = tcp_hdr(skb); in tcp_parse_options() local 3755 int length = (th->doff * 4) - sizeof(struct tcphdr); in tcp_parse_options() 3757 ptr = (const unsigned char *)(th + 1); in tcp_parse_options() 3778 if (opsize == TCPOLEN_MSS && th->syn && !estab) { in tcp_parse_options() [all …]
|
D | tcp_output.c | 366 tcp_ecn_make_synack(const struct request_sock *req, struct tcphdr *th) in tcp_ecn_make_synack() argument 369 th->ece = 1; in tcp_ecn_make_synack() 920 struct tcphdr *th; in __tcp_transmit_skb() local 967 th = tcp_hdr(skb); in __tcp_transmit_skb() 968 th->source = inet->inet_sport; in __tcp_transmit_skb() 969 th->dest = inet->inet_dport; in __tcp_transmit_skb() 970 th->seq = htonl(tcb->seq); in __tcp_transmit_skb() 971 th->ack_seq = htonl(rcv_nxt); in __tcp_transmit_skb() 972 *(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) | in __tcp_transmit_skb() 979 th->window = htons(min(tp->rcv_wnd, 65535U)); in __tcp_transmit_skb() [all …]
|
/net/ipv6/netfilter/ |
D | ip6t_SYNPROXY.c | 88 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_client_synack() argument 110 nth->source = th->dest; in synproxy_send_client_synack() 111 nth->dest = th->source; in synproxy_send_client_synack() 112 nth->seq = htonl(__cookie_v6_init_sequence(iph, th, &mss)); in synproxy_send_client_synack() 113 nth->ack_seq = htonl(ntohl(th->seq) + 1); in synproxy_send_client_synack() 130 const struct sk_buff *skb, const struct tcphdr *th, in synproxy_send_server_syn() argument 151 nth->source = th->source; in synproxy_send_server_syn() 152 nth->dest = th->dest; in synproxy_send_server_syn() 157 nth->ack_seq = htonl(ntohl(th->ack_seq) - 1); in synproxy_send_server_syn() 162 nth->window = th->window; in synproxy_send_server_syn() [all …]
|
/net/netfilter/ |
D | nf_log_common.c | 61 const struct tcphdr *th; in nf_log_dump_tcp_header() local 70 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in nf_log_dump_tcp_header() 71 if (th == NULL) { in nf_log_dump_tcp_header() 78 ntohs(th->source), ntohs(th->dest)); in nf_log_dump_tcp_header() 82 ntohl(th->seq), ntohl(th->ack_seq)); in nf_log_dump_tcp_header() 86 nf_log_buf_add(m, "WINDOW=%u ", ntohs(th->window)); in nf_log_dump_tcp_header() 88 nf_log_buf_add(m, "RES=0x%02x ", (u_int8_t)(ntohl(tcp_flag_word(th) & in nf_log_dump_tcp_header() 91 if (th->cwr) in nf_log_dump_tcp_header() 93 if (th->ece) in nf_log_dump_tcp_header() 95 if (th->urg) in nf_log_dump_tcp_header() [all …]
|
D | xt_tcpmss.c | 31 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()
|
D | xt_ecn.c | 34 const struct tcphdr *th; in match_tcp() local 39 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in match_tcp() 40 if (th == NULL) in match_tcp() 45 if (th->ece == 1) in match_tcp() 48 if (th->ece == 0) in match_tcp() 55 if (th->cwr == 1) in match_tcp() 58 if (th->cwr == 0) in match_tcp()
|
D | xt_tcpudp.c | 67 const struct tcphdr *th; in tcp_mt() local 88 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt() 89 if (th == NULL) { in tcp_mt() 98 ntohs(th->source), in tcp_mt() 102 ntohs(th->dest), in tcp_mt() 105 if (!FWINVTCP((((unsigned char *)th)[13] & tcpinfo->flg_mask) in tcp_mt() 110 if (th->doff * 4 < sizeof(_tcph)) { in tcp_mt() 115 th->doff*4 - sizeof(_tcph), in tcp_mt()
|
D | nf_conntrack_proto_tcp.c | 763 const struct tcphdr *th; in tcp_error() local 769 th = skb_header_pointer(skb, dataoff, sizeof(_tcph), &_tcph); in tcp_error() 770 if (th == NULL) { in tcp_error() 778 if (th->doff*4 < sizeof(struct tcphdr) || tcplen < th->doff*4) { in tcp_error() 799 tcpflags = (tcp_flag_byte(th) & ~(TCPHDR_ECE|TCPHDR_CWR|TCPHDR_PSH)); in tcp_error() 829 const struct tcphdr *th; in tcp_packet() local 834 th = skb_header_pointer(skb, dataoff, sizeof(_tcph), &_tcph); in tcp_packet() 835 BUG_ON(th == NULL); in tcp_packet() 840 index = get_conntrack_index(th); in tcp_packet() 895 && ntohl(th->ack_seq) == ct->proto.tcp.last_end) { in tcp_packet() [all …]
|
D | nf_synproxy_core.c | 32 const struct tcphdr *th, struct synproxy_options *opts) in synproxy_parse_options() argument 34 int length = (th->doff * 4) - sizeof(*th); in synproxy_parse_options() 40 ptr = skb_header_pointer(skb, doff + sizeof(*th), length, buf); in synproxy_parse_options() 118 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts) in synproxy_build_options() argument 120 __be32 *ptr = (__be32 *)(th + 1); in synproxy_build_options() 190 struct tcphdr *th, in synproxy_tstamp_adjust() argument 202 optend = protoff + th->doff * 4; in synproxy_tstamp_adjust() 234 inet_proto_csum_replace4(&th->check, skb, in synproxy_tstamp_adjust()
|
D | nf_conntrack_irc.c | 111 const struct tcphdr *th; in help() local 134 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help() 135 if (th == NULL) in help() 139 dataoff = protoff + th->doff*4; in help() 163 &iph->saddr, ntohs(th->source), in help() 164 &iph->daddr, ntohs(th->dest)); in help()
|
D | nf_conntrack_sane.c | 67 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()
|
D | nf_conntrack_ftp.c | 391 const struct tcphdr *th; in help() local 413 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help() 414 if (th == NULL) in help() 417 dataoff = protoff + th->doff * 4; in help() 431 seq = ntohl(th->seq) + datalen; in help() 434 if (!find_nl_seq(ntohl(th->seq), ct_ftp_info, dir)) { in help() 485 matchlen, ntohl(th->seq) + matchoff); in help()
|
/net/ipv6/ |
D | syncookies.c | 101 const struct tcphdr *th, __u16 *mssp) in __cookie_v6_init_sequence() argument 112 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in __cookie_v6_init_sequence() 113 th->dest, ntohl(th->seq), mssind); in __cookie_v6_init_sequence() 120 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_init_sequence() local 122 return __cookie_v6_init_sequence(iph, th, mssp); in cookie_v6_init_sequence() 125 int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th, in __cookie_v6_check() argument 128 __u32 seq = ntohl(th->seq) - 1; in __cookie_v6_check() 130 th->source, th->dest, seq); in __cookie_v6_check() 143 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_check() local 144 __u32 cookie = ntohl(th->ack_seq) - 1; in cookie_v6_check() [all …]
|
D | tcp_ipv6.c | 339 const struct tcphdr *th = (struct tcphdr *)(skb->data+offset); in tcp_v6_err() local 350 &hdr->daddr, th->dest, in tcp_v6_err() 351 &hdr->saddr, ntohs(th->source), in tcp_v6_err() 364 seq = ntohl(th->seq); in tcp_v6_err() 573 const struct tcphdr *th) in tcp_v6_md5_hash_hdr() argument 585 if (tcp_v6_md5_hash_pseudoheader(hp, daddr, saddr, th->doff << 2)) in tcp_v6_md5_hash_hdr() 587 if (tcp_md5_hash_header(hp, th)) in tcp_v6_md5_hash_hdr() 612 const struct tcphdr *th = tcp_hdr(skb); in tcp_v6_md5_hash_skb() local 633 if (tcp_md5_hash_header(hp, th)) in tcp_v6_md5_hash_skb() 635 if (tcp_md5_hash_skb_data(hp, skb, th->doff << 2)) in tcp_v6_md5_hash_skb() [all …]
|
D | tcpv6_offload.c | 35 struct tcphdr *th = tcp_hdr(skb); in tcp6_gro_complete() local 37 th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr, in tcp6_gro_complete() 47 struct tcphdr *th; in tcp6_gso_segment() local 49 if (!pskb_may_pull(skb, sizeof(*th))) in tcp6_gso_segment() 54 struct tcphdr *th = tcp_hdr(skb); in tcp6_gso_segment() local 60 th->check = 0; in tcp6_gso_segment()
|
/net/netfilter/ipvs/ |
D | ip_vs_app.c | 285 static inline void vs_fix_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_seq() argument 287 __u32 seq = ntohl(th->seq); in vs_fix_seq() 296 th->seq = htonl(seq + vseq->delta); in vs_fix_seq() 300 th->seq = htonl(seq + vseq->previous_delta); in vs_fix_seq() 312 vs_fix_ack_seq(const struct ip_vs_seq *vseq, struct tcphdr *th) in vs_fix_ack_seq() argument 314 __u32 ack_seq = ntohl(th->ack_seq); in vs_fix_ack_seq() 325 th->ack_seq = htonl(ack_seq - vseq->delta); in vs_fix_ack_seq() 330 th->ack_seq = htonl(ack_seq - vseq->previous_delta); in vs_fix_ack_seq() 362 struct tcphdr *th; in app_tcp_pkt_out() local 365 if (!skb_make_writable(skb, tcp_offset + sizeof(*th))) in app_tcp_pkt_out() [all …]
|
D | ip_vs_proto_tcp.c | 41 struct tcphdr _tcph, *th; in tcp_conn_schedule() local 49 th = skb_header_pointer(skb, iph->len, sizeof(_tcph), &_tcph); in tcp_conn_schedule() 50 if (th) { in tcp_conn_schedule() 51 if (th->rst || !(sysctl_sloppy_tcp(ipvs) || th->syn)) in tcp_conn_schedule() 53 ports = &th->source; in tcp_conn_schedule() 480 static inline int tcp_state_idx(struct tcphdr *th) in tcp_state_idx() argument 482 if (th->rst) in tcp_state_idx() 484 if (th->syn) in tcp_state_idx() 486 if (th->fin) in tcp_state_idx() 488 if (th->ack) in tcp_state_idx() [all …]
|
D | ip_vs_ftp.c | 173 struct tcphdr *th; in ip_vs_ftp_out() local 205 th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); in ip_vs_ftp_out() 206 data = (char *)th + (th->doff << 2); in ip_vs_ftp_out() 315 struct tcphdr *th; in ip_vs_ftp_in() local 345 th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); in ip_vs_ftp_in() 350 data = data_start = (char *)th + (th->doff << 2); in ip_vs_ftp_in()
|
/net/netfilter/ipset/ |
D | ip_set_getport.c | 30 const struct tcphdr *th; in get_port() local 32 th = skb_header_pointer(skb, protooff, sizeof(_tcph), &_tcph); in get_port() 33 if (!th) in get_port() 37 *port = src ? th->source : th->dest; in get_port()
|