Skip to main content

Module discovery

Module discovery 

Source
Expand description

Bootstrap handoff types.

These types model the boundary between an external rendezvous/bootstrap runtime and the core FIPS transport/handshake stack. The rendezvous side owns Nostr/STUN/UDP hole punching; once a direct UDP path is established, it hands the live socket and selected remote endpoint to FIPS so the existing Noise/FMP transport path can take over.

Modules§

lan
LAN peer discovery via mDNS / DNS-SD (RFC 6762 / RFC 6763).
nostr

Structs§

BootstrapHandoffResult
Result of handing an established traversal session into FIPS.
EstablishedTraversal
Established UDP traversal ready to be handed into FIPS.

Constants§

PUNCH_ACK_MAGIC
Punch-probe-ack magic (“NPTA”, network byte order). Same filter as PUNCH_MAGIC.
PUNCH_MAGIC
Punch-probe magic (“NPTC”, network byte order). First byte 0x4E collides with FMP’s prefix-version high-nibble check, so the UDP transport silently filters packets carrying this magic to keep post-adoption handshake logs clean. Defined at the top-level discovery module so the UDP filter and the nostr submodule’s punch sender share the same constant.

Functions§

is_punch_packet
Returns true if the first four bytes of data match a punch-probe or punch-ack magic. Used by the UDP transport’s receive loop to silently drop stray probes that arrive on an adopted socket after the remote peer’s punch attempt has already timed out.