posted on 2024-07-12, 23:35authored byLawrence Stewart, James Healy
The widely used FreeBSD UNIX-like operating system provides a mature, stable and customisable platform, suitable for many tasks including telecommunications research. FreeBSD is being used as part of CAIA’s NewTCP project [1] to evaluate up and coming TCP congestion control algorithms. Part of this work has involved the customisation of the FreeBSD kernel, in the form of a loadable kernel module named SIFTR (Statistical Information For TCP Research). This report aims to capture the knowledge learnt during this process. Whilst FreeBSD 6.2-RELEASE was used as the basis for this development, most of the technical information in this report will be applicable to all FreeBSD 6.x releases, and possibly to earlier (5.x and 4.x to a lesser extent) or up and coming (7.x and beyond) releases. Topics covered include FreeBSD kernel module programming, the sysctl interface, packet filtering, data structures, character devices, threading, file writing and debugging. The report draws together our personal experiences and sources of further information to create a useful reference for those that are new to FreeBSD kernel programming.