summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/netcat.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Only use setsockopt(..SO_RTABLE..) if the -V flag is given to nc/telnet,sthen2013-10-261-7/+7
| | | | | same style as traceroute6 (change to int and use -1 as a flag, so rtable 0 can still be used as an explicit parameter).
* Oups, a little bit overzealous. If we "route -T4 exec telnet foo", thenphessler2013-10-211-1/+2
| | | | make sure telnet runs in rdomain 4 as expected. Same for nc.
* Set the requested rdomain on the socket instead of only on the IPv4 part.phessler2013-10-211-11/+7
| | | | Also, switching to rdomain zero is a legit option so we should allow that.
* add -F to usage() and help();jmc2013-08-201-2/+3
| | | | ok djm
* add -F flag to enabled fd-pass mode: establish connection and passdjm2013-08-201-3/+71
| | | | | | connected socket to stdout. This is useful in proxy mode to establish a connection for use by ssh in conjunction with its new ProxyUseFDPass option; ok markus@
* use FD_CLOEXEC instead of 1; from David Hillokan2013-04-291-2/+2
| | | | ok otto
* Don't shutdown nc(1)'s network socket when stdin closes. Matches *Hobbit*'ssthen2013-03-201-4/+10
| | | | | | original netcat and GNU netcat; revert to old behaviour with the new -N flag if needed. After much discussion with otto deraadt tedu and Martin Pelikan. ok deraadt@
* All accept() errors are considered fatal, until someone gives a differentderaadt2013-03-121-4/+5
| | | | reason. No code changed, just documenting it...
* Allow UDP server to receive datagrams from multiple socket pairs with -khaesbaert2012-07-071-5/+11
| | | | | | | 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@
* 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@
* Update comments. ok deraadt@lum2012-02-091-4/+3
|
* Remove unused protocol value check. ok brynet@lum2012-02-091-4/+1
|
* change -w to apply to the connection as well. manpage bit from jmc@fgsch2011-10-041-2/+40
| | | | nicm@ ok.
* Standarize the ToS option across nc/ping/traceroute so that they'llhaesbaert2011-09-171-17/+59
| | | | | | | 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
|
* Minor tweaks to nc(1) man page and usage.jeremy2011-01-091-3/+3
| | | | OK jmc@, nicm@, tedu@
* Support unix domain sockets in nc(1) with -Uu.jeremy2011-01-081-23/+67
| | | | | | | | | | | | | | | | | | | | | 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@
* Fix the naming of interfaces and variables for rdomains and rtablesguenther2010-07-031-14/+14
| | | | | | | | | | | | 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-201-3/+2
| | | | | | 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
* Do not write "Connection to ... succeeded" messages to stdout.mpf2009-10-081-3/+5
| | | | OK gilles, rainer, millert, deraadt.
* The networking swissarmy knife needs to work on alternate domains as well.claudio2009-06-051-4/+24
| | | | Again -V can be used to specify the domain.
* documentation tweaks; synchronize synopsis and usage.sobrado2008-09-191-5/+6
| | | | | | written with help by jmc@ ok jmc@
* try SO_BINDANY for -s, but do not insist; ok bob, reykmarkus2008-05-091-2/+4
|
* allow setting of TCP send/receive buffer sizes; ok markus@djm2008-05-061-3/+30
|
* usage(): add -P and tweak -X; from Igor Sobradojmc2007-02-201-3/+3
|
* strtoul() -> strtonum(). Also change iflag to unsigned int, sinceray2006-06-021-23/+21
| | | | | | sleep takes an unsigned integer. OK moritz@, jaredy@, and dhill@
* remove obsolete code; from Ray Lai in PR 4998; ok tedu@ beck@otto2006-02-011-8/+1
|
* implement HTTP proxy authentication support, very useful in a ssh_configdjm2006-01-251-5/+11
| | | | 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-251-3/+33
| | | | 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
|
* 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@
* Switch atomicio to a simpler interface which returns size_t and usesavsm2005-05-241-10/+7
| | | | | | | 0 to signal errors. should be no functional change in nc apart from different error messages. "groovy", said deraadt@
* Initialize len before calling accept(2). from mpech@, ok millert@otto2005-04-101-1/+2
|
* Some extra strict warning cleanup. From Xin Li <delphij at FreeBSDotto2005-02-081-5/+5
| | | | dot ORG> with a twist from myself. No binary change. ok djm@
* provide a valid sockaddr_storage structure to be used as second argument forhshoexer2004-12-101-2/+2
| | | | | | accept(2) ok djm markus
* http proxy CONNECT support; ok beck@djm2004-10-171-7/+12
|
* remove return error variables.. set but never usedderaadt2004-09-151-15/+11
|
* add -D for sodebug; ok deraadt, jmcmarkus2004-07-151-3/+18
|
* add keeps to SYNOPSIS and sync usage();jmc2004-03-121-4/+4
|
* Print error when connect() fails. ok markus@ deraadt@mcbride2004-03-071-1/+4
|
* spaces, was reading code..deraadt2004-03-031-4/+4
|
* add -d to usage too, from carson hardingtedu2004-03-031-2/+3
|
* resolve pr3694. add -d [etached] to ignore stdin. ok henning@ mcbride@tedu2004-03-011-4/+8
|