Transport Programs: Specifying The Missing Layer Between Protocols and Stacks
Running code has long served two roles in transport protocol design: a medium for protocol development and a precise behavioral specification. Modern stacks increasingly struggle to serve either role because protocol logic is interwoven with platform-specific machinery for high performance. Changing or comparing protocol behavior therefore requires deep stack expertise, hindering protocol evolution and obscuring interoperability problems. We propose transport programs, a specification layer between natural-language protocol standards and stack implementations. Written in MTP, a stack-independent language, these programs state protocol decisions precisely while leaving execution machinery to each stack. MTP provides an explicit interface between protocol and stack experts: transport programs can run on MTP-compatible stacks, describe existing fixed-function implementations for behavioral comparison, and structure tasks for AI agents. We demonstrate MTP's benefits with three MTP-compatible stacks, two software and an FPGA prototype, on which we run programs for TCP, Homa, lightweight QUIC, and RoCEv2, comparing MTP descriptions of two TCP stacks to reveal interoperability issues, and creating an MTP-structured agentic pipeline that derives from RFCs a TCP MTP program that interoperates with NS3's TCP.