summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Report incoming connections when -l is specified with -v.haesbaert2012-07-071-1/+35
| | | | | | From Ricky Zhou with a few tweaks by me. ok henning@ haesbaert@
* error out if accept() failsderaadt2012-04-011-1/+3
|
* remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.dlg2012-03-171-13/+4
| | | | no objection from mcbride@ krw@ markus@ deraadt@
* fix format strings for size_tespie2012-03-081-3/+3
| | | | ok okan@
* Update comments. ok deraadt@lum2012-02-091-4/+3
|
* Remove unused protocol value check. ok brynet@lum2012-02-091-4/+1
|
* Expand the CAVEAT section to more fully describe the behaviour oflum2012-02-071-6/+13
| | | | | | | | the -uz combination. This diff stems from a diff by brynet@ sent to tech@ help from jmc@ regarding wording.
* change -w to apply to the connection as well. manpage bit from jmc@fgsch2011-10-042-6/+44
| | | | nicm@ ok.
* Standarize the ToS option across nc/ping/traceroute so that they'llhaesbaert2011-09-172-28/+77
| | | | | | | accept the same values as pf.conf. It accepts decimal, hexadecimal and the dscp/tos keywords. The ping option was ripped of in SMALL. ok mcbride@ sthen@
* Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudiomikeb2011-06-211-2/+2
|
* fix from pr 6207. a bit more of an explanation: we write the correctokan2011-02-121-4/+18
| | | | | | | | | | number of bits when connecting via a SOCKS 5 proxy over ipv6, but we also need to read the same number depending on the received address type. this issue is not noticeable with ssh's SOCKS 5 support since it always set the address type as ipv4. this fixes connections via SOCKS 5 proxies which set their address type as ipv6 when using ipv6. after review with, and ok, nicm@
* Minor tweaks to nc(1) man page and usage.jeremy2011-01-092-16/+23
| | | | OK jmc@, nicm@, tedu@
* Enable unix datagram support by treating ENOBUFS like EAGAIN.jeremy2011-01-081-2/+2
| | | | | | Separate commit requested by deraadt@. OK nicm@
* Support unix domain sockets in nc(1) with -Uu.jeremy2011-01-082-25/+83
| | | | | | | | | | | | | | | | | | | | | Previously, using -U with -u was an error that was not documented in the man page. Now it will use a unix socket in datagram mode. Bidirectional unix datagram communication requires a socket at both ends, so in client mode (without -l), a temporary socket is created so that responses from the server can be received. If -s is specified with -U and -u, it specifies the location of the temporary socket to create. This was mostly written way back in 2007. Since then, various improvements implemented based on suggestions from guenther@, tedu@, and nicm@. Man page help from nicm@ and jmc@. Unix datagram support requires a small change to atomicio.c in order to function correctly, this will be committed separately shortly. OK nicm@
* echo behaves differently in sh and csh, only handling C-style escapesguenther2010-07-251-3/+3
| | | | | | in the former, so switch an example that needs them to use printf instead. From bcr at freebsd.org. ok halex@
* Fix the naming of interfaces and variables for rdomains and rtablesguenther2010-07-032-19/+19
| | | | | | | | | | | | and make it possible to bind sockets (including listening sockets!) to rtables and not just rdomains. This changes the name of the system calls, socket option, and ioctl. After building with this you should remove the files /usr/share/man/cat2/[gs]etrdomain.0. Since this removes the existing [gs]etrdomain() system calls, the libc major is bumped. Written by claudio@, criticized^Wcritiqued by me
* Bump the default buffer sizes to be larger than default MTUs, from Jannicm2010-04-201-5/+5
| | | | | | Zeleny. ok djm
* Allocate the port number properly (don't allocate space then ignore it),nicm2010-04-202-12/+11
| | | | | | and use %zu for size_t. ok djm
* Fix the atelnet() function, which was wrong in several ways.nicm2010-02-271-13/+13
| | | | | | Pointed out by obsd at happyjack.org, fix based on a diff from kili@. ok deraadt
* Fix the worst among the fatal block-nesting issues we have in our tree,schwarze2010-02-231-4/+4
| | | | | | | | | | | | in the end simply changing Oo Xo Oo Oc Oc Xc to Oo Xo Oo Oc Xc Oc. I tried five different variants without the Xo/Xc, because there is no real reason why Xo/Xc should be needed here, and two additional variants with Xo/Xc that look more pretty than what i'm now committing. All seven alternatives work both with mandoc and groff 1.20.1, but all seven trigger various different bugs in our old groff, and we still need to remain compatible with our old groff right now. ok jmc@ sobrado@
* write UNIX-domain in a more consistent way; while here, replace asobrado2009-10-221-5/+5
| | | | | | | | few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
* use the UNIX-related macros (.At and .Ux) where appropriate.sobrado2009-10-221-4/+8
| | | | ok jmc@
* Do not write "Connection to ... succeeded" messages to stdout.mpf2009-10-081-3/+5
| | | | OK gilles, rainer, millert, deraadt.
* tweak -V;jmc2009-06-051-2/+3
|
* The networking swissarmy knife needs to work on alternate domains as well.claudio2009-06-052-6/+29
| | | | Again -V can be used to specify the domain.
* documentation tweaks; synchronize synopsis and usage.sobrado2008-09-192-10/+11
| | | | | | written with help by jmc@ ok jmc@
* try SO_BINDANY for -s, but do not insist; ok bob, reykmarkus2008-05-091-2/+4
|
* - put the description of -O in the right placejmc2008-05-061-6/+6
| | | | - shorten the argument names to -IO
* allow setting of TCP send/receive buffer sizes; ok markus@djm2008-05-062-5/+38
|
* Synced atomicio implementation in nc and sendbug with ssh.tobias2007-09-072-13/+24
| | | | OK djm@, joris@, ray@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* usage(): add -P and tweak -X; from Igor Sobradojmc2007-02-201-3/+3
|
* tweaks; from claus assmann (pr #5317);jmc2006-12-021-3/+3
|
* Also accept "HTTP/1.1 200" as a success response.ray2006-09-251-2/+3
| | | | OK djm@.
* strtoul() -> strtonum(). Also change iflag to unsigned int, sinceray2006-06-021-23/+21
| | | | | | sleep takes an unsigned integer. OK moritz@, jaredy@, and dhill@
* type correctness; from Ray Lai in PR 5011; ok millert@otto2006-02-111-2/+2
|
* remove obsolete code; from Ray Lai in PR 4998; ok tedu@ beck@otto2006-02-011-8/+1
|
* use "proxy_protocol" as the arg to -X, not "proxy_version";jmc2006-01-311-2/+2
| | | | from ray lai;
* implement HTTP proxy authentication support, very useful in a ssh_configdjm2006-01-253-23/+95
| | | | ProxyCommand; ok beck@
* Explicitly include limits.h if we are going to use its contents.millert2006-01-201-1/+2
|
* Make set_common_sockopts() a void since it doesn't return anything anyway.dtucker2005-10-251-3/+3
| | | | Makes netcat -Wall clean. ok djm@
* Add a -T option to nc to allow setting of IP type-of-service bits ondtucker2005-10-252-4/+43
| | | | connections. Man page corrections jmc@, code corrections and ok djm@
* correct rval check for socket(). from alf schlichting. ok markus@marius2005-07-241-2/+2
|
* oops... .Dl does not like to be inundated with args, and my last commit justjmc2005-07-171-3/+4
| | | | exceeded the happy number - use a display instead.
* some improvements from alf schlichting:jmc2005-07-171-14/+11
| | | | | | | | | | - correct syntax for retrieving an http page. this example further corrected by ian darwin (thanks!) - the -v flag is relatively useless when port scanning, so remove it from the example, and reword the description appropriately - udp port scans always report ports as open (i.e. are useless) so remove example claiming it works, and add CAVEATS to note that -uz is relatively useless
* set jumbo flag on the listener, too. consolidate some common code.marius2005-05-281-28/+29
| | | | ok mcbride@
* Experimental support for opportunitic use of jumbograms where only some hostsmcbride2005-05-271-8/+22
| | | | | | | | | | | | | | on the local network support them. This adds a new socket option, SO_JUMBO, and a new route flag, RTF_JUMBO. If _both_ the socket option is set and the route for the host has RTF_JUMBO set, ip_output will fragment the packet to the largest possible size for the link, ignoring the card's MTU. The semantics of this feature will be evolving rapidly; talk to us if you intend to use it. ok deraadt@ marius@
* style nit from hshoexer@avsm2005-05-261-1/+2
|
* Switch atomicio to a simpler interface which returns size_t and usesavsm2005-05-244-55/+78
| | | | | | | 0 to signal errors. should be no functional change in nc apart from different error messages. "groovy", said deraadt@
* Teach the SOCKS5 code more of the protocol, so it can send domain namesdjm2005-05-201-56/+102
| | | | | | to the proxy instead of resolving them locally and sending IPv4 addresses. This improves privacy, e.g. when using nc with OpenSSH DynamicForward tunnels, and gives us better IPv6 support; ok beck@