From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv4] batctl: Use netlink to replace some of debugfs
Date: Mon, 09 May 2016 15:33:25 +0200 [thread overview]
Message-ID: <3082168.4WeLqNseqL@bentobox> (raw)
In-Reply-To: <1462372207-28322-1-git-send-email-andrew@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
On Wednesday 04 May 2016 16:30:07 Andrew Lunn wrote:
> +int netlink_print_originators(char *mesh_iface, int read_opts,
> + float orig_timeout,
> + float watch_interval)
> +{
> + char *header;
> + int ifindex;
> +
> + ifindex = if_nametoindex(mesh_iface);
> + if (!ifindex) {
> + fprintf(stderr, "Interface %s is unknown\n", mesh_iface);
> + return -ENODEV;
> + }
> +
> + netlink_print_info(ifindex, PARSE_ONLY);
> +
> + if (!algo_name)
> + return -EINVAL;
> +
> + if (!strcmp("BATMAN_IV", algo_name))
> + header = " Originator last-seen (#/255) Nexthop [outgoingIF]\n";
> + if (!strcmp("BATMAN_V", algo_name))
> + header = " Originator last-seen (throughput) Nexthop [outgoingIF]\n ";
> +
> + if (!header)
> + return -EINVAL;
> +
> + return netlink_print_common(mesh_iface, read_opts, orig_timeout,
> + watch_interval, header,
> + BATADV_CMD_GET_ORIGINATORS,
> + originators_callback);
> +}
This is actually a report of a possible problem by Simon (I've only
checked it):
It looks like the orig_iface handling isn't handled here (see
handle_debug_table "case 'i'") or am I missing something? I would have
expected that sets something like BATADV_ATTR_HARD_IFINDEX when
orig_iface is available and the kernel then shows the same as in
/sys/kernel/debug/batman_adv/$(hardif)/originators
The parameter BATADV_ATTR_HARD_IFINDEX seems to be already parsed
by batadv_orig_dump. But batctl never seems to set it.
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-05-09 13:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 14:30 [B.A.T.M.A.N.] [PATCHv4] batctl: Use netlink to replace some of debugfs Andrew Lunn
2016-05-09 13:33 ` Sven Eckelmann [this message]
2016-05-09 14:23 ` Andrew Lunn
2016-05-09 16:28 ` Sven Eckelmann
2016-05-09 16:51 ` Andrew Lunn
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=3082168.4WeLqNseqL@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.