{"categories":[{"label":"Networking","url":"https://skillfed.io/packages/category/system-networking/2"}],"enrichment":{"capability":"A pure-Python TCP/IP stack (Ethernet through RFC 9293 TCP) that runs in user space on TAP/TUN interfaces, embeddable as a library or daemon, with a Berkeley-sockets API.","skillfed_tags":["networking-stack","user-space-io","testing-simulation"],"use_cases":["Embedded network simulation or testing: run a full TCP/IP stack in a test harness without kernel privileges or system configuration.","Custom protocol development: build and test new transport or application protocols on top of a controllable, inspectable stack.","Network emulation or sandbox environments: isolate application network behavior in user space for security or reproducibility.","Educational or reference implementation: study RFC-compliant TCP/IP behavior with readable, auditable Python source code.","Daemon-based multi-process networking: share a single stack instance across multiple client processes via IPC.","TAP/TUN-based VPN or overlay networking: implement custom network overlays or tunneling without kernel module development."],"what_it_does":"PyTCP is a complete TCP/IP stack written entirely in Python that runs in user space on TAP/TUN interfaces instead of relying on the kernel. It implements Ethernet II, ARP, IPv4/IPv6 with extension headers, ICMPv4/ICMPv6 (including multicast group membership), DHCPv4/DHCPv6, UDP, and a full RFC 9293 TCP with congestion control (Reno, NewReno, CUBIC), selective acknowledgment, and window scaling. The stack exposes a Berkeley-sockets API that mirrors the standard library socket module, so existing socket code can often run with minimal changes.\n\nYou can embed PyTCP directly in your Python process (calling stack.init(), stack.start(), then creating sockets) or run it as a daemon in a separate process and connect to it via an AF_UNIX control socket from client processes. The daemon model lets multiple processes share a single stack instance without each one needing to own the TAP/TUN interface. The implementation is fully typed, thread-safe for multi-interface setups, and designed to match Linux kernel behavior where RFCs are ambiguous. It ships with three independently published distributions: pmd-net-addr (address types), pmd-net-proto (packet parsing), and pmd-pytcp (the running stack).","worth_installing":"Yes, with conditions. Install if you need a pure-Python, controllable TCP/IP stack for testing, simulation, or custom protocol work and can accept GPL-3.0-or-later licensing. The low install friction, active maintenance, and zero external dependencies (only internal PyTCP modules) make it straightforward to add. However, it is Alpha-status software; expect API changes and verify performance and stability for your use case before relying on it in production. Requires Linux and root/CAP_NET_ADMIN for interface setup."},"id":"pmd-pytcp","links":{"html":"https://skillfed.io/packages/pmd-pytcp","md":"https://skillfed.io/packages/pmd-pytcp.md","pypi":"https://pypi.org/project/pmd-pytcp/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-13","license_spdx":"GPL-3.0-or-later","license_treatment":"copyleft","name":"pmd-pytcp","python_support":"supports_current","summary":"Pure-Python, zero-dependency TCP/IP stack \u2014 Ethernet through RFC 9293 TCP \u2014 running in user space on a TAP/TUN interface, embeddable in-process or run as a daemon, with a Berkeley-sockets API."},"popularity":{"monthly_downloads":108065,"position":12580,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.3.7"}
