PacketCord.io
Introduction
PacketCord.io is a library designed to let you build your own switch, router, firewall, VPN or whatever else network function or combo you can imagine. Write it as an application, as a Docker container, or as a VM and deploy it the way you like.
The PacketCord project was started by engineers, experienced in both embedded development and networking, advocating the idea that network functionality should not come from 3rd party software and hardware appliances with vendor specific CLIs, but from the development environment in the form of open-source programming framework.
Project Structure
PacketCord.io is structured to strike a balance between modularity, functionality, and simplicity, and is organised into the following sub-libraries:
- CORD-FLOW - High-performance packet manipulation and routing (apply logic as match and action over packet headers and payload)
- CORD-CRYPTO - Hardware-accelerated encryption and security functions (including AES cipher with hardware acceleration for ARM and x86-64)
- CORD-CRAFT - Packet crafting and injection, custom protocol development (possibly for peer-to-peer connection establishment via alternative NAT traveral techniques, customs stacks, control-plane protocols, etc.)
Code Organisation
We are following OOP-style of C coding, utilising encapsulation, abstraction and polymorphism without sacrificing the packet processing performance.
Technogy Stack
The PacketCord.io evolves around:
- Linux Raw Sockets (via AF_PACKET, AF_INET and AF_XDP families)
- cBPF and eBPF/XDP (depending on hardware and driver support)
- DPDK
- Hardware acceleration
- Microcontroller IP stacks (like LwIP) or bare-metal Ethernet
This makes it suitable for everything from educational network programming, to custom industrial automation networking — with a high level of compatibility across different hardware platforms — all the way to high-performance telecom and data center packet forwarding and processing applications.
Make use of the latest hardware acceleration technologies in x86-64 (Intel/AMD) and ARM - like AES and SIMD instructions in today's CPUs. Make use of CUDA or OpenCL GPU for pattern matching (even on embedded devices). Or tune it for SmartNICs, FPGAs and DPUs, of course...