Files
fips/docs/design
Johnathan Corgan d41009b778 SessionDatagram redesign: add src_addr, reclassify error signals
Add src_addr to SessionDatagram envelope (34-byte header: msg_type +
src_addr + dest_addr + hop_limit) so transit routers can route error
signals back to the packet's originator.

Reclassify CoordsRequired/PathBroken as link-layer error signals
(plaintext inside SessionDatagram) rather than e2e encrypted session
messages. Transit routers generate these when forwarding fails and
route them to src_addr; if source is also unreachable, drop silently.

Remove redundant src_addr/dest_addr/hop_limit from SessionSetup,
SessionAck, and DataPacket (now in envelope). DataPacket header
reduced from 36 to 4 bytes. Remove PathBroken.original_src.

Fix routing loop vulnerability: gate bloom filter path on having
cached dest_coords to prevent blind forwarding between peers.
Simplify select_best_candidate() to require coordinates.

Fix gossip protocol type codes (0x11->0x20, 0x12->0x30, 0x13->0x31)
for consistency across all design docs.

All 5 design docs updated and cross-checked for consistency.
335 tests pass, zero warnings.
2026-02-12 11:32:45 +00:00
..

FIPS Design Documents

Protocol design specifications and analysis for the Federated Interoperable Peering System.

Suggested Reading Order

Start with the high-level architecture, then work through session flow, routing concepts, and finally the wire-level protocol details.

1. Introduction and Overview

Document Description
fips-intro.md Protocol introduction: goals, concepts, architecture

2. Protocol Flow (How Traffic Works)

Document Description
fips-session-protocol.md End-to-end session flow, Noise IK encryption, terminology

3. Routing (How Packets Find Their Way)

Document Description
fips-routing.md Routing concepts: bloom filters, discovery, greedy routing
spanning-tree-dynamics.md Tree protocol behavior: convergence, partitions, recovery
fips-gossip-protocol.md Wire formats: TreeAnnounce, FilterAnnounce, Lookup messages
Document Description
fips-wire-protocol.md Transport layer: Noise IK, session indices, roaming, security
fips-transports.md Transport-specific: UDP, Ethernet, Tor, radio characteristics

Implementation

Document Description
fips-architecture.md Software architecture: entities, state machines, configuration
fips-tun-driver.md TUN interface driver: reader/writer threads, ICMPv6, packet flow
fips-state-machines.md Phase-based state machine pattern: peer lifecycle, transitions

Document Cross-References

                      fips-intro.md
                           │
              ┌────────────┴────────────┐
              ▼                         ▼
    fips-session-protocol.md    fips-architecture.md
              │                         │
    ┌─────────┴─────────┐               ▼
    ▼                   ▼         fips-transports.md
fips-routing.md   fips-wire-protocol.md
    │       │
    ▼       ▼
spanning-tree-dynamics.md ←→ fips-gossip-protocol.md