ngrep-lib is a packet filtering library based on ngrep which provides an easy interface. Instead of having to worry about pcap options, syntax, processing of IP packets, etc. you can just initialize and run, letting callback functions handle the rest.
dd21ffc63ca2f524d3c392da02f228d3ec1ee1edf400472364ff32e2bda092a3