| /linux-6.15/net/netfilter/ |
| H A D | nf_conntrack_proto_tcp.c | 857 memset(&ct->proto.tcp, 0, sizeof(ct->proto.tcp)); in tcp_new() 873 memset(&ct->proto.tcp, 0, sizeof(ct->proto.tcp)); in tcp_new() 1055 ct->proto.tcp.seen[ct->proto.tcp.last_dir].td_end = in nf_conntrack_tcp_packet() 1056 ct->proto.tcp.last_end; in nf_conntrack_tcp_packet() 1057 ct->proto.tcp.seen[ct->proto.tcp.last_dir].td_maxend = in nf_conntrack_tcp_packet() 1058 ct->proto.tcp.last_end; in nf_conntrack_tcp_packet() 1059 ct->proto.tcp.seen[ct->proto.tcp.last_dir].td_maxwin = in nf_conntrack_tcp_packet() 1062 ct->proto.tcp.seen[ct->proto.tcp.last_dir].td_scale = in nf_conntrack_tcp_packet() 1065 ct->proto.tcp.seen[ct->proto.tcp.last_dir].flags = in nf_conntrack_tcp_packet() 1073 ct->proto.tcp.last_end = in nf_conntrack_tcp_packet() [all …]
|
| H A D | nft_synproxy.c | 30 if (tcp->ece && tcp->cwr) in nft_synproxy_tcp_options() 47 const struct tcphdr *tcp, in nft_synproxy_eval_v4() argument 56 if (tcp->syn) { in nft_synproxy_eval_v4() 62 } else if (tcp->ack) { in nft_synproxy_eval_v4() 65 ntohl(tcp->seq))) { in nft_synproxy_eval_v4() 78 const struct tcphdr *tcp, in nft_synproxy_eval_v6() argument 87 if (tcp->syn) { in nft_synproxy_eval_v6() 93 } else if (tcp->ack) { in nft_synproxy_eval_v6() 96 ntohl(tcp->seq))) { in nft_synproxy_eval_v6() 113 const struct tcphdr *tcp; in nft_synproxy_do_eval() local [all …]
|
| H A D | nfnetlink_osf.c | 171 const struct tcphdr *tcp; in nf_osf_hdr_ctx_init() local 174 if (!tcp) in nf_osf_hdr_ctx_init() 177 if (!tcp->syn) in nf_osf_hdr_ctx_init() 182 ctx->window = ntohs(tcp->window); in nf_osf_hdr_ctx_init() 193 return tcp; in nf_osf_hdr_ctx_init() 209 const struct tcphdr *tcp; in nf_osf_match() local 215 if (!tcp) in nf_osf_match() 240 &ip->daddr, ntohs(tcp->dest), in nf_osf_match() 252 &ip->daddr, ntohs(tcp->dest)); in nf_osf_match() 270 const struct tcphdr *tcp; in nf_osf_find() local [all …]
|
| /linux-6.15/tools/testing/selftests/bpf/progs/ |
| H A D | test_tcp_custom_syncookie.c | 63 struct tcphdr *tcp; member 133 if (ctx->tcp->doff < sizeof(*ctx->tcp) / 4) in tcp_reload_headers() 180 csum = bpf_csum_diff(0, 0, (void *)ctx->tcp, ctx->tcp->doff * 4, 0); in tcp_validate_header() 306 if (!ctx->tcp->ece || !ctx->tcp->cwr) in tcp_validate_sysctl() 340 second = (u64)seq << 32 | ctx->tcp->source << 16 | ctx->tcp->dest; in tcp_prepare_cookie() 358 if (ctx->attrs.tstamp_ok && ctx->tcp->ece && ctx->tcp->cwr) in tcp_prepare_cookie() 414 swap(ctx->tcp->source, ctx->tcp->dest); in tcp_handle_syn() 416 ctx->tcp->ack_seq = bpf_htonl(bpf_ntohl(ctx->tcp->seq) + 1); in tcp_handle_syn() 418 ctx->tcp->doff = ((long)ctx->ptr32 - (long)ctx->tcp) >> 2; in tcp_handle_syn() 420 if (!ctx->attrs.tstamp_ok || !ctx->tcp->ece || !ctx->tcp->cwr) in tcp_handle_syn() [all …]
|
| H A D | test_pkt_access.c | 89 struct tcphdr *tcp = NULL; in test_pkt_write_access_subprog() local 94 tcp = data + off; in test_pkt_write_access_subprog() 95 if (tcp + 1 > data_end) in test_pkt_write_access_subprog() 98 tcp->check++; in test_pkt_write_access_subprog() 108 struct tcphdr *tcp = NULL; in test_pkt_access() local 122 tcp = (struct tcphdr *)((void *)(iph) + ihl_len); in test_pkt_access() 130 tcp = (struct tcphdr *)((void *)(ip6h) + ihl_len); in test_pkt_access() 139 if (tcp) { in test_pkt_access() 142 if (((void *)(tcp) + 20) > data_end || proto != 6) in test_pkt_access() 145 if (((void *)(tcp) + 18) > data_end) in test_pkt_access() [all …]
|
| H A D | xdp_synproxy_kern.c | 371 struct tcphdr *tcp; member 421 if (hdr->tcp + 1 > data_end) in tcp_dissect() 423 hdr->tcp_len = hdr->tcp->doff * 4; in tcp_dissect() 450 tup.ipv4.dport = hdr->tcp->dest; in tcp_lookup() 456 tup.ipv6.dport = hdr->tcp->dest; in tcp_lookup() 610 if (hdr->tcp->fin || hdr->tcp->rst) in syncookie_handle_syn() 675 __builtin_memmove(new_tcp_header, hdr->tcp, sizeof(*hdr->tcp)); in syncookie_handle_syn() 676 hdr->tcp = new_tcp_header; in syncookie_handle_syn() 689 hdr->tcp->check = 0; in syncookie_handle_syn() 735 if (hdr->tcp->rst) in syncookie_handle_ack() [all …]
|
| H A D | test_migrate_reuseport.c | 50 struct tcphdr *tcp = NULL; in drop_ack() local 65 tcp = (struct tcphdr *)((void *)ip + ip->ihl * 4); in drop_ack() 77 tcp = (struct tcphdr *)(ipv6 + 1); in drop_ack() 84 if (tcp + 1 > data_end) in drop_ack() 87 if (tcp->dest != server_port) in drop_ack() 90 if (!tcp->syn && tcp->ack) in drop_ack()
|
| H A D | skb_pkt_end.c | 34 struct tcphdr *tcp; in main_prog() local 47 tcp = (void*)(ip + 1); in main_prog() 48 if (tcp->dest != 0) in main_prog() 50 if (!tcp) in main_prog() 53 urg_ptr = tcp->urg_ptr; in main_prog()
|
| H A D | bpf_iter_tcp6.c | 69 static bool tcp_in_initial_slowstart(const struct tcp_sock *tcp) in tcp_in_initial_slowstart() argument 71 return tcp->snd_ssthresh >= TCP_INFINITE_SSTHRESH; in tcp_in_initial_slowstart() 88 icsk = &tp->tcp.inet_conn; in dump_tcp6_sock() 118 rx_queue = tp->tcp.rcv_nxt - tp->tcp.copied_seq; in dump_tcp6_sock() 131 tp->tcp.write_seq - tp->tcp.snd_una, rx_queue, in dump_tcp6_sock() 143 tp->tcp.snd_cwnd, in dump_tcp6_sock() 145 : (tcp_in_initial_slowstart(&tp->tcp) ? -1 in dump_tcp6_sock() 146 : tp->tcp.snd_ssthresh) in dump_tcp6_sock()
|
| H A D | xdpwall.c | 173 static __always_inline bool tcphdr_only_contains_flag(struct tcphdr *tcp, in tcphdr_only_contains_flag() argument 176 return (tcp_flag_word(tcp) & in tcphdr_only_contains_flag() 181 struct tcphdr *tcp) { in set_tcp_flags() argument 182 if (tcphdr_only_contains_flag(tcp, TCP_FLAG_SYN)) in set_tcp_flags() 184 else if (tcphdr_only_contains_flag(tcp, TCP_FLAG_ACK)) in set_tcp_flags() 186 else if (tcphdr_only_contains_flag(tcp, TCP_FLAG_RST)) in set_tcp_flags() 193 struct tcphdr *tcp = transport_hdr; in parse_tcp() local 195 if (tcp + 1 > data_end) in parse_tcp() 198 info->sport = bpf_ntohs(tcp->source); in parse_tcp() 199 info->dport = bpf_ntohs(tcp->dest); in parse_tcp() [all …]
|
| H A D | test_assign_reuse.c | 20 struct tcphdr tcp; member 39 if (ctx->data + sizeof(headers.tcp) > ctx->data_end) in reuse_accept() 42 if (__builtin_memcmp(&headers.tcp, ctx->data, sizeof(headers.tcp)) != 0) in reuse_accept() 89 __builtin_memcpy(&headers.tcp, th, sizeof(headers.tcp)); in maybe_assign_tcp()
|
| H A D | fexit_bpf2bpf.c | 162 struct tcphdr *tcp; in new_test_pkt_write_access_subprog() local 167 tcp = data + off; in new_test_pkt_write_access_subprog() 168 if (tcp + 1 > data_end) in new_test_pkt_write_access_subprog() 172 tcp->check++; in new_test_pkt_write_access_subprog() 173 tcp->syn = 0; in new_test_pkt_write_access_subprog()
|
| /linux-6.15/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 21 struct tcphdr tcp; member 28 struct tcphdr tcp; member 36 struct tcphdr tcp; member 42 struct tcphdr tcp; member 54 struct tcphdr tcp; member 64 struct tcphdr tcp; member 77 struct tcphdr tcp; member 106 .tcp.doff = 5, 127 .tcp.doff = 5, 150 .tcp.doff = 5, [all …]
|
| /linux-6.15/tools/testing/selftests/net/netfilter/packetdrill/ |
| H A D | conntrack_rst_invalid.pkt | 6 +0 `$xtables -A INPUT -p tcp -m conntrack --ctstate INVALID -j DROP` 7 +0 `$xtables -A OUTPUT -p tcp -m conntrack --ctstate INVALID -j DROP` 31 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 35 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 39 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 44 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 49 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q ESTABLISHED` 59 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null |grep -q CLOSE\ `
|
| H A D | conntrack_synack_old.pkt | 17 +0 `$xtables -A INPUT -p tcp -m conntrack --ctstate INVALID -j DROP` 18 +0 `$xtables -A OUTPUT -p tcp -m conntrack --ctstate INVALID -j DROP` 31 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null | grep UNREPLIED | grep -q SYN… 40 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null | grep ESTABLISHED | grep -q A… 44 +0 `conntrack -f $NFCT_IP_VERSION -L -p tcp --dport 8080 2>/dev/null | grep ASSURED | grep -q ESTAB… 50 +0 `$xtables -D INPUT -p tcp -m conntrack --ctstate INVALID -j DROP` 51 +0 `$xtables -D OUTPUT -p tcp -m conntrack --ctstate INVALID -j DROP`
|
| /linux-6.15/samples/bpf/ |
| H A D | parse_varlen.c | 22 static int tcp(void *data, uint64_t tp_off, void *data_end) in tcp() function 24 struct tcphdr *tcp = data + tp_off; in tcp() local 26 if (tcp + 1 > data_end) in tcp() 28 if (tcp->dest == htons(80) || tcp->source == htons(80)) in tcp() 72 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv4() 106 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv6()
|
| /linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
| H A D | ct_fs_hmfs.c | 40 static u32 get_matcher_idx(bool ipv4, bool tcp, bool gre) in get_matcher_idx() argument 42 return ipv4 * 3 + tcp * 2 + gre; in get_matcher_idx() 94 struct mlx5_flow_spec *spec, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_hmfs_matcher_create() argument 101 u32 priority = get_matcher_idx(ipv4, tcp, gre); /* Static priority based on params. */ in mlx5_ct_fs_hmfs_matcher_create() 113 bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_hmfs_matcher_get() argument 116 u32 matcher_idx = get_matcher_idx(ipv4, tcp, gre); in mlx5_ct_fs_hmfs_matcher_get() 136 hws_bwc_matcher = mlx5_ct_fs_hmfs_matcher_create(fs, tbl, spec, ipv4, tcp, gre); in mlx5_ct_fs_hmfs_matcher_get() 140 nat, ipv4, tcp, gre, PTR_ERR(hws_bwc_matcher)); in mlx5_ct_fs_hmfs_matcher_get() 198 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_hmfs_ct_rule_add() local 210 tcp = MLX5_GET(fte_match_param, spec->match_value, in mlx5_ct_fs_hmfs_ct_rule_add() [all …]
|
| H A D | ct_fs_smfs.c | 46 mlx5_ct_fs_smfs_fill_mask(struct mlx5_ct_fs *fs, struct mlx5_flow_spec *spec, bool ipv4, bool tcp, in mlx5_ct_fs_smfs_fill_mask() argument 75 if (likely(tcp)) { in mlx5_ct_fs_smfs_fill_mask() 90 bool tcp, bool gre, u32 priority) in mlx5_ct_fs_smfs_matcher_create() argument 99 mlx5_ct_fs_smfs_fill_mask(fs, spec, ipv4, tcp, gre); in mlx5_ct_fs_smfs_matcher_create() 111 mlx5_ct_fs_smfs_matcher_get(struct mlx5_ct_fs *fs, bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_smfs_matcher_get() argument 122 smfs_matcher = &matchers->smfs_matchers[ipv4 * 3 + tcp * 2 + gre]; in mlx5_ct_fs_smfs_matcher_get() 148 dr_matcher = mlx5_ct_fs_smfs_matcher_create(fs, tbl, ipv4, tcp, gre, prio); in mlx5_ct_fs_smfs_matcher_get() 152 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get() 232 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_smfs_ct_rule_add() local 253 tcp = MLX5_GET(fte_match_param, spec->match_value, in mlx5_ct_fs_smfs_ct_rule_add() [all …]
|
| /linux-6.15/drivers/net/ethernet/chelsio/libcxgb/ |
| H A D | libcxgb_cm.c | 54 struct tcphdr *tcp = (struct tcphdr *) in cxgb_get_4tuple() local 60 ntohs(tcp->source), ntohs(tcp->dest)); in cxgb_get_4tuple() 67 ntohs(tcp->source), ntohs(tcp->dest)); in cxgb_get_4tuple() 72 *peer_port = tcp->source; in cxgb_get_4tuple() 73 *local_port = tcp->dest; in cxgb_get_4tuple()
|
| /linux-6.15/Documentation/netlink/specs/ |
| H A D | tcp_metrics.yaml | 10 c-family-name: tcp-metrics-genl-name 11 c-version-name: tcp-metrics-genl-version 17 name: tcp-fastopen-cookie-max 23 name: tcp-metrics 24 name-prefix: tcp-metrics-attr- 66 min-len: tcp-fastopen-cookie-max 134 attribute-set: tcp-metrics 163 attribute-set: tcp-metrics
|
| H A D | conntrack.yaml | 26 name: nf-ct-tcp-flags-mask 32 enum: nf-ct-tcp-flags 37 enum: nf-ct-tcp-flags 40 name: nf-ct-tcp-flags 52 name: nf-ct-tcp-state 214 name: protoinfo-tcp-attrs 217 name: tcp-state 219 enum: nf-ct-tcp-state 226 name: tcp-wscale-reply 234 name: tcp-flags-reply [all …]
|
| /linux-6.15/tools/testing/selftests/net/netfilter/ |
| H A D | conntrack_tcp_unreplied.sh | 91 ct state new tcp flags syn ip daddr 10.99.99.99 tcp dport 80 counter name "connreq" accept 92 ct state new ct status dnat tcp dport 8080 counter name "redir" accept 111 count=$(ip netns exec "$ns2" conntrack -L -p tcp --dport 80 2>/dev/null | wc -l) 130 ip daddr 10.99.99.99 tcp dport 80 redirect to :8080 141 count=$(ip netns exec "$ns2" conntrack -L -p tcp --reply-port-src 8080 2>/dev/null | wc -l)
|
| /linux-6.15/net/ipv4/netfilter/ |
| H A D | nf_nat_h323.c | 290 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in nat_t120() 310 ntohs(exp->tuple.src.u.tcp.port), in nat_t120() 312 ntohs(exp->tuple.dst.u.tcp.port)); in nat_t120() 329 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in nat_h245() 357 ntohs(exp->tuple.src.u.tcp.port), in nat_h245() 359 ntohs(exp->tuple.dst.u.tcp.port)); in nat_h245() 408 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in nat_q931() 449 ntohs(exp->tuple.src.u.tcp.port), in nat_q931() 451 ntohs(exp->tuple.dst.u.tcp.port)); in nat_q931() 492 exp->saved_proto.tcp.port = exp->tuple.dst.u.tcp.port; in nat_callforwarding() [all …]
|
| /linux-6.15/tools/testing/selftests/net/forwarding/ |
| H A D | sch_red.sh | 257 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01) 270 -a own -b $h3_mac -t tcp -q tos=0x01 & 291 -a own -b $h3_mac -t tcp -q tos=0x01 & 315 -a own -b $h3_mac -t tcp -q tos=0x01 & 320 backlog=$(build_backlog $((2 * limit / 3)) tcp tos=0x01) 328 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01) 385 -a own -b $h3_mac -t tcp -q tos=0x01 & 392 backlog=$(build_backlog $((2 * limit / 3)) tcp tos=0x01) 397 backlog=$(build_backlog $((3 * limit / 2)) tcp tos=0x01)
|
| /linux-6.15/drivers/net/ethernet/qlogic/qed/ |
| H A D | qed_iwarp.c | 590 p_tcp_ramrod->tcp.local_ip, in qed_iwarp_print_tcp_ramrod() 594 p_tcp_ramrod->tcp.vlan_id); in qed_iwarp_print_tcp_ramrod() 608 p_tcp_ramrod->tcp.ttl, in qed_iwarp_print_tcp_ramrod() 610 p_tcp_ramrod->tcp.mss, in qed_iwarp_print_tcp_ramrod() 613 p_tcp_ramrod->tcp.flags); in qed_iwarp_print_tcp_ramrod() 675 tcp = &p_tcp_ramrod->tcp; in qed_iwarp_tcp_offload() 679 qed_set_fw_mac_addr(&tcp->local_mac_addr_hi, &tcp->local_mac_addr_mid, in qed_iwarp_tcp_offload() 703 tcp->flow_label = 0; in qed_iwarp_tcp_offload() 704 tcp->ttl = 0x40; in qed_iwarp_tcp_offload() 705 tcp->tos_or_tc = 0; in qed_iwarp_tcp_offload() [all …]
|