Home
last modified time | relevance | path

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

12345678910>>...41

/linux/tools/testing/selftests/net/packetdrill/
H A 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/tools/testing/selftests/drivers/net/hw/
H A 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/tools/testing/selftests/bpf/progs/
H A 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 …]
H A 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 …]
H A 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 …]
H A 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 …]
H A Dtest_cls_redirect_dynptr.c88 offsetofend(struct bpf_sock_tuple, ipv4.dport) -
89 offsetof(struct bpf_sock_tuple, ipv4.sport) - 1,
135 /* skip ipv4 options */ in pkt_parse_ipv4()
160 /* The highest reasonable value for an IPv4 header in pkt_checksum_fold()
359 /* IPv4 also has a checksum to patch. While the TTL is only one byte, in forward_with_gre()
509 * IPv4 and IPv6.
516 struct iphdr *ipv4 = (struct iphdr *)iph; in fill_tuple() local
517 tuple->ipv4.daddr = ipv4->daddr; in fill_tuple()
518 tuple->ipv4.saddr = ipv4->saddr; in fill_tuple()
519 tuple->ipv4.sport = sport; in fill_tuple()
[all …]
/linux/tools/testing/selftests/net/
H A 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 …]
H A Dnat6to4.bpf.c76 // Maximum IPv6 payload length that can be translated to IPv4 in sched_cls_ingress6_nat_6_prog()
108 // Calculate the IPv4 one's complement checksum of the IPv4 header. in sched_cls_ingress6_nat_6_prog()
144 // Copy over the new ipv4 header. in sched_cls_ingress6_nat_6_prog()
158 // Must be meta-ethernet IPv4 frame in sched_cls_egress4_snat4_prog()
162 // Must have ipv4 header in sched_cls_egress4_snat4_prog()
166 // Ethertype - if present - must be IPv4 in sched_cls_egress4_snat4_prog()
174 // We cannot handle IP options, just standard 20 byte == 5 dword minimal IPv4 header in sched_cls_egress4_snat4_prog()
178 // Maximum IPv6 payload length that can be translated to IPv4 in sched_cls_egress4_snat4_prog()
182 // Calculate the IPv4 one's complement checksum of the IPv4 header. in sched_cls_egress4_snat4_prog()
195 // Minimum IPv4 total length is the size of the header in sched_cls_egress4_snat4_prog()
[all …]
/linux/drivers/infiniband/hw/irdma/
H A 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/net/netfilter/ipset/
H A 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/tools/testing/selftests/net/forwarding/
H A Dlocal_termination.sh247 check_rcv $rcv_if_name "Unicast IPv4 to primary MAC address" \
248 "$smac > $rcv_dmac, ethertype IPv4 (0x0800)" \
251 check_rcv $rcv_if_name "Unicast IPv4 to macvlan MAC address" \
252 "$smac > $MACVLAN_ADDR, ethertype IPv4 (0x0800)" \
256 check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \
257 "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \
260 check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address, promisc" \
261 "$smac > $UNKNOWN_UC_ADDR2, ethertype IPv4 (0x0800)" \
266 "Unicast IPv4 to unknown MAC address, allmulti" \
267 "$smac > $UNKNOWN_UC_ADDR3, ethertype IPv4 (0x0800)" \
[all …]
H A 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 …]
H A 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/net/ipv4/
H A 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()
H A Dtcp_ipv4.c9 * IPv4 specific functions
12 * linux/ipv4/tcp.c
13 * linux/ipv4/tcp_input.c
14 * linux/ipv4/tcp_output.c
44 * Alexey Kuznetsov allow both IPv4 and IPv6 sockets to bind
118 int reuse = READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tw_reuse); in tcp_twsk_unique()
167 READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_tw_reuse_delay); in tcp_twsk_unique()
270 tcp_death_row = &sock_net(sk)->ipv4.tcp_death_row; in tcp_v4_connect()
508 sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, in tcp_v4_err()
672 /* This routine computes an IPv4 TCP checksum. */
[all …]
/linux/drivers/net/ethernet/mediatek/
H A 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/tools/testing/selftests/bpf/
H A 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/tools/testing/selftests/net/netfilter/
H A 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/samples/bpf/
H A 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/drivers/net/ethernet/wangxun/libwx/
H A 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/include/net/sctp/
H A 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/tools/testing/selftests/tc-testing/tc-tests/filters/
H A Dmatchall.json4 "name": "Add ingress matchall filter for protocol ipv4 and action PASS",
26 "name": "Add egress matchall filter for protocol ipv4 and action PASS",
92 …"name": "Add ingress matchall filter for protocol ipv4 and action PASS with priority at 16-bit max…
103 …"cmdUnderTest": "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 65535 protocol ipv4 matcha…
105 … "verifyCmd": "$TC filter get dev $DUMMY parent ffff: handle 1 prio 65535 protocol ipv4 matchall",
114 …"name": "Add egress matchall filter for protocol ipv4 and action PASS with priority at 16-bit maxi…
125 …"cmdUnderTest": "$TC filter add dev $DUMMY parent 1: handle 0x1 prio 65535 protocol ipv4 matchall …
127 … "verifyCmd": "$TC filter get dev $DUMMY parent 1: handle 1 prio 65535 protocol ipv4 matchall",
136 …"name": "Add ingress matchall filter for protocol ipv4 and action PASS with priority exceeding 16-…
147 …: "$TC filter add dev $DUMMY parent ffff: handle 0x1 prio 655355 protocol ipv4 matchall action pas…
[all …]
/linux/tools/testing/selftests/net/netfilter/packetdrill/
H A 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/Documentation/netlink/specs/
H A Dtcp_metrics.yaml27 name: addr-ipv4
30 display-hint: ipv4
68 name: saddr-ipv4
71 display-hint: ipv4
141 - addr-ipv4
143 - saddr-ipv4
147 - addr-ipv4
149 - saddr-ipv4

12345678910>>...41