]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: break really long lines
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 13 Nov 2016 06:59:15 +0000 (09:59 +0300)
committerStephen Hemminger <sthemmin@microsoft.com>
Tue, 29 Nov 2016 19:41:58 +0000 (11:41 -0800)
misc/ss.c

index a9654ee465c5f9240b6e614529d6d237f2c9371e..07dcd8c209c049c81d20a32d4f4d2b3a79018eeb 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -136,7 +136,8 @@ enum {
 #define PACKET_DBM ((1<<PACKET_DG_DB)|(1<<PACKET_R_DB))
 #define UNIX_DBM ((1<<UNIX_DG_DB)|(1<<UNIX_ST_DB)|(1<<UNIX_SQ_DB))
 #define ALL_DB ((1<<MAX_DB)-1)
-#define INET_DBM ((1<<TCP_DB)|(1<<UDP_DB)|(1<<DCCP_DB)|(1<<RAW_DB)|(1<<SCTP_DB))
+#define INET_L4_DBM ((1<<TCP_DB)|(1<<UDP_DB)|(1<<DCCP_DB)|(1<<SCTP_DB))
+#define INET_DBM (INET_L4_DBM | (1<<RAW_DB))
 
 enum {
        SS_UNKNOWN,
@@ -4045,7 +4046,8 @@ int main(int argc, char *argv[])
        int ch;
        int state_filter = 0;
 
-       while ((ch = getopt_long(argc, argv, "dhaletuwxnro460spbEf:miA:D:F:vVzZN:KHS",
+       while ((ch = getopt_long(argc, argv,
+                                "dhaletuwxnro460spbEf:miA:D:F:vVzZN:KHS",
                                 long_opts, NULL)) != EOF) {
                switch (ch) {
                case 'n':
@@ -4285,10 +4287,9 @@ int main(int argc, char *argv[])
        filter_merge_defaults(&current_filter);
 
        if (resolve_services && resolve_hosts &&
-           (current_filter.dbs&(UNIX_DBM|(1<<TCP_DB)|(1<<UDP_DB)|(1<<DCCP_DB)|(1<<SCTP_DB))))
+           (current_filter.dbs & (UNIX_DBM|INET_L4_DBM)))
                init_service_resolver();
 
-
        if (current_filter.dbs == 0) {
                fprintf(stderr, "ss: no socket tables to show with such filter.\n");
                exit(0);