'How do you write unit tests to test the TCP IP stack in the Linux kernel or FreeBSD?

I have recently modified the sending and receiving functions in the TCP IP protocol stack in the Linux code, but I need to write a unit test function to test the TCP IP protocol stack in the kernel, but I feel very difficult, I don't know where to start.

thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source