From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [iproute PATCH v2 3/3] ss: Drop filter_default_dbs()
Date: Wed, 28 Mar 2018 01:51:56 +0200 [thread overview]
Message-ID: <20180327235156.16680-4-phil@nwl.cc> (raw)
In-Reply-To: <20180327235156.16680-1-phil@nwl.cc>
Instead call filter_db_parse(..., "all"). This eliminates the duplicate
default DB definition.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
misc/ss.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 83e476a0407e5..fc8e2a0d719fd 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -408,23 +408,6 @@ static int filter_af_get(struct filter *f, int af)
return !!(f->families & FAMILY_MASK(af));
}
-static void filter_default_dbs(struct filter *f, bool enable)
-{
- filter_db_set(f, UDP_DB, enable);
- filter_db_set(f, DCCP_DB, enable);
- filter_db_set(f, TCP_DB, enable);
- filter_db_set(f, RAW_DB, enable);
- filter_db_set(f, UNIX_ST_DB, enable);
- filter_db_set(f, UNIX_DG_DB, enable);
- filter_db_set(f, UNIX_SQ_DB, enable);
- filter_db_set(f, PACKET_R_DB, enable);
- filter_db_set(f, PACKET_DG_DB, enable);
- filter_db_set(f, NETLINK_DB, enable);
- filter_db_set(f, SCTP_DB, enable);
- filter_db_set(f, VSOCK_ST_DB, enable);
- filter_db_set(f, VSOCK_DG_DB, enable);
-}
-
static void filter_states_set(struct filter *f, int states)
{
if (states)
@@ -4934,7 +4917,7 @@ int main(int argc, char *argv[])
if (do_default) {
state_filter = state_filter ? state_filter : SS_CONN;
- filter_default_dbs(¤t_filter, true);
+ filter_db_parse(¤t_filter, "all");
}
filter_states_set(¤t_filter, state_filter);
--
2.16.1
prev parent reply other threads:[~2018-03-27 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 23:51 [iproute PATCH v2 0/3] ss: Allow excluding a socket table from being queried Phil Sutter
2018-03-27 23:51 ` [iproute PATCH v2 1/3] " Phil Sutter
2018-03-27 23:51 ` [iproute PATCH v2 2/3] ss: Put filter DB parsing into a separate function Phil Sutter
2018-03-27 23:51 ` Phil Sutter [this message]
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=20180327235156.16680-4-phil@nwl.cc \
--to=phil@nwl.cc \
--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