Re: [libnftables PATCH 2/2] Basic support for printing nft_data_reg in XML format.

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

 



2013/4/2 Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>:
> I think we need something similar to:
>
> int nft_parse_data(union nft_data_reg *data, struct nlattr *attr, int *type);
>
> We should pass a 'type' that indicates:
>
>         DATA_VALUE,
>         DATA_VERDICT,
>         DATA_CHAIN,
>
> So you know if you have print what the data_reg contains.
>

If cmp and bitwise are going to always have DATA_VALUE, and imm
depending on what was set, I think we could do:

int nft_data_reg_snprintf(char *buf, union data_reg *data, int type, ...)
switch(type)
return nft_data_reg_snprintf_'type'(buf, data, ...)

And the same applies when parsing XML.

Is this true?

If this is not the case, I think I didn't understand.
--
Arturo Borrero González
--
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