From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org, stephen@networkplumber.org
Cc: David Ahern <dsahern@gmail.com>
Subject: [PATCH iproute2 2/4] ip address: Move filter struct to ip_common.h
Date: Sat, 27 May 2017 17:34:48 -0600 [thread overview]
Message-ID: <20170527233450.58015-3-dsahern@gmail.com> (raw)
In-Reply-To: <20170527233450.58015-1-dsahern@gmail.com>
Move filter struct to ip_common.h as struct link_filter.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
ip/ip_common.h | 20 ++++++++++++++++++++
ip/ipaddress.c | 22 +---------------------
2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/ip/ip_common.h b/ip/ip_common.h
index 450b45ac2b60..2b3cf7049b65 100644
--- a/ip/ip_common.h
+++ b/ip/ip_common.h
@@ -1,3 +1,23 @@
+struct link_filter {
+ int ifindex;
+ int family;
+ int oneline;
+ int showqueue;
+ inet_prefix pfx;
+ int scope, scopemask;
+ int flags, flagmask;
+ int up;
+ char *label;
+ int flushed;
+ char *flushb;
+ int flushp;
+ int flushe;
+ int group;
+ int master;
+ char *kind;
+ char *slave_kind;
+};
+
int get_operstate(const char *name);
int print_linkinfo(const struct sockaddr_nl *who,
struct nlmsghdr *n, void *arg);
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index c805b929134d..3e2c38a8e53e 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -44,27 +44,7 @@ enum {
IPADD_SAVE,
};
-static struct
-{
- int ifindex;
- int family;
- int oneline;
- int showqueue;
- inet_prefix pfx;
- int scope, scopemask;
- int flags, flagmask;
- int up;
- char *label;
- int flushed;
- char *flushb;
- int flushp;
- int flushe;
- int group;
- int master;
- char *kind;
- char *slave_kind;
-} filter;
-
+static struct link_filter filter;
static int do_link;
static void usage(void) __attribute__((noreturn));
--
2.11.0 (Apple Git-81)
next prev parent reply other threads:[~2017-05-27 23:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-27 23:34 [PATCH iproute2 0/4] ip: Add vrf show commmand David Ahern
2017-05-27 23:34 ` [PATCH iproute2 1/4] ip address: Export ip_linkaddr_list David Ahern
2017-05-27 23:34 ` David Ahern [this message]
2017-05-27 23:34 ` [PATCH iproute2 3/4] ip address: Change print_linkinfo_brief to take filter as an input David Ahern
2017-05-27 23:34 ` [PATCH iproute2 4/4] ip vrf: Add show command David Ahern
2017-05-31 0:56 ` [PATCH iproute2 0/4] ip: Add vrf show commmand 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=20170527233450.58015-3-dsahern@gmail.com \
--to=dsahern@gmail.com \
--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).