Kernel programming on *BSD not so straightforward, but please do not worry too much. kernel is a single program (almost) written by C. an application programmer can theoretically be a kernel programmer. you should be familier with some kernel specific data structures, conventions, etc. mbuf: data structure to manipulate network data. timeout(): kernel timeout function. splXXX(): support MUTEX inside the kernel. splnet() would be the most important for the network layer. Stevens' "TCP/IP illustrated" is a good textbook to learn such stuff. importance of validation validation is important for applications, but you should even be paranoid when writing kernel code. "do not trust communication peers, local users, nor even other parts of the kernel."