Add NETFILTER_NFLOG (ULOG) support

This commit is contained in:
Brian Candler
2011-05-02 20:27:05 +01:00
parent a6eda43b2e
commit ddba99c3b3
6 changed files with 84 additions and 4 deletions

View File

@@ -101,6 +101,11 @@ class CStruct
end
end
# This hook is called after unpacking from binary, and can be used
# for fixing up the data
def after_parse
end
def to_hash
@attrs
end
@@ -177,6 +182,7 @@ class CStruct
data.unpack(self::FORMAT).zip(self::FIELDS).each do |val, key|
obj[key] = val
end
obj.after_parse
obj
end