Minimal Init

Here is a minimal init program that runs after the kernel boot.  Well, it does nothing except printing a hello world statement.  The system kernel panics once the program finishes. The program working principle is to first mount the device file system, with the nmount(2) system call.  Then, print to the "/dev/console" and quit.  Before … Continue reading Minimal Init


Basic C TCP/IP Programming

In this article, I share how to have some TCP/IP programming with the C language.  I am using FreeBSD because it is my most familiar platform but it does not prevent you trying the source code elsewhere.  There are of course thousands of examples online.  To show that I am different, I will present my code in … Continue reading Basic C TCP/IP Programming

Basic C Programming on FreeBSD

In this article, I share some programming techniques with the C programming language on FreeBSD.  As of FreeBSD 11.0, the basic installation comes with clang(1) tools for programming in C, C++, and Obj-C languages. When I was a teaching assistant, I used to give my students a crash course in C programming.  They already know C++ … Continue reading Basic C Programming on FreeBSD