From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
David Ahern <dsahern@kernel.org>
Cc: netdev@vger.kernel.org, christian@brauner.io
Subject: Re: [PATCH iproute2-next 01/11] libnetlink: Convert GETADDR dumps to use rtnl_addrdump_req
Date: Sun, 30 Sep 2018 09:37:20 -0600 [thread overview]
Message-ID: <dc10a907-a6aa-3058-455f-363abccf9340@gmail.com> (raw)
In-Reply-To: <20180930113541.4bf9113d@shemminger-XPS-13-9360>
On 9/30/18 3:35 AM, Stephen Hemminger wrote:
> On Sat, 29 Sep 2018 10:59:21 -0700
> David Ahern <dsahern@kernel.org> wrote:
>
>> From: David Ahern <dsahern@gmail.com>
>>
>> Add rtnl_addrdump_req for address dumps using the proper ifaddrmsg
>> as the header. Convert existing RTM_GETADDR dumps to use it.
>>
>> Signed-off-by: David Ahern <dsahern@gmail.com>
>
> }
>>
>> +int rtnl_addrdump_req(struct rtnl_handle *rth, int family)
>> +{
>> + struct {
>> + struct nlmsghdr nlh;
>> + struct ifaddrmsg ifm;
>> + } req = {
>> + .nlh.nlmsg_len = sizeof(req),
>> + .nlh.nlmsg_type = RTM_GETADDR,
>> + .nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
>> + .nlh.nlmsg_seq = rth->dump = ++rth->seq,
>> + .ifm.ifa_family = family,
>> + };
>
>
> This could be:
> } req = {
> .nlh = {
> .nlmsg_len = sizeof(req),
> .nlmsg_type = RTM_GETADDR,
> ...
>
I kept the inline because it is the style everywhere else in the
iproute2 code.
next prev parent reply other threads:[~2018-09-30 22:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-29 17:59 [PATCH iproute2-next 00/11] Fix dump requests to use proper header for type David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 01/11] libnetlink: Convert GETADDR dumps to use rtnl_addrdump_req David Ahern
2018-09-30 9:35 ` Stephen Hemminger
2018-09-30 15:37 ` David Ahern [this message]
2018-09-29 17:59 ` [PATCH iproute2-next 02/11] libnetlink: Convert GETROUTE dumps to use rtnl_routedump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 03/11] libnetlink: Convert GETADDRLABEL dumps to use rtnl_addrlbldump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 04/11] libnetlink: Convert GETMDB dumps to use rtnl_mdbdump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 05/11] libnetlink: Convert GETNETCONF dumps to use rtnl_netconfdump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 06/11] libnetlink: Convert GETRULE dumps to use rtnl_ruledump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 07/11] libnetlink: Convert GETNEIGH dumps to use rtnl_neighdump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 08/11] libnetlink: Convert GETNEIGHTBL dumps to use rtnl_neightbldump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 09/11] libnetlink: Convert GETNSID dumps to use rtnl_nsiddump_req David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 10/11] libnetlink: Rename rtnl_wilddump_* to rtnl_linkdump_* David Ahern
2018-09-29 17:59 ` [PATCH iproute2-next 11/11] libnetlink: Rename rtnl_wilddump_stats_req_filter to rtnl_statsdump_req_filter David Ahern
2018-09-30 18:45 ` [PATCH iproute2-next 00/11] Fix dump requests to use proper header for type Christian Brauner
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=dc10a907-a6aa-3058-455f-363abccf9340@gmail.com \
--to=dsahern@gmail.com \
--cc=christian@brauner.io \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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 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).