aboutsummaryrefslogtreecommitdiff
path: root/toys/net/netstat.c
AgeCommit message (Collapse)Author
2021-06-09netstat.c: fix bounds checks.Elliott Hughes
2021-02-06netstat: various fixes.Elliott Hughes
Avoid fgets() into toybuf other than to skip header lines, preferring fscanf() or xgetline() instead. Remove the early returns if we fail to skip a header line (fixes #62). Fix `netstat -xl` which was previously broken (because only -a would include listening sockets). Fix a variety of formatting issues, bringing the diff between toybox netstat and net-tools netstat down (which was what I used for testing). Use FLAG() more consistently.
2021-02-06Cleanup pass on netstat.Rob Landley
2020-05-28remove unneeded ; after GLOBALSEthan Sommer
2019-02-21Fix typo in helpKevin van der Kamp
2018-12-04Clean up some --help formatting.Elliott Hughes
Be consistent about upper versus lower case. (Upper seems to have the majority, so I went with that, though I'm happy to provide the opposite patch as long as we're consistent!) Be consistent about using \t. (Though saving a few bytes seems like it might be better done in the code that generates help.h rather than directly in the source, since tabs make careful ASCII art layout hard enough that we regularly have things misaligned.) Remove trailing periods (most of which seem to have been added by me). Always use the US "human readable" rather than my British "human-readable", and be more consistent about declaring whether we're showing multiples of 1000 or 1024. Just say "verbose" rather than adding a useless "mode" or "output".
2018-10-20Some more --help consistency.Elliott Hughes
From eyeballing the output of for i in `./toybox | tr " " "\n"` ; do ./toybox $i --help ; done | \ grep '^-' | grep -v "\t"
2018-04-02Second argument to inet_ntop() is int, not long. (64 bit big endian systems ↵Rob Landley
care.)
2016-07-03Promote netsat, and move ifconfig, netcat, and rfkill to new toys/net directory.Rob Landley