Skip to content
systemcoding.dev

Tag

posix

44 posts

Flat illustration of a CPU core with its cache levels and main memory, with the C, Arm and Apple logos.
Systems Programming

Check Resource Usage with getrusage

Read CPU time, peak memory, page faults and context switches for your own process with getrusage on Linux with glibc 2.40, and know which fields are filled.

7 min read
Flat illustration of network packets crossing between two hosts, with the C, Rust and Linux logos.
Networking

Implement a DNS Query Client Over UDP

Write a DNS client in C that builds an A query by hand, sends it over UDP, and decodes the reply including name compression, following RFC 1035.

8 min read
Flat illustration of network packets crossing between two hosts, with the C, Linux and Rust logos.
Networking

Write a Simple HTTP/1.1 Server in C

Build a small HTTP/1.1 server in C with POSIX sockets: parse the request line, send correct headers and Content-Length, and handle keep-alive and bad requests.

7 min read