From: "Petr Šabata" <contyk@redhat.com>
To: shemminger@vyatta.com
Cc: netdev@vger.kernel.org, "Petr Šabata" <contyk@redhat.com>
Subject: [PATCH] iproute2: ss - change default filter to include all socket types
Date: Tue, 11 Dec 2012 17:42:52 +0100 [thread overview]
Message-ID: <1355244172-32071-1-git-send-email-contyk@redhat.com> (raw)
Currently the default filter lists TCP sockets only which is
rather confusing especially when the '-a/--all' flag is used.
This patch changes the default to include all sockets, imitating
netstat(8) behavior.
Signed-off-by: Petr Šabata <contyk@redhat.com>
---
misc/ss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/misc/ss.c b/misc/ss.c
index b45f5ba..b8cd60d 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -105,7 +105,7 @@ struct filter
};
struct filter default_filter = {
- .dbs = (1<<TCP_DB),
+ .dbs = ~0,
.states = SS_ALL & ~((1<<SS_LISTEN)|(1<<SS_CLOSE)|(1<<SS_TIME_WAIT)|(1<<SS_SYN_RECV)),
.families= (1<<AF_INET)|(1<<AF_INET6),
};
--
1.7.11.7
next reply other threads:[~2012-12-11 16:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-11 16:42 Petr Šabata [this message]
2012-12-11 17:45 ` [PATCH] iproute2: ss - change default filter to include all socket types David Miller
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=1355244172-32071-1-git-send-email-contyk@redhat.com \
--to=contyk@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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).