I am looking into have a custom sniffing application which detects TCP packets. But I see some of the packets are lost, meaning some of the packets are not captured by the application.
I am looking for the clarifications on the below questions,
- Is it possible to write a sniffing application in C which detects 100% of TCP packets without losing any single packet using socket RAW_PACKET option ?
- Any specific design considerations to think of ? FYI. I dont use multi-threading here. The application mostly deals with I/O.
- Any reference docs / links / books that you think will help me here ?