Silly Code Projects

    • About
    • Literature

  • December 3, 2025

    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…

    Uncategorized
  • November 16, 2025

    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…

    networking, zig
    networking, TCP/IP, zig
  • November 11, 2025

    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…

    networking, zig
    caputre, networking, TCP/IP, zig
  • October 31, 2025

    Do I really need the C runtime? part 2

    In the last post we got a c program to boot, run, then segmentation fault without the C runtime. In this post The following issues are addressed Fixing the segmentation fault This issue really is that extreme. In the previous post there was a small error. In the puts function it does not return. So…

    Operating Systems, System Programming
  • September 17, 2025

    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…

    builds
    c, computer-architure, cpp, programming, technology
  • September 16, 2025

    Do I really need the C runtime? part 1

    In C before main tasks to setup the runtime environment needs to run. In C and C++ Crt objects do the setup and tare down of the runtime environment. Crt stands for “C(++) RunTime”. These setup tasks are initializing the stack, IRQ (interrupt requests), registers, memory segments, passes argc/argv to main. C/C++ compilers automatically link…

    Operating Systems, System Programming
  • September 13, 2025

    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…

    C++, Design Patterns, Resource Management
    cpp, design-patterns, object-oriented-programming, oop, programming, technology
  • September 9, 2025

    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…

    C++, Design Patterns, Resource Management
    c, coding, cpp, design-patterns, move-only, move-semantics, oop, programming, resource-management, software, technology

Designed with WordPress

 

Loading Comments...