Packet Construction Set

View project on GitHub
Packet Construction Set

Packet Construction Set

IPv4 Packet Format from RFC 791

IPv4 Packet Format from RFC 791


PCS is a set of Python modules and objects that make building network protocol code easier for the protocol developer. The core of the system is the pcs module itself which provides the necessary functionality to create classes that implement packets.


Everyone is welcome to download the latest code, though it is not guaranteed to work as this is a link to the live repository.

Example Code

PCS comes complete with several different example applications including:
  • http_get.py is a simple command line program to grab a web page.
  • arpwhohas.py generates ARP queries given a set of IP and hardware addresses.
  • pcap_info.py prints the statistics on packets contained in a pcap dump file.
  • pcap_slice.py will carve a set of packets out of a pcap dump file.
The scripts directory in the release contains the complete set of example code.


Documentation is provided in by the PCS Manual and, automatically, via Doxygen.