summaryrefslogtreecommitdiff
path: root/usr.bin/nc
AgeCommit message (Collapse)Author
2012-12-04remove some unnecessary sys/param.h inclusionsTheo de Raadt
2012-07-07Allow UDP server to receive datagrams from multiple socket pairs with -kChristiano F. Haesbaert
flag. Prompted by a question from dsp at 2f30 dot org, diff from Lazarom Koromil with a few tweaks by me, many thanks. ok mikeb@ nicm@ haesbaert@
2012-07-07Report incoming connections when -l is specified with -v.Christiano F. Haesbaert
From Ricky Zhou with a few tweaks by me. ok henning@ haesbaert@
2012-04-01error out if accept() failsTheo de Raadt
2012-03-17remove IP_JUMBO, SO_JUMBO, and RTF_JUMBO.David Gwynne
no objection from mcbride@ krw@ markus@ deraadt@
2012-03-08fix format strings for size_tMarc Espie
ok okan@
2012-02-09Update comments. ok deraadt@lum
2012-02-09Remove unused protocol value check. ok brynet@lum
2012-02-07Expand the CAVEAT section to more fully describe the behaviour oflum
the -uz combination. This diff stems from a diff by brynet@ sent to tech@ help from jmc@ regarding wording.
2011-10-04change -w to apply to the connection as well. manpage bit from jmc@Federico G. Schwindt
nicm@ ok.
2011-09-17Standarize the ToS option across nc/ping/traceroute so that they'llChristiano F. Haesbaert
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@
2011-06-21Convert SO_RTABLE's protocol level to the SOL_SOCKET; ok claudioMike Belopuhov
2011-02-12fix from pr 6207. a bit more of an explanation: we write the correctOkan Demirmen
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@
2011-01-09Minor tweaks to nc(1) man page and usage.Jeremy Evans
OK jmc@, nicm@, tedu@
2011-01-08Enable unix datagram support by treating ENOBUFS like EAGAIN.Jeremy Evans
Separate commit requested by deraadt@. OK nicm@
2011-01-08Support unix domain sockets in nc(1) with -Uu.Jeremy Evans
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@
2010-07-25echo behaves differently in sh and csh, only handling C-style escapesPhilip Guenthe
in the former, so switch an example that needs them to use printf instead. From bcr at freebsd.org. ok halex@
2010-07-03Fix the naming of interfaces and variables for rdomains and rtablesPhilip Guenthe
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
2010-04-20Bump the default buffer sizes to be larger than default MTUs, from JanNicholas Marriott
Zeleny. ok djm
2010-04-20Allocate the port number properly (don't allocate space then ignore it),Nicholas Marriott
and use %zu for size_t. ok djm
2010-02-27Fix the atelnet() function, which was wrong in several ways.Nicholas Marriott
Pointed out by obsd at happyjack.org, fix based on a diff from kili@. ok deraadt
2010-02-23Fix the worst among the fatal block-nesting issues we have in our tree,Ingo Schwarze
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@
2009-10-22write UNIX-domain in a more consistent way; while here, replace aIgor Sobrado
few remaining ".Tn UNIX" macros with ".Ux" ones. pointed out by ratchov@, thanks! ok jmc@
2009-10-22use the UNIX-related macros (.At and .Ux) where appropriate.Igor Sobrado
ok jmc@
2009-10-08Do not write "Connection to ... succeeded" messages to stdout.Marco Pfatschbacher
OK gilles, rainer, millert, deraadt.
2009-06-05tweak -V;Jason McIntyre
2009-06-05The networking swissarmy knife needs to work on alternate domains as well.Claudio Jeker
Again -V can be used to specify the domain.
2008-09-19documentation tweaks; synchronize synopsis and usage.Igor Sobrado
written with help by jmc@ ok jmc@
2008-05-09try SO_BINDANY for -s, but do not insist; ok bob, reykMarkus Friedl
2008-05-06- put the description of -O in the right placeJason McIntyre
- shorten the argument names to -IO
2008-05-06allow setting of TCP send/receive buffer sizes; ok markus@Damien Miller
2007-09-07Synced atomicio implementation in nc and sendbug with ssh.Tobias Stoeckmann
OK djm@, joris@, ray@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-02-20usage(): add -P and tweak -X; from Igor SobradoJason McIntyre
2006-12-02tweaks; from claus assmann (pr #5317);Jason McIntyre
2006-09-25Also accept "HTTP/1.1 200" as a success response.Ray Lai
OK djm@.
2006-06-02strtoul() -> strtonum(). Also change iflag to unsigned int, sinceRay Lai
sleep takes an unsigned integer. OK moritz@, jaredy@, and dhill@
2006-02-11type correctness; from Ray Lai in PR 5011; ok millert@Otto Moerbeek
2006-02-01remove obsolete code; from Ray Lai in PR 4998; ok tedu@ beck@Otto Moerbeek
2006-01-31use "proxy_protocol" as the arg to -X, not "proxy_version";Jason McIntyre
from ray lai;
2006-01-25implement HTTP proxy authentication support, very useful in a ssh_configDamien Miller
ProxyCommand; ok beck@
2006-01-20Explicitly include limits.h if we are going to use its contents.Todd C. Miller
2005-10-25Make set_common_sockopts() a void since it doesn't return anything anyway.Darren Tucker
Makes netcat -Wall clean. ok djm@
2005-10-25Add a -T option to nc to allow setting of IP type-of-service bits onDarren Tucker
connections. Man page corrections jmc@, code corrections and ok djm@
2005-07-24correct rval check for socket(). from alf schlichting. ok markus@marius eriksen
2005-07-17oops... .Dl does not like to be inundated with args, and my last commit justJason McIntyre
exceeded the happy number - use a display instead.
2005-07-17some improvements from alf schlichting:Jason McIntyre
- 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
2005-05-28set jumbo flag on the listener, too. consolidate some common code.marius eriksen
ok mcbride@
2005-05-27Experimental support for opportunitic use of jumbograms where only some hostsRyan Thomas McBride
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@
2005-05-26style nit from hshoexer@Anil Madhavapeddy