Re: [tcpdump-workers] IP range implementation given an IP address and subnet mask

2011-11-27 Thread Andrej van der Zee
> I would like to implement an IP address range filter similar to the > BPF capture filter that takes an IP address and subnet mask (like in > "net 192.168.0.0 and mask 255.255.255.0"). What would be the best way > to calculate this in C? Or in which file can I find the BPF > implementation of this

[tcpdump-workers] IP range implementation given an IP address and subnet mask

2011-11-27 Thread Andrej van der Zee
Hi, I would like to implement an IP address range filter similar to the BPF capture filter that takes an IP address and subnet mask (like in "net 192.168.0.0 and mask 255.255.255.0"). What would be the best way to calculate this in C? Or in which file can I find the BPF implementation of this expr