aboutsummaryrefslogtreecommitdiff
path: root/toys/net
AgeCommit message (Collapse)Author
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-11-18Fix microcom to set serial device's terminal correctly.Rob Landley
Can't use the same set_terminal() logic as ptys because it not displaying data, it should just accurately copy it.
2020-10-22Add nommu-able xvdaemon() and use it to remove some TOYBOX_FORK dependenciesRob Landley
2020-10-20Can't call daemon() on nommu.Rob Landley
2020-05-28remove unneeded ; after GLOBALSEthan Sommer
2020-05-19Don't leak sockfd into children.Rob Landley
2020-05-09Remove old scripts/minicom.sh and cleanup microcom.c a bit more.Rob Landley
Use s# instead of atoi, meantion -s default in help text, use toybuf instead of stack buf, reuse i instead of declaring a separate ssize_t, FLAG() macro.
2020-05-08Don't have -L forward stderr automatically, break out -E to do that.Rob Landley
2020-05-06Kill zombies.Rob Landley
2020-03-29ping: print ttlanatasluo
2020-03-13Fix various typos.Elliott Hughes
In case I'm not yet in the running for the most pedantic change of this release, I think the "days of the week are written with initial capitals in English" subset of this patch is a strong contender. (Found via `toybox help -a | ispell -l | sort | uniq`.)
2020-02-26Fix bugs reported by anatasluo: min/range/max were out of order,Rob Landley
min/max weren't being calculated, only print summary when we recieved at least one reply packet. And switch to FLAG() macros.
2020-01-10sntp.c: fix 32-bit.Elliott Hughes
The epoch was being defined as UL, which is fine for LP64, but too small on LP32 for what we're trying to do. toys/net/sntp.c:60:32: warning: left shift count >= width of type return ((tv.tv_sec+SEVENTIES)<<32)+(((long long)tv.tv_nsec)<<32)/1000000000; ^~ (Android doesn't use this, I'm just fixing this too while I fix the LP64isms I introduced in readelf...)
2019-11-13Pedantic constant annotations to shut up older toolchains.Rob Landley
2019-10-30rfkill: remove get_line().Elliott Hughes
2019-10-27Technosaurus on github pointed out the error message should say adjtimex.Rob Landley
2019-10-23Use adjtimex instead of adjtime (bionic hasn't got adjtime).Rob Landley
And check in more multicast support that's been sitting in the tree, I don't have a test enviornment for it anymore but somebody wanted this...
2019-09-23Fix ftpget downloadDenys Nykula
Investigate why downloads always freeze when I call ftpget. Trace it to a refactor leaving two REST and zero RETR.
2019-09-04Factor out AF_UNIX socket openting, use FLAG() macros, xsocket() alreadyRob Landley
does CLOEXEC (should fix macos build).
2019-07-17ifconfig: fix for non-root on Android.Elliott Hughes
The change from ioctl to xioctl in 844f0d1aae28c54bbb672f53ba2cda182c572129 broke ifconfig for non-root on Android. SIOCGIFHWADDR has been protected to prevent device tracking since Nougat. Bug: https://issuetracker.google.com/137671590
2019-07-11bind/connect cleanup.Elliott Hughes
Rename the existing xbind/xconnect to xbindany/xconnectany, to make room for new xbind/xconnect that are more like 'x' versions of the regular bind and connect. Move explicit bind/connect callers over to xbind/xconnect. Of the affected commands, only netcat is actually used by Android. It was the most recent patch to netcat that made the lack of a more traditional xbind/xconnect apparent.
2019-07-01netcat: Add UNIX domain socket support (-U)Tom Cherry
Other implementations of netcat support UNIX domain sockets via -U, so this change adds it to toybox too. Example usage: Create ./uds as a UNIX domain socket and listen on it, forwarding messages to bash: > nc -U -s ./uds -L /bin/bash Connect to ./uds as a UNIX domain socket > nc -U ./uds
2019-03-02Improve help consistency.Elliott Hughes
More consistent tense, capitalization, and punctuation. A few commands were missing an introductory line, so I copied those from the first comment line.
2019-03-02Fix instances of "Usage:" rather than "usage:".Elliott Hughes
2019-02-23Bumper typo cleanup.Elliott Hughes
Inspired by some of the small patches that have gone by recently. Limited to only things found in `generated/help.h`, plus a wider cleanup for the more common "milisecond" typo.
2019-02-21Fix typo in helpKevin van der Kamp
2019-02-20Simplify netcat a lot using the net.c upgrades from last commit.Rob Landley
2019-02-20Minor cleanups, mostly wordwrapping.Rob Landley
2019-02-13Oops, missed one.Rob Landley
2019-02-13Use xrecvwait() in ping, and move signal handler setup to start of ping loop.Rob Landley
2019-02-13Move nanomove(), nanodiff(), union socksaddr, and xrecvwait() to lib.Rob Landley
2019-02-05Promote sntp to net.Rob Landley
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-25OpenEmbedded needs commands installed in specific places.Rob Landley
2019-01-16Move xsendto() to lib/net.c.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-10-21Add % to lib/args.c (long time in milliseconds), add xmillitime(), redoRob Landley
xparsetime() not to need floating point, adjust callers.
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-09-08Tweaks to make building with Android NDK's llvm happier.Rob Landley
2018-08-18Allow enough space padding for "192.168.123.456/24" to consistently indent.Rob Landley
2018-08-17Make microcom use set_terminal() and move speed setting into set_terminal().Rob Landley
2018-08-05Add ifconfig -S (short view), and do some minor cleanups while there.Rob Landley
2018-08-05Tweak help text.Rob Landley
2018-07-19Tweak/add some comments.Rob Landley