libnetfilter_conntrack with IPv4 & IPv6
I have been using libnetfilter_conntrack to track connections, which have had IPv4 sources and destinations. Now, I want to upgrade my code to handle IPv6 sources and destinations. How do I determine if the source or destination is IPv4 or IPv6? For source, do I have to call nfct_get_attr twice, once with the ATTR_IPV4_SRC argument and once with the ATTR_IPV6_SRC argument? Will one return null and the other not null?
|