Added full Layer 2 support to NimPacket. You can now build Ethernet frames and ARP packets.
What's New
Ethernet Headers
let frame = (EthernetHeader(
destMAC: parseMAC("00:11:22:33:44:55"),
srcMAC: parseMAC("AA:BB:CC:DD:EE:FF"),
etherType: ETHERTYPE_IPV4
) / ipv4 / tcp).toBytes()
ARP Packets
let arpRequest = (ethernet / newARPRequest(
myMAC, myIP, targetIP
)).toBytes()
Use Cases
Examples
Added two new demo files in examples/:
Run them to see how it works.
Testing
83 tests, all passing.
Install
nimble install nimpacket
Check the README for full documentation.
Issues or Features?
Found a bug or want a new feature? Open an issue or submit a pull request on the GitHub repo.