aboutsummaryrefslogtreecommitdiff
path: root/toys/net/netcat.c
AgeCommit message (Collapse)Author
2019-01-25nc: allow immediate reuse of ports.Josh Gao
Set SO_REUSEADDR when listening so that we can immediately reuse ports that are no longer being listened upon, instead of having to wait 60 seconds for the socket to be shutdown after being closed (even on localhost!).
2019-01-25No real need to copy data into variables and do nothing else with it...Rob Landley
2019-01-02Josh Gao said "netcat -l -p 12345" broke:Rob Landley
Previously, when trying to listen on a socket without using one of -4, -6, or -s, we tried to create an AF_UNSPEC socket, which fails.
2018-12-10nc: add UDP support.Josh Gao
2018-12-10nc: add IPv6 support.Josh Gao
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-11-17Convert more GLOBALS argument vars to the new single letter code style.Rob Landley
2018-07-19Tweak/add some comments.Rob Landley
2018-03-31Use XVFORK() macro, add option ranges, make lookup_port() check /etc/services,Rob Landley
remove redundant CLOEXEC (xsocket does it) and CFG_NETCAT_LISTEN test (we're not doing FORCE_FLAGS so FLAG_L and FLAG_l become zero), remove comments about vfork triggering compiler/libc bugs (XVFORK handles it).
2017-07-21netcat: make -l exit after handling a request.Josh Gao
Bug: http://b/62305466
2017-05-26Be more consistent about periods in help text.Elliott Hughes
2016-10-11Make netcat work with nommu and factor out poll() loop into net/net.c.Rob Landley
2016-07-03Promote netsat, and move ifconfig, netcat, and rfkill to new toys/net directory.Rob Landley