tools/testing/selftests/net/forwarding/ip6gre_lib.sh
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/forwarding/ip6gre_lib.sh
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/forwarding/ip6gre_lib.sh- Extension
.sh- Size
- 16124 bytes
- Lines
- 519
- 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
# SPDX-License-Identifier: GPL-2.0
#!/bin/bash
# Handles creation and destruction of IP-in-IP or GRE tunnels over the given
# topology. Supports both flat and hierarchical models.
#
# Flat Model:
# Overlay and underlay share the same VRF.
# SW1 uses default VRF so tunnel has no bound dev.
# SW2 uses non-default VRF tunnel has a bound dev.
# +--------------------------------+
# | H1 |
# | $h1 + |
# | 198.51.100.1/24 | |
# | 2001:db8:1::1/64 | |
# +-------------------------|------+
# |
# +-------------------------|-------------------+
# | SW1 | |
# | $ol1 + |
# | 198.51.100.2/24 |
# | 2001:db8:1::2/64 |
# | |
# | + g1a (ip6gre) |
# | loc=2001:db8:3::1 |
# | rem=2001:db8:3::2 --. |
# | tos=inherit | |
# | . |
# | .--------------------- |
# | | |
# | v |
# | + $ul1.111 (vlan) |
# | | 2001:db8:10::1/64 |
# | \ |
# | \____________ |
# | | |
# | VRF default + $ul1 |
# +---------------------|-----------------------+
# |
# +---------------------|-----------------------+
# | SW2 | |
# | $ul2 + |
# | ___________| |
# | / |
# | / |
# | + $ul2.111 (vlan) |
# | ^ 2001:db8:10::2/64 |
# | | |
# | | |
# | '----------------------. |
# | + g2a (ip6gre) | |
# | loc=2001:db8:3::2 | |
# | rem=2001:db8:3::1 --' |
# | tos=inherit |
# | |
# | + $ol2 |
# | | 203.0.113.2/24 |
# | VRF v$ol2 | 2001:db8:2::2/64 |
# +---------------------|-----------------------+
# +---------------------|----------+
# | H2 | |
# | $h2 + |
# | 203.0.113.1/24 |
# | 2001:db8:2::1/64 |
# +--------------------------------+
#
# Hierarchical model:
# The tunnel is bound to a device in a different VRF
#
# +--------------------------------+
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.