title: pcap_compile for IPv6
body: <p>I am making a networking program that will listen for ipv6 communication. I would like to use pcap library for this purpose. Unfortunately I am stuck at <code>int pcap_compile(pcap_t *p, struct bpf_program *fp, const char *str, int optimize, bpf_u_int32 netmask)</code> . It's last argument is IPv4 netmask, however my interface has only IPv6 address/mask.</p>
  
  <p>I have been following these tutorials:</p>
  
  <p><a href="https://www.tcpdump.org/pcap.html" rel="nofollow noreferrer">https://www.tcpdump.org/pcap.html</a> </p>
  
  <p><a href="http://yuba.stanford.edu/~casado/pcap/section1.html" rel="nofollow noreferrer">http://yuba.stanford.edu/~casado/pcap/section1.html</a></p>
  
  <p>I have also checked <code>man 3 pcap</code>, <code>man 3 pcap_compile</code> and tried some google-fu, however I have not find any information about how to use pcap library with IPv6 configured interface.</p>
  
  <p>Is there any way to use pcap library for IPv6 interface? Prehaps something like pcap6 library? Or am I missing something obvious?</p>