Re: [nft RFC PATCH] rule: introduce new option to print set elements per line

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

 



Hi Arturo,

On Fri, Apr 21, 2017 at 12:30:24PM +0200, Arturo Borrero Gonzalez wrote:
> Add a new option to nft to print set elements per line instead
> of all in a single line.
> This is useful when printing a ruleset with very big sets.
> 
> The new option is -t/--elements.
> 
> Annonymous sets/maps/concats are not affected by this. The default
> behaviour is not changed.
> 
> Example:
> 
> % nft list ruleset -t -nn
> table ip t {
> 	set s {
> 		type inet_service
> 		elements = { 1,
> 				2,
> 				3,
> 				4,
> 				12345 }

Can we do a more intelligent folding? Via TIOCGWINSZ we can obtain the
number of columns so we can try to fit as many elements as possible
without wrapping around. Instead of one element per line? I know what
I'm asking is harder, but I would like that we explore this path
before adding this.

And I think we should do this by default, no need for an option.
Unless you are a robot, you want an output that you can actually read
without lots of lines wrapping around, eg. a very large sets with
thousands of elements.
--
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