On Tue, 8 Oct 2019 16:29:21 +0530
Martin Varghese <[email protected]> wrote:
Overall ok, but where is man page?
> +
> + if (tb[IFLA_BAREUDP_PORT])
> + print_uint(PRINT_ANY,
> + "port",
> + "dstport %u ",
> + rta_getattr_be16(tb[IFLA_BAREUDP_PORT]));
nit. these can be combined to be less lines.
> + if (tb[IFLA_BAREUDP_EXTMODE]) {
> + print_bool(PRINT_ANY, "extmode", "extmode ", true);
> + return;
> + }
One of the unwritten rules of ip commands is that the show format
should match the command line arguments. In this case extmode is
really a presence flag not a boolean. best to print that with
json null command.
Also why the short circuit return.