[PATCH iptables 0/3] iptables: Unify val[/mask] parsing and printing routines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix realm and devgroup values mapping to symbolic names according to
/etc/iproute2/rt_realms and /etc/iproute2/group when printing or saving.

Introduce and use xtables_parse_val_mask() to parse val[/mask] where val
and mask are integers represented by string or val is a symbolic name to
be translated according to /etc/iproute2/* files. Add inline helper to
short circuit cases when no symbolic translations needed.

Introduce and use xtables_print_val_mask() to print val[/mask] where
value optionally can be translated to it's symbolic representation
according to /etc/iproute2/* files. Add inline helper to short circuit
case when such translation should not be done.

Serhey Popovych (3):
  extensions: Initialize linear mapping of symbols in _init() of
    extension
  xtables: Introduce and use common function to parse val[/mask]
    arguments
  xtables: Introduce and use common function to print val[/mask]
    arguments

 extensions/libipt_realm.c   |   66 +++++++++---------------------------
 extensions/libxt_connmark.c |   18 ++++------
 extensions/libxt_devgroup.c |   79 ++++++++++---------------------------------
 extensions/libxt_mark.c     |   17 +++-------
 include/xtables.h           |   20 +++++++++++
 libxtables/xtables.c        |   72 +++++++++++++++++++++++++++++++++++++++
 libxtables/xtoptions.c      |   22 +-----------
 7 files changed, 138 insertions(+), 156 deletions(-)

-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux