Review xtables.h vs. xshared.h
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libxtables: Move struct xtables_afinfo into xtables.hextensions/ extensions/ include/ +1 more | +28 | 0 replies | |
| 2/2 | libxtables: Define XT_OPTION_OFFSET_SCALE in xtables.hinclude/ iptables/ libxtables/ +1 more | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [iptables PATCH 0/2] Review xtables.h vs. xshared.h
I didn't like how libxtables has to include xshared.h from iptables code base, this series eliminates this:
* struct xtables_afinfo is used to hold family-specific configuration. There are static const instances in libxtables and xtables_set_nfproto() mangles the public 'afinfo' pointer. This is all libxtables code, so move the struct definition and pointer declaration into xtables.h (patch 1).
* XT_OPTION_OFFSET_SCALE is the base distance between different extensions' offset values. It is mostly used by libxtables when merging options and referenced by xshared.c for sanity checking only. Patch 2 moves it into xtables.h (and turns the single value enum into a define).
To avoid impact on external libxtables users, guard both changes above by XTABLES_INTERNAL. Without access to xshared.h, external extensions can't have made use of afinfo or XT_OPTION_OFFSET_SCALE yet.
Phil Sutter (2):
libxtables: Move struct xtables_afinfo into xtables.h
libxtables: Define XT_OPTION_OFFSET_SCALE in xtables.h
extensions/libxt_set.c | 6 ++++++ extensions/libxt_set.h | 1 - include/xtables.h | 25 +++++++++++++++++++++++++ iptables/xshared.h | 26 -------------------------- libxtables/xtables.c | 1 - libxtables/xtoptions.c | 1 - 6 files changed, 31 insertions(+), 29 deletions(-)
Signature · 1 line
2.34.1