Skip to content

feat(traceroute6): goscapy v6 probes and reply matching (#43) - #51

Merged
smallnest merged 2 commits into
mainfrom
feat/issue-43-probes
Jun 30, 2026
Merged

feat(traceroute6): goscapy v6 probes and reply matching (#43)#51
smallnest merged 2 commits into
mainfrom
feat/issue-43-probes

Conversation

@smallnest

Copy link
Copy Markdown
Contributor

Summary

  • Add traceroute6/hop.go (ProbeResult/Hop/Result, RTT stats, addr dedup, reverse-DNS, enrichment) adapted for IPv6/ICMPv6 layer names.
  • Add traceroute6/tracer.go: Tracer + concurrent run loop, buildProbe constructing IPv6 + ICMPv6 Echo / UDP / TCP SYN via goscapy layers (Hop Limit per hop, Traffic Class via MakeIPv6VerTCFL), and the Sr1 buildMatcher/matchEmbedded reply matcher.
  • Matcher accepts ICMPv6 Echo Reply (129), Time Exceeded (3), Dest Unreachable (1); parses the embedded 40-byte inner IPv6 header (inner dst at [24:40]) past the 4-byte ICMPv6 error preamble to confirm the quoted probe is ours.

Test plan

  • go test ./traceroute6/ — matcher accepts Time Exceeded / Dest Unreachable quoting our probe, rejects a different destination, Echo Reply identity guard, buildProbe per-protocol + port overrides.
  • go vet ./traceroute6/, go build ./..., gofmt -l clean.

Closes #43

Add hop aggregation, the Tracer probe builder, and the Sr1 reply matcher
for traceroute6. buildProbe constructs IPv6 + ICMPv6 Echo / UDP / TCP SYN
via goscapy layers, setting Hop Limit per hop and Traffic Class via
MakeIPv6VerTCFL. The matcher accepts ICMPv6 Echo Reply (129), Time
Exceeded (3) and Dest Unreachable (1), parsing the embedded original
40-byte IPv6 header (inner dst at [24:40]) past the 4-byte ICMPv6 error
preamble to confirm the quoted probe is ours.

Closes #43
@smallnest
smallnest merged commit 8526854 into main Jun 30, 2026
1 of 2 checks passed
@smallnest
smallnest deleted the feat/issue-43-probes branch June 30, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

goscapy 构造与匹配 ICMPv6/UDP/TCP v6 探针

1 participant