aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-07-27 12:10:07 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-07-27 12:10:07 +0000
commit6e69e4237d8f43232afd0dc207275f27c08039ed (patch)
treed2c3e28157fface75749fa6af53a23c4d85ba4c8 /include
parent94d03f0da0809784b398585cd0d7669b77a475c9 (diff)
downloadbusybox-w32-6e69e4237d8f43232afd0dc207275f27c08039ed.tar.gz
busybox-w32-6e69e4237d8f43232afd0dc207275f27c08039ed.tar.bz2
busybox-w32-6e69e4237d8f43232afd0dc207275f27c08039ed.zip
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
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h1
-rw-r--r--include/usage.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 48cbd90c0..2dcdeacb1 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -278,6 +278,7 @@ enum {
278 ACTION_FOLLOWLINKS_L0 = (1 << 2), 278 ACTION_FOLLOWLINKS_L0 = (1 << 2),
279 ACTION_DEPTHFIRST = (1 << 3), 279 ACTION_DEPTHFIRST = (1 << 3),
280 /*ACTION_REVERSE = (1 << 4), - unused */ 280 /*ACTION_REVERSE = (1 << 4), - unused */
281 ACTION_QUIET = (1 << 5),
281}; 282};
282extern int recursive_action(const char *fileName, unsigned flags, 283extern int recursive_action(const char *fileName, unsigned flags,
283 int FAST_FUNC (*fileAction)(const char *fileName, struct stat* statbuf, void* userData, int depth), 284 int FAST_FUNC (*fileAction)(const char *fileName, struct stat* statbuf, void* userData, int depth),
diff --git a/include/usage.h b/include/usage.h
index 9a73d0890..110fbf641 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2820,7 +2820,7 @@
2820#endif 2820#endif
2821 2821
2822#define netstat_trivial_usage \ 2822#define netstat_trivial_usage \
2823 "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")"]" 2823 "[-laentuwxr"USE_FEATURE_NETSTAT_WIDE("W")USE_FEATURE_NETSTAT_PRG("p")"]"
2824#define netstat_full_usage "\n\n" \ 2824#define netstat_full_usage "\n\n" \
2825 "Display networking information\n" \ 2825 "Display networking information\n" \
2826 "\nOptions:" \ 2826 "\nOptions:" \
@@ -2835,6 +2835,9 @@
2835 "\n -r Display routing table" \ 2835 "\n -r Display routing table" \
2836 USE_FEATURE_NETSTAT_WIDE( \ 2836 USE_FEATURE_NETSTAT_WIDE( \
2837 "\n -W Display with no column truncation" \ 2837 "\n -W Display with no column truncation" \
2838 ) \
2839 USE_FEATURE_NETSTAT_PRG( \
2840 "\n -p Display PID/Program name for sockets" \
2838 ) 2841 )
2839 2842
2840#define nice_trivial_usage \ 2843#define nice_trivial_usage \