Documentation
¶
Overview ¶
This server application uses raw sockets to listen for and respond to network packets at the IP layer. It supports TCP, UDP, and ICMP protocols. The server parses command-line arguments for IP address and protocol. It sets up a raw socket listener and, in the case of TCP, also creates a non-accepting TCP listener to prevent RST packets. The server receives packets, extracts the L4 payload, echoes the payload back to the client, and manages client connections using a map. It uses goroutines for concurrent packet handling.
Click to show internal directories.
Click to hide internal directories.