-
EtherStruct
Repository: https://github.com/vikingfacer/EtherStructAPI: https://vikingfacer.github.io/EtherStruct/#EtherStruct If you plan on working with network packets you will probably need to serialize and de-serialize them. Otherwise you’ll be operating on byte strings. This post is to show off how I’m serializing and de-serializing packets in Zig with my EtherStruct library. Background two important concepts need to be laid out. After…
-
Cappy: Lets print some packets
https://github.com/vikingfacer/cappy/tree/main Main article: https://sillycodeproject.com/2025/11/11/cappy/ I’m not satisfied with how Cappy prints packets. Cappy is expected to print packets the same way if given an live capture or an offline capture. This make testing packet printing easier and more reliable. I do not want to set up a complicated testing environment. I would like to just…
-
Cappy
The crappy network capturehttps://github.com/vikingfacer/cappy/tree/main In this post I would like to introduce a project Cappy. Cappy is a command like tool like tshark or tcpdump but writing in Zig. Cappy at the moment is a worse version of tshark or tcpdump, but with ambitions of adding offensive measures. Cappy exists as an opportunity to try…
-
Reading static libraries
The journey of reading library binaries To answer these questions we will start by creating a small library with one function. After we have the micro library. we will examine it and see if we can find the single defined function. Library Source Layout CMakeLists.txt Note: Just to be clear having a CMakeLists for this…
-
Builder for C++ Resource Class
This is a useful pattern people should use in cpp One problem with cpp classes is the method for communicating failures in a constructor. Imagine a class that acquire a resource. Such as: What if the acquisition fails? Will the user know? An acquisition internal to the constructor failing would leave the object in a…
-
Move Only Class
Make interfaces easy to use correctly and hard to use incorrectly.” — Scott Meyers Disclaimer In Cpp there are a couple of patterns that are recommended ideas for handling resources. One of them is using move only classes. Move only classes mitigate double delete resources. For resources like TCP network connections that can be a…