I want to intercept network traffic from user space , so I have used libpcap API s to capture tcp/ip packets . Right now I am just capturing information about the packet header & payload in the registered callback . How can I use this callback to block traffic or drop a packet based on certain conditions ? Or is pcap mechanism is purely a capture mechanism ?