tools/testing/selftests/net/netfilter/nft_concat_range.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/netfilter/nft_concat_range.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/netfilter/nft_concat_range.sh- Extension
.sh- Size
- 51738 bytes
- Lines
- 2133
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: tools
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function Bfunction send_icmp6function send_udpfunction send_udpfunction send_udpfunction send_udp6function send_udp6function send_udp6function flood_tcpfunction flood_tcpfunction flood_tcpfunction flood_tcp6function flood_tcp6function flood_tcp6function flood_udpfunction flood_udpfunction flood_udpfunction perf_ipv4
Annotated Snippet
send_icmp6() {
ip -6 addr add "${dst_addr6}" dev veth_a nodad \
2>/dev/null
B ping6 -q -c1 -W1 "${dst_addr6}"
}
else
send_icmp6() {
ip -6 addr add "${dst_addr6}" dev veth_a nodad \
2>/dev/null
B ping -q -6 -c1 -W1 "${dst_addr6}"
}
fi
}
# Set up function to send single UDP packets on IPv4
setup_send_udp() {
if command -v sendip >/dev/null; then
send_udp() {
[ -n "${src_port}" ] && src_port="-us ${src_port}"
[ -n "${dst_port}" ] && dst_port="-ud ${dst_port}"
[ -n "${src_addr4}" ] && src_addr4="-is ${src_addr4}"
# shellcheck disable=SC2086 # sendip needs split options
B sendip -p ipv4 -p udp ${src_addr4} ${src_port} \
${dst_port} "${dst_addr4}"
src_port=
dst_port=
src_addr4=
}
elif command -v socat -v >/dev/null; then
send_udp() {
if [ -n "${src_addr4}" ]; then
B ip addr add "${src_addr4}" dev veth_b
__socatbind=",bind=${src_addr4}"
if [ -n "${src_port}" ];then
__socatbind="${__socatbind}:${src_port}"
fi
fi
ip addr add "${dst_addr4}" dev veth_a 2>/dev/null
[ -z "${dst_port}" ] && dst_port=12345
echo "test4" | B socat -t 0.01 STDIN UDP4-DATAGRAM:"$dst_addr4":"$dst_port""${__socatbind}"
src_addr4=
src_port=
}
elif [ -z "$(bash -c 'type -p')" ]; then
send_udp() {
ip addr add "${dst_addr4}" dev veth_a 2>/dev/null
if [ -n "${src_addr4}" ]; then
B ip addr add "${src_addr4}/16" dev veth_b
B ip route add default dev veth_b
fi
B bash -c "echo > /dev/udp/${dst_addr4}/${dst_port}"
if [ -n "${src_addr4}" ]; then
B ip addr del "${src_addr4}/16" dev veth_b
fi
src_addr4=
}
else
return 1
fi
}
# Set up function to send single UDP packets on IPv6
setup_send_udp6() {
Annotation
- Detected declarations: `function B`, `function send_icmp6`, `function send_udp`, `function send_udp`, `function send_udp`, `function send_udp6`, `function send_udp6`, `function send_udp6`, `function flood_tcp`, `function flood_tcp`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.