tools/testing/selftests/net/forwarding/router_multicast.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/router_multicast.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/router_multicast.sh- Extension
.sh- Size
- 14614 bytes
- Lines
- 484
- 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
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
# +------------------+
# | H1 (v$h1) |
# | 2001:db8:1::2/64 |
# | 198.51.100.2/28 |
# | $h1 + |
# +-------------|----+
# |
# +-------------|-------------------------------+
# | SW1 | |
# | $rp1 + |
# | 198.51.100.1/28 |
# | 2001:db8:1::1/64 |
# | |
# | 2001:db8:2::1/64 2001:db8:3::1/64 |
# | 198.51.100.17/28 198.51.100.33/28 |
# | $rp2 + $rp3 + |
# +--------------|--------------------------|---+
# | |
# | |
# +--------------|---+ +--------------|---+
# | H2 (v$h2) | | | H3 (v$h3) | |
# | $h2 + | | $h3 + |
# | 198.51.100.18/28 | | 198.51.100.34/28 |
# | 2001:db8:2::2/64 | | 2001:db8:3::2/64 |
# +------------------+ +------------------+
#
ALL_TESTS="mcast_v4 mcast_v6 rpf_v4 rpf_v6 unres_v4 unres_v6"
NUM_NETIFS=6
source lib.sh
source tc_common.sh
h1_create()
{
simple_if_init $h1 198.51.100.2/28 2001:db8:1::2/64
ip route add 198.51.100.16/28 vrf v$h1 nexthop via 198.51.100.1
ip route add 198.51.100.32/28 vrf v$h1 nexthop via 198.51.100.1
ip route add 2001:db8:2::/64 vrf v$h1 nexthop via 2001:db8:1::1
ip route add 2001:db8:3::/64 vrf v$h1 nexthop via 2001:db8:1::1
tc qdisc add dev $h1 ingress
}
h1_destroy()
{
tc qdisc del dev $h1 ingress
ip route del 2001:db8:3::/64 vrf v$h1
ip route del 2001:db8:2::/64 vrf v$h1
ip route del 198.51.100.32/28 vrf v$h1
ip route del 198.51.100.16/28 vrf v$h1
simple_if_fini $h1 198.51.100.2/28 2001:db8:1::2/64
}
h2_create()
{
simple_if_init $h2 198.51.100.18/28 2001:db8:2::2/64
ip route add 198.51.100.0/28 vrf v$h2 nexthop via 198.51.100.17
ip route add 198.51.100.32/28 vrf v$h2 nexthop via 198.51.100.17
ip route add 2001:db8:1::/64 vrf v$h2 nexthop via 2001:db8:2::1
ip route add 2001:db8:3::/64 vrf v$h2 nexthop via 2001:db8:2::1
Annotation
- 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.