iptables API
hi,
to whom it may concern, C code to invoke the iptables is available here:
http://www.mobile-ip.de/~jfl/using_iptables_API/
I used this code to remark the DSCP field of incoming datagrams, the match and target extensions however can be easily adapted to any needs.
note that for most cases invoking iptables commands with popen is far more convenient.
b.t.w. does anybody plan to switch this interface to netlink sockets (there have been some suggestions, if I remember correctly, did they materialize)?
cheers,
John.
Quoted 2 lines · John Williams Floroiu
to whom it may concern, C code to invoke the iptables is available here:
http://www.mobile-ip.de/~jfl/using_iptables_API/
You do know about the iptables-restore command interface? This eleminates most if not all reasons to compile applications using the internal libiptc/libiptables interfaces..
Regards
Henrik