I've found myself having do some socket programming in the linux kernel. (yes, yes, I know: have I thought about user space? Yes, that's where I've prototyped my code. This is a research project that ...
Due to the complexity of developing and maintaining the kernel, only the most essential and performance-critical code are placed in the kernel. Other things, such as GUI, management and control code, ...