Home
last modified time | relevance | path

Searched full:ipv4 (Results 1 – 25 of 1194) sorted by relevance

12345678910>>...48

/linux-6.12.1/net/ipv4/
Dsysctl_net_ipv4.c3 * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem.
6 * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS]
57 if (same_parity && !net->ipv4.ip_local_ports.warned) { in set_local_port_range()
58 net->ipv4.ip_local_ports.warned = true; in set_local_port_range()
61 WRITE_ONCE(net->ipv4.ip_local_ports.range, high << 16 | low); in set_local_port_range()
89 (range[0] < READ_ONCE(net->ipv4.sysctl_ip_prot_sock))) in ipv4_local_port_range()
103 ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
115 pports = READ_ONCE(net->ipv4.sysctl_ip_prot_sock); in ipv4_privileged_ports()
127 WRITE_ONCE(net->ipv4.sysctl_ip_prot_sock, pports); in ipv4_privileged_ports()
138 container_of(table->data, struct net, ipv4.ping_group_range.range); in inet_get_ping_group_range_table()
[all …]
Dtcp_plb.c30 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state()
34 if (cong_ratio < READ_ONCE(net->ipv4.sysctl_tcp_plb_cong_thresh)) in tcp_plb_update_state()
37 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds)) in tcp_plb_update_state()
52 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_check_rehash()
56 READ_ONCE(net->ipv4.sysctl_tcp_plb_rehash_rounds); in tcp_plb_check_rehash()
58 idle_rehash = READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds) && in tcp_plb_check_rehash()
61 READ_ONCE(net->ipv4.sysctl_tcp_plb_idle_rehash_rounds); in tcp_plb_check_rehash()
71 max_suspend = 2 * READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_check_rehash()
96 if (!READ_ONCE(net->ipv4.sysctl_tcp_plb_enabled)) in tcp_plb_update_state_upon_rto()
99 pause = READ_ONCE(net->ipv4.sysctl_tcp_plb_suspend_rto_sec) * HZ; in tcp_plb_update_state_upon_rto()
/linux-6.12.1/tools/testing/selftests/net/packetdrill/
Ddefaults.sh10 sysctl -q net.ipv4.tcp_rmem="4096 540000 $((15*1024*1024))"
11 sysctl -q net.ipv4.tcp_wmem="4096 $((256*1024)) 4194304"
14 sysctl -q net.ipv4.tcp_timestamps=1
17 sysctl -q net.ipv4.tcp_syn_retries=5
18 sysctl -q net.ipv4.tcp_synack_retries=5
21 sysctl -q net.ipv4.tcp_frto=2
24 sysctl -q net.ipv4.tcp_sack=1
27 sysctl -q net.ipv4.tcp_dsack=1
30 sysctl -q net.ipv4.tcp_fack=0
33 sysctl -q net.ipv4.tcp_reordering=3
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/
Dtest_flow_dissector.sh104 echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
105 echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
106 echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
108 echo "Testing IPv4..."
113 # Send 10 IPv4/UDP packets from port 8. Filter should not drop any.
115 # Send 10 IPv4/UDP packets from port 9. Filter should drop all.
117 # Send 10 IPv4/UDP packets from port 10. Filter should not drop any.
120 echo "Testing IPv4 from 127.0.0.127 (fallback to generic dissector)..."
121 # Send 10 IPv4/UDP packets from port 8. Filter should not drop any.
123 # Send 10 IPv4/UDP packets from port 9. Filter should drop all.
[all …]
Dtest_lwt_ip_encap.sh117 ip netns exec ${NS1} sysctl -wq net.ipv4.conf.all.rp_filter=0
118 ip netns exec ${NS2} sysctl -wq net.ipv4.conf.all.rp_filter=0
119 ip netns exec ${NS3} sysctl -wq net.ipv4.conf.all.rp_filter=0
120 ip netns exec ${NS1} sysctl -wq net.ipv4.conf.default.rp_filter=0
121 ip netns exec ${NS2} sysctl -wq net.ipv4.conf.default.rp_filter=0
122 ip netns exec ${NS3} sysctl -wq net.ipv4.conf.default.rp_filter=0
137 ip netns exec ${NS2} sysctl -wq net.ipv4.ip_forward=1
241 # configure IPv4 GRE device in NS3, and a route to it via the "bottom" route
297 if [ "${PROTO}" == "IPv4" ] ; then
330 if [ "${PROTO}" == "IPv4" ] ; then
[all …]
/linux-6.12.1/tools/testing/selftests/drivers/net/hw/
Dcsum.py12 def test_receive(cfg, ipv4=False, extra_args=None): argument
17 if ipv4:
30 def test_transmit(cfg, ipv4=False, extra_args=None): argument
33 not (cfg.have_tx_csum_ipv4 and ipv4) and
34 not (cfg.have_tx_csum_ipv6 and not ipv4)):
37 if ipv4:
54 def test_builder(name, cfg, ipv4=False, tx=False, extra_args=""): argument
60 if ipv4:
66 test_transmit(cfg, ipv4, extra_args)
68 test_receive(cfg, ipv4, extra_args)
[all …]
/linux-6.12.1/tools/testing/selftests/bpf/progs/
Dtest_bpf_nf.c100 __builtin_memset(&bpf_tuple, 0, sizeof(bpf_tuple.ipv4)); in nf_ct_test()
109 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
119 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
127 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
135 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
144 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
152 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4), &opts_def, in nf_ct_test()
159 ct = lookup_fn(ctx, &bpf_tuple, sizeof(bpf_tuple.ipv4) - 1, &opts_def, in nf_ct_test()
166 bpf_tuple.ipv4.saddr = bpf_get_prandom_u32(); /* src IP */ in nf_ct_test()
167 bpf_tuple.ipv4.daddr = bpf_get_prandom_u32(); /* dst IP */ in nf_ct_test()
[all …]
Dxdp_synproxy_kern.c370 struct iphdr *ipv4; member
387 hdr->ipv4 = (void *)hdr->eth + sizeof(*hdr->eth); in tcp_dissect()
388 if (hdr->ipv4 + 1 > data_end) in tcp_dissect()
390 if (hdr->ipv4->ihl * 4 < sizeof(*hdr->ipv4)) in tcp_dissect()
392 if (hdr->ipv4->version != 4) in tcp_dissect()
395 if (hdr->ipv4->protocol != IPPROTO_TCP) in tcp_dissect()
398 hdr->tcp = (void *)hdr->ipv4 + hdr->ipv4->ihl * 4; in tcp_dissect()
401 hdr->ipv4 = NULL; in tcp_dissect()
441 if (hdr->ipv4) { in tcp_lookup()
445 if ((hdr->ipv4->frag_off & bpf_htons(IP_DF | IP_MF | IP_OFFSET)) != bpf_htons(IP_DF)) in tcp_lookup()
[all …]
Dtest_tcp_custom_syncookie.c61 struct iphdr *ipv4; member
84 ctx->ipv4 = (struct iphdr *)(ctx->eth + 1); in tcp_load_headers()
86 if (ctx->ipv4 + 1 > ctx->data_end) in tcp_load_headers()
89 if (ctx->ipv4->ihl != sizeof(*ctx->ipv4) / 4) in tcp_load_headers()
92 if (ctx->ipv4->version != 4) in tcp_load_headers()
95 if (ctx->ipv4->protocol != IPPROTO_TCP) in tcp_load_headers()
98 ctx->tcp = (struct tcphdr *)(ctx->ipv4 + 1); in tcp_load_headers()
143 if (ctx->ipv4) { in tcp_reload_headers()
144 ctx->ipv4 = (struct iphdr *)(ctx->eth + 1); in tcp_reload_headers()
146 ctx->tcp = (struct tcphdr *)(ctx->ipv4 + 1); in tcp_reload_headers()
[all …]
Dtest_sk_assign.c55 get_tuple(struct __sk_buff *skb, bool *ipv4, bool *tcp) in get_tuple() argument
78 *ipv4 = true; in get_tuple()
87 *ipv4 = false; in get_tuple()
102 handle_udp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_udp() argument
110 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_udp()
118 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_udp()
133 handle_tcp(struct __sk_buff *skb, struct bpf_sock_tuple *tuple, bool ipv4) in handle_tcp() argument
141 tuple_len = ipv4 ? sizeof(tuple->ipv4) : sizeof(tuple->ipv6); in handle_tcp()
152 dport = ipv4 ? tuple->ipv4.dport : tuple->ipv6.dport; in handle_tcp()
175 bool ipv4 = false; in bpf_sk_assign_test() local
[all …]
Dtest_cls_redirect.c94 offsetofend(struct bpf_sock_tuple, ipv4.dport) -
95 offsetof(struct bpf_sock_tuple, ipv4.sport) - 1,
201 static INLINING bool pkt_skip_ipv4_options(buf_t *buf, const struct iphdr *ipv4) in pkt_skip_ipv4_options() argument
203 if (ipv4->ihl <= 5) { in pkt_skip_ipv4_options()
207 return buf_skip(buf, (ipv4->ihl - 5) * 4); in pkt_skip_ipv4_options()
218 struct iphdr *ipv4 = buf_assign(pkt, sizeof(*ipv4), scratch); in pkt_parse_ipv4() local
219 if (ipv4 == NULL) { in pkt_parse_ipv4()
223 if (ipv4->ihl < 5) { in pkt_parse_ipv4()
227 if (!pkt_skip_ipv4_options(pkt, ipv4)) { in pkt_parse_ipv4()
231 return ipv4; in pkt_parse_ipv4()
[all …]
/linux-6.12.1/tools/testing/selftests/net/
Dbareudp.sh8 # configurations of bareudp (using IPv4 or IPv6 as underlay and transporting
9 # IPv4, IPv6 or MPLS packets on the overlay).
14 # is assigned an IPv4 and an IPv6 address. A host-route allows a veth to
18 # IPv4 and IPv6 addresses on their loopback device. Routes are added in NS0
20 # For IPv4 and IPv6 reachability tests, the route simply sets the peer's
31 # | * IPv4 address: 192.0.2.100/32 |
34 # | * IPv4 route: 192.0.2.103/32 reachable via 192.0.2.11 |
40 # | ^ * IPv4 address: 192.0.2.10, peer 192.0.2.11/32 |
52 # | * IPv4 address: 192.0.2.11, peer 192.0.2.10/32 |
62 # | ^ * IPv4 address: 192.0.2.21, peer 192.0.2.22/32 |
[all …]
/linux-6.12.1/drivers/infiniband/hw/irdma/
Dtrace_cm.h15 #define __print_ip_addr(addr, port, ipv4) print_ip_addr(p, addr, port, ipv4) argument
26 __field(bool, ipv4)
30 __entry->ipv4 = cm_info->ipv4;
37 __entry->lport, __entry->ipv4)
48 __field(bool, ipv4)
53 __entry->ipv4 = listener->ipv4;
61 __entry->lport, __entry->ipv4)
71 __field(bool, ipv4)
79 __entry->ipv4 = listener->ipv4;
88 __entry->lport, __entry->ipv4)
[all …]
/linux-6.12.1/net/netfilter/ipset/
DKconfig33 can store IPv4 addresses (or network addresses) from a range.
42 can store IPv4 address and (source) MAC address pairs from a range.
60 can store arbitrary IPv4 or IPv6 addresses (or network addresses)
70 can store IPv4/IPv6 address and mark pairs.
79 can store IPv4/IPv6 address and protocol/port pairs.
88 one can store IPv4/IPv6 address, protocol/port, and IPv4/IPv6
98 one can store IPv4/IPv6 address, protocol/port, and IPv4/IPv6
108 one can store IPv4/IPv6 address and MAC (ethernet address) pairs in a set.
126 one can store two IPv4/IPv6 subnets, and a protocol/port in a set.
135 one can store IPv4/IPv6 network address/prefix elements in a set.
[all …]
/linux-6.12.1/tools/testing/selftests/net/forwarding/
Dlocal_termination.sh248 check_rcv $rcv_if_name "Unicast IPv4 to primary MAC address" \
249 "$smac > $rcv_dmac, ethertype IPv4 (0x0800)" \
252 check_rcv $rcv_if_name "Unicast IPv4 to macvlan MAC address" \
253 "$smac > $MACVLAN_ADDR, ethertype IPv4 (0x0800)" \
257 check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \
258 "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \
261 check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address, promisc" \
262 "$smac > $UNKNOWN_UC_ADDR2, ethertype IPv4 (0x0800)" \
267 "Unicast IPv4 to unknown MAC address, allmulti" \
268 "$smac > $UNKNOWN_UC_ADDR3, ethertype IPv4 (0x0800)" \
[all …]
Drouter_broadcast.sh146 sysctl_set net.ipv4.conf.all.bc_forwarding 0
147 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 0
148 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 0
153 sysctl_set net.ipv4.conf.all.bc_forwarding 1
154 sysctl_set net.ipv4.conf.$rp1.bc_forwarding 1
155 sysctl_set net.ipv4.conf.$rp2.bc_forwarding 1
160 sysctl_restore net.ipv4.conf.$rp2.bc_forwarding
161 sysctl_restore net.ipv4.conf.$rp1.bc_forwarding
162 sysctl_restore net.ipv4.conf.all.bc_forwarding
183 sysctl_set net.ipv4.icmp_echo_ignore_broadcasts 0
[all …]
Dgre_custom_multipath_hash.sh4 # Test traffic distribution when there are multiple paths between an IPv4 GRE
5 # tunnel. The tunnel carries IPv4 and IPv6 traffic between multiple hosts.
377 log_info "Running IPv4 overlay custom multipath hash tests"
381 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
382 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
383 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
385 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0040
389 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0080
393 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0400
397 sysctl_set net.ipv4.fib_multipath_hash_fields 0x0800
[all …]
/linux-6.12.1/drivers/net/ethernet/mediatek/
Dmtk_ppe_debugfs.c36 [MTK_PPE_PKT_TYPE_IPV4_HNAPT] = "IPv4 5T", in mtk_foe_pkt_type_str()
37 [MTK_PPE_PKT_TYPE_IPV4_ROUTE] = "IPv4 3T", in mtk_foe_pkt_type_str()
110 ai.src_port = &entry->ipv4.orig.src_port; in mtk_ppe_debugfs_foe_show()
111 ai.dest_port = &entry->ipv4.orig.dest_port; in mtk_ppe_debugfs_foe_show()
114 ai.src = &entry->ipv4.orig.src_ip; in mtk_ppe_debugfs_foe_show()
115 ai.dest = &entry->ipv4.orig.dest_ip; in mtk_ppe_debugfs_foe_show()
135 ai.src_port = &entry->ipv4.new.src_port; in mtk_ppe_debugfs_foe_show()
136 ai.dest_port = &entry->ipv4.new.dest_port; in mtk_ppe_debugfs_foe_show()
139 ai.src = &entry->ipv4.new.src_ip; in mtk_ppe_debugfs_foe_show()
140 ai.dest = &entry->ipv4.new.dest_ip; in mtk_ppe_debugfs_foe_show()
[all …]
/linux-6.12.1/samples/bpf/
Dtc_l2_redirect.sh10 RP_FILTER=$(< /proc/sys/net/ipv4/conf/all/rp_filter)
49 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0
50 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.ipt2.rp_filter=0
54 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.all.rp_filter=0
55 $IP netns exec ns2 sysctl -q -w net.ipv4.conf.ip6t2.rp_filter=0
66 sysctl -q -w net.ipv4.conf.all.rp_filter=0
80 sysctl -q -w net.ipv4.conf.all.rp_filter=$RP_FILTER
97 sysctl -q -w net.ipv4.conf.ipt.rp_filter=0
98 sysctl -q -w net.ipv4.conf.ipt.forwarding=1
103 sysctl -q -w net.ipv4.conf.ve1.forwarding=1
[all …]
/linux-6.12.1/tools/testing/selftests/net/netfilter/
Dipvs.sh47 sysipvsnet="/proc/sys/net/ipv4/vs/"
124 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=1
130 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_ignore=1
131 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.arp_announce=2
133 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.all.rp_filter=0
134 ip netns exec "${ns2}" sysctl -qw net.ipv4.conf.veth21.rp_filter=0
143 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=1
159 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=0
160 ip netns exec "${ns1}" sysctl -qw net.ipv4.conf.all.send_redirects=0
161 ip netns exec "${ns1}" sysctl -qw net.ipv4.conf.default.send_redirects=0
[all …]
/linux-6.12.1/net/ipv4/netfilter/
DKconfig18 tristate "IPv4 socket lookup support"
20 This option enables the IPv4 socket lookup infrastructure. This is
24 tristate "IPv4 tproxy support"
29 bool "IPv4 nf_tables support"
31 This option enables the IPv4 support for nf_tables.
41 tristate "IPv4 nf_tables packet duplication support"
45 This module enables IPv4 packet duplication support for nf_tables.
51 This module enables IPv4 FIB lookups, e.g. for reverse path filtering.
66 tristate "Netfilter IPv4 packet duplication to alternate destination"
69 This option enables the nf_dup_ipv4 core, which duplicates an IPv4
[all …]
/linux-6.12.1/drivers/net/ethernet/wangxun/libwx/
Dwx_lib.c34 [0x22] = WX_PTT(IP, IPV4, NONE, NONE, NONE, PAY3),
35 [0x23] = WX_PTT(IP, IPV4, NONE, NONE, UDP, PAY4),
36 [0x24] = WX_PTT(IP, IPV4, NONE, NONE, TCP, PAY4),
37 [0x25] = WX_PTT(IP, IPV4, NONE, NONE, SCTP, PAY4),
48 /* IPv4 --> IPv4/IPv6 */
49 [0x81] = WX_PTT(IP, IPV4, IPIP, FGV4, NONE, PAY3),
50 [0x82] = WX_PTT(IP, IPV4, IPIP, IPV4, NONE, PAY3),
51 [0x83] = WX_PTT(IP, IPV4, IPIP, IPV4, UDP, PAY4),
52 [0x84] = WX_PTT(IP, IPV4, IPIP, IPV4, TCP, PAY4),
53 [0x85] = WX_PTT(IP, IPV4, IPIP, IPV4, SCTP, PAY4),
[all …]
/linux-6.12.1/include/net/sctp/
Dconstants.h338 /* These are the address scopes defined mainly for IPv4 addresses
339 * based on draft of SCTP IPv4 scoping <draft-stewart-tsvwg-sctp-ipv4-00.txt>.
341 * IPv4 and IPv6 addresses in SCTP.
346 SCTP_SCOPE_GLOBAL, /* IPv4 global addresses */
347 SCTP_SCOPE_PRIVATE, /* IPv4 private addresses */
348 SCTP_SCOPE_LINK, /* IPv4 link local address */
349 SCTP_SCOPE_LOOPBACK, /* IPv4 loopback address */
350 SCTP_SCOPE_UNUSABLE, /* IPv4 unusable addresses */
354 SCTP_SCOPE_POLICY_DISABLE, /* Disable IPv4 address scoping */
355 SCTP_SCOPE_POLICY_ENABLE, /* Enable IPv4 address scoping */
[all …]
/linux-6.12.1/tools/testing/selftests/net/netfilter/packetdrill/
Dcommon.sh13 sysctl -q net.ipv4.tcp_rmem="4096 540000 $((15*1024*1024))"
14 sysctl -q net.ipv4.tcp_wmem="4096 $((256*1024)) 4194304"
17 sysctl -q net.ipv4.tcp_congestion_control=cubic
20 sysctl -q net.ipv4.tcp_slow_start_after_idle=0
23 sysctl -q net.ipv4.tcp_ecn=0
25 sysctl -q net.ipv4.tcp_notsent_lowat=4294967295 > /dev/null 2>&1
/linux-6.12.1/tools/testing/selftests/drivers/net/bonding/
Dbond_macvlan.sh63 check_connection "${c_ns}" "${s_ip4}" "IPv4: client->server"
65 check_connection "${c_ns}" "${m1_ip4}" "IPv4: client->macvlan_1"
67 check_connection "${c_ns}" "${m2_ip4}" "IPv4: client->macvlan_2"
69 check_connection "${m1_ns}" "${m2_ip4}" "IPv4: macvlan_1->macvlan_2"
75 check_connection "${s_ns}" "${c_ip4}" "IPv4: server->client"
77 check_connection "${m1_ns}" "${c_ip4}" "IPv4: macvlan_1->client"
79 check_connection "${m2_ns}" "${c_ip4}" "IPv4: macvlan_2->client"
81 check_connection "${m2_ns}" "${m1_ip4}" "IPv4: macvlan_2->macvlan_2"

12345678910>>...48