How I can use libpcap to filter only the request UDP packets?

Viewed 28

I am trying to monitor all UDP connection in my system by using Libpcap. I don't want to get all the packets only the new ones. Is there a way to do that?

My current filter:

pcap_compile(handle, &filter, "udp and not net 127.0.0.1", 0, PCAP_NETMASK_UNKNOWN)
0 Answers
Related