tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
Source file repositories/reference/linux-study-clean/tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/net/netfilter/conntrack_reverse_clash.c- Extension
.c- Size
- 2643 bytes
- Lines
- 131
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
errno.hstdbool.hstdint.hstdio.hstring.hstdlib.htime.hunistd.harpa/inet.hsys/socket.hsys/wait.h
Detected Declarations
function diefunction die_portfunction udp_socketfunction main
Annotated Snippet
if (child) {
if (sendto(s1, buf, LEN, 0, (struct sockaddr *)&sa2, sizeof(sa2)) != LEN)
continue;
if (recvfrom(s2, buf, LEN, 0, (struct sockaddr *)&peer, &plen) < 0)
die("child recvfrom");
if (peer.sin_port != htons(PORT))
die_port(&peer, PORT);
} else {
if (sendto(s2, buf, LEN, 0, (struct sockaddr *)&sa1, sizeof(sa1)) != LEN)
continue;
if (recvfrom(s1, buf, LEN, 0, (struct sockaddr *)&peer, &plen) < 0)
die("parent recvfrom");
if (peer.sin_port != htons((PORT + 1)))
die_port(&peer, PORT + 1);
}
}
if (child)
return 0;
wait(&status);
if (WIFEXITED(status))
return WEXITSTATUS(status);
return 1;
}
Annotation
- Immediate include surface: `errno.h`, `stdbool.h`, `stdint.h`, `stdio.h`, `string.h`, `stdlib.h`, `time.h`, `unistd.h`.
- Detected declarations: `function die`, `function die_port`, `function udp_socket`, `function main`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
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.