--- id: dpkt version: "1.9.8" license: BSD license_treatment: permissive maintenance: dormant --- # dpkt — fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols License: permissive · Maintenance: dormant · Downloads: 1.7M/mo ## What it is and what it does dpkt is a Python module for parsing and constructing packets at the TCP/IP protocol level. It provides definitions for basic protocols (Ethernet, IP, TCP, UDP, and others) and allows you to unpack raw bytes into structured protocol objects or build packets from scratch. The library has no runtime dependencies and is designed for speed and simplicity, making it suitable for network analysis, packet inspection, and protocol-level debugging. The project entered dormancy after its 2022 release but remains functional and stable. It supports Python 2.7 through 3.9 (classifiers list these versions), though the lack of recent updates means it may not cover the latest protocol extensions or edge cases. It is widely used in network security, packet capture analysis, and educational contexts where direct protocol-level access is needed. Use it for: - Analyze captured network traffic (pcap files) by parsing Ethernet, IP, TCP, UDP, and application-layer protocols. - Build custom network packets for testing, fuzzing, or protocol validation without external dependencies. - Extract and inspect protocol headers from raw bytes in network monitoring or IDS/IPS tools. - Educational projects or reverse-engineering tasks requiring low-level packet inspection. - Integrate packet parsing into security research or penetration testing workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. dpkt parses and creates TCP/IP protocol packets with minimal dependencies, enabling fast inspection and manipulation of network traffic at the protocol level. Yes, if you need lightweight, dependency-free packet parsing for network analysis or protocol work. The dormant status is not a blocker—the library is stable and feature-complete for standard TCP/IP protocols. Install it when you want to avoid heavier frameworks like Scapy or when you need minimal overhead. Verify that its protocol coverage matches your specific use case, especially for newer or less common protocols. ## Install pip install dpkt uv add dpkt poetry add dpkt ## Installing dpkt Before you install: Installation is straightforward with no runtime dependencies. The project is dormant (last release 2022-08-18, 1457 days ago) but remains stable and archived repository is not flagged, suggesting it is feature-complete rather than abandoned. License in practice: BSD license is permissive, allowing commercial and private use with minimal restrictions—suitable for most projects that can include a license notice. Quickstart: pip install dpkt import dpkt # Parse an Ethernet frame eth = dpkt.ethernet.Ethernet(raw_packet_bytes) ip = eth.data print(ip.src, ip.dst) Verify before relying: - Whether the package actively handles modern protocol variants (e.g., IPv6 extensions, newer TCP options) given dormant maintenance status. - Performance characteristics on large packet volumes or real-time capture scenarios compared to alternatives. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags packet parsing python, tcp ip protocol parsing, network packet dissection, raw packet inspection, protocol buffer parsing, network traffic analysis, packet creation library, network-analysis, packet-parsing, low-dependency [View on SkillFed](https://skillfed.io/packages/dpkt) · [View on PyPI](https://pypi.org/project/dpkt/)