From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Stephen Hemminger <sthemmin@microsoft.com>
Subject: Re: [PATCH iproute2-next 4/7] ip: add json support to ntable
Date: Tue, 6 Mar 2018 09:53:41 -0700 [thread overview]
Message-ID: <e179e7fd-21a8-53e4-6245-3bc2e60527fe@gmail.com> (raw)
In-Reply-To: <20180306030501.1289-5-stephen@networkplumber.org>
On 3/5/18 8:04 PM, Stephen Hemminger wrote:
> @@ -338,274 +339,308 @@ static const char *ntable_strtime_delta(__u32 msec)
> return str;
> }
>
> -static int print_ntable(const struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
> +static void print_ndtconfig(const struct ndt_config *ndtc)
> {
> - FILE *fp = (FILE *)arg;
> - struct ndtmsg *ndtm = NLMSG_DATA(n);
> - int len = n->nlmsg_len;
> - struct rtattr *tb[NDTA_MAX+1];
> - struct rtattr *tpb[NDTPA_MAX+1];
> - int ret;
>
> - if (n->nlmsg_type != RTM_NEWNEIGHTBL) {
> - fprintf(stderr, "Not NEIGHTBL: %08x %08x %08x\n",
> - n->nlmsg_len, n->nlmsg_type, n->nlmsg_flags);
> - return 0;
> - }
> - len -= NLMSG_LENGTH(sizeof(*ndtm));
> - if (len < 0) {
> - fprintf(stderr, "BUG: wrong nlmsg len %d\n", len);
> - return -1;
> - }
> + print_uint(PRINT_ANY, "key_length",
> + " config key_len %u ", ndtc->ndtc_key_len);
> + print_uint(PRINT_ANY, "entry_size",
> + "entry_size %u ", ndtc->ndtc_entry_size);
this one has a number of places where the second line is misaligned.
next prev parent reply other threads:[~2018-03-06 16:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 3:04 [PATCH iproute2-next 0/7] ip: more JSON Stephen Hemminger
2018-03-06 3:04 ` [PATCH iproute2-next 1/7] ip: add color and json support to neigh Stephen Hemminger
2018-03-06 16:38 ` David Ahern
2018-03-06 3:04 ` [PATCH iproute2-next 2/7] ip: add json support to addrlabel Stephen Hemminger
2018-03-06 3:04 ` [PATCH iproute2-next 3/7] ip: add json support to ip rule Stephen Hemminger
2018-03-06 16:51 ` David Ahern
2018-03-06 16:57 ` Stephen Hemminger
2018-03-06 3:04 ` [PATCH iproute2-next 4/7] ip: add json support to ntable Stephen Hemminger
2018-03-06 16:53 ` David Ahern [this message]
2018-03-06 3:04 ` [PATCH iproute2-next 5/7] ip: add JSON support to netconf Stephen Hemminger
2018-03-06 3:05 ` [PATCH iproute2-next 6/7] tcp_metrics; make tables const Stephen Hemminger
2018-03-06 3:05 ` [PATCH iproute2-next 7/7] ip: jsonify tcp_metrics Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e179e7fd-21a8-53e4-6245-3bc2e60527fe@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).