(E-Mail Removed) (roberto) wrote in message news:<(E-Mail Removed). com>...
> I am not sure if this is what you;re after but
>
> iptables -L -t nat
>
> will give you the current NAT-ing tables
That's true, of course, but the output can become complex if you start
adding match qualifiers to DNAT/SNAT rules. I was hoping for a binary
interface that had the kernel go through the binary representation of
the rules and simply tell me what the mapping would be. Otherwise I'd
have to reimplement the iptables command interpreter and the
underlying rule-matching logic in my code, which seems like a waste of
time and effort when the kernel already knows how to do it.
I thought Netlink would be the perfect solution, but I haven't been
able to make it do the job...
Anyway, thanks!
TN