Commit Graph

5 Commits

Author SHA1 Message Date
Alex Young
30d633cf09 Add a gemspec and support loading ffi as a gem 2011-05-16 11:29:07 +01:00
Brian Candler
0df9fc6b32 Convenience tweaks to FFI::Struct 2011-05-08 11:21:58 +01:00
Brian Candler
40fbefa06b Experiment: try using FFI::Struct for iptables instead of CStruct
FFI::Struct handles nested structs and nested arrays much better, and avoids
duplicating logic about structure alignment (which it probably does more
correctly that CStruct)

However it's awkward to use in other ways. e.g. no accessor methods;
no proper #inspect; no ntohl for in_addr; no zero-sized arrays at end
of struct; no hooks to convert int32 <-> IPAddr as far as I can see.
2011-05-06 17:01:50 +01:00
Brian Candler
7d3671e9d1 Read list of tables/targets/matches 2011-05-06 15:23:01 +01:00
Brian Candler
0cb1429c62 Experimental code for reading iptables 2011-05-06 11:41:06 +01:00