Welcome to the Linux Foundation Forum!

How to sniff packets for specific IP/port using LINUX RAW sockets

Have packet_mmap.c example program for Linux RAW SOCKETS running for the sniffing of TCP/IP packets.

Want to have the LINUX kernel sniff the packets (i.e. put into the ring buffer) only for a specific IP and port number.

How can this be accomplished? Is there a C code example of this on the WWW available?

Categories

Upcoming Training