$ show insomniacslk/dublin-traceroute
Dublin Traceroute is a NAT-aware multipath traceroute tool that extends the Paris-traceroute technique to enumerate ECMP load-balanced paths and detect NATs. It forges UDP packets with custom payloads to control the UDP checksum, which is used as a per-flow identifier and embedded in the IP ID field for NAT correlation. The system listens for ICMP Time Exceeded and Destination Unreachable responses, matches them to sent probes using IP ID (IPv4) or payload length (IPv6), and computes a NAT ID from checksum differences. Output is provided in JSON or DOT format for visualization. The repository contains two independent implementations: a primary C++ library/CLI using libtins and jsoncpp, and an experimental Go implementation with IPv6 support and additional tooling (routest for integration testing). The Go implementation demonstrates cleaner separation of concerns with reusable network protocol modules (ICMP, UDP, IPv6) and a layered protocol abstraction.
The LLM identified 5 files worth highlighting for reuse:
Self-contained ICMPv4 packet marshaling and unmarshaling with correct checksum computation following RFC 1071. Implements the full ICMP header structure (type, code, checksum, unused, payload). Can be extracted and reused in any Go network tool that needs to construct or parse ICMP packets.
Complete UDP header implementation with support for both IPv4 and IPv6 pseudoheader checksum computation. Includes helper functions to generate pseudoheaders from IPv4 and IPv6 headers. The checksum function handles odd-length payloads correctly. Self-contained and reusable in any Go project needing UDP packet manipulation.
ICMPv6 packet marshaling and unmarshaling with proper type/code definitions and checksum computation. Supports the ICMPv6 header structure and can be extracted for use in IPv6 network tools.
IPv6 header parsing and serialization with validation of version, traffic class, flow label, payload length, next header, hop limit, and addresses. Handles marshaling with proper byte ordering. Can be reused in any Go project that needs to construct or parse IPv6 packets.
Defines a Layer interface for protocol layering with MarshalBinary, UnmarshalBinary, Next, and SetNext methods. This pattern allows chaining of protocol layers (e.g., IPv6 -> ICMPv6 -> payload). Clean abstraction that can be reused in any network protocol implementation.