netstat: optional -p support by L. Gabriel Somlo <somlo AT cmu.edu>
Without FEATURE_NETSTAT_PRG: function old new delta recursive_action 416 425 +9 tcp_do_one 420 428 +8 udp_do_one 492 499 +7 raw_do_one 472 479 +7 expand 1697 1701 +4 netstat_main 489 492 +3 unix_do_one 486 488 +2 flags 1 - -1 qgravechar 109 106 -3 net_conn_line 4 - -4 bbunpack 391 383 -8 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 7/2 up/down: 40/-16) Total: 24 bytes With FEATURE_NETSTAT_PRG: file_act - 213 +213 dir_act - 192 +192 netstat_main 489 601 +112 prg_cache_get - 50 +50 tcp_do_one 420 462 +42 udp_do_one 492 533 +41 raw_do_one 472 513 +41 unix_do_one 486 519 +33 recursive_action 416 425 +9 expand 1697 1701 +4 flags 1 - -1 qgravechar 109 106 -3 net_conn_line 4 - -4 bbunpack 391 383 -8 packed_usage 24586 24572 -14 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 7/3 up/down: 737/-30) Total: 707 bytes
This commit is contained in:
@ -2820,7 +2820,7 @@
|
||||
#endif
|
||||
|
||||
#define netstat_trivial_usage \
|
||||
"[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]"
|
||||
"[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]"
|
||||
#define netstat_full_usage "\n\n" \
|
||||
"Display networking information\n" \
|
||||
"\nOptions:" \
|
||||
@ -2835,6 +2835,9 @@
|
||||
"\n -r Display routing table" \
|
||||
USE_FEATURE_NETSTAT_WIDE( \
|
||||
"\n -W Display with no column truncation" \
|
||||
) \
|
||||
USE_FEATURE_NETSTAT_PRG( \
|
||||
"\n -p Display PID/Program name for sockets" \
|
||||
)
|
||||
|
||||
#define nice_trivial_usage \
|
||||
|
Reference in New Issue
Block a user