How to dissect packets whose destination IP lies within a range of IP addresses
I'm trying to only dissect packets whose destination address is within a range of IP addresses. E.g. all packets between 130.0.0.1 and 130.255.255.255. How do I take the destination IP address from the packet and compare it to the upper and lower bound of the IP addresses to be dissected?
As a prototype I've tried making a variable of type address and setting the values to what I think they should be. So type AT_IPv4, len = 4, and data pointing to an array that is 4 bytes long, with those being set to that of the destination ip address of the packets. But when I use cmp_address(&pinfo->dst, &ip)==1 it comes out as false, have tried using net_dst instead of dst and I get the same result.