summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc/nc.1
diff options
context:
space:
mode:
authorjmc <>2005-02-21 10:56:22 +0000
committerjmc <>2005-02-21 10:56:22 +0000
commit52fef3b7d084fa9e2d0ac9187917b0ede8d9d58d (patch)
tree274ff99002b988569a600e2481436baefeabf3d1 /src/usr.bin/nc/nc.1
parentfb54ef2aab0dedeb72ccd4b71be1908a6178c8e0 (diff)
downloadopenbsd-52fef3b7d084fa9e2d0ac9187917b0ede8d9d58d.tar.gz
openbsd-52fef3b7d084fa9e2d0ac9187917b0ede8d9d58d.tar.bz2
openbsd-52fef3b7d084fa9e2d0ac9187917b0ede8d9d58d.zip
use a standard hostname in EXAMPLES (host.example.com), which also
fixes an error; from ray;
Diffstat (limited to 'src/usr.bin/nc/nc.1')
-rw-r--r--src/usr.bin/nc/nc.123
1 files changed, 12 insertions, 11 deletions
diff --git a/src/usr.bin/nc/nc.1 b/src/usr.bin/nc/nc.1
index 472fa76cb9..64a09ec7f2 100644
--- a/src/usr.bin/nc/nc.1
+++ b/src/usr.bin/nc/nc.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: nc.1,v 1.36 2005/01/07 10:11:31 jmc Exp $ 1.\" $OpenBSD: nc.1,v 1.37 2005/02/21 10:56:22 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 1996 David Sacerdote 3.\" Copyright (c) 1996 David Sacerdote
4.\" All rights reserved. 4.\" All rights reserved.
@@ -351,32 +351,33 @@ Protocol mismatch.
351220 host.example.com IMS SMTP Receiver Version 0.84 Ready 351220 host.example.com IMS SMTP Receiver Version 0.84 Ready
352.Ed 352.Ed
353.Sh EXAMPLES 353.Sh EXAMPLES
354Open a TCP connection to port 42 of hostname, using port 31337 as 354Open a TCP connection to port 42 of host.example.com, using port 31337 as
355the source port, with a timeout of 5 seconds: 355the source port, with a timeout of 5 seconds:
356.Pp 356.Pp
357.Dl $ nc -p 31337 -w 5 hostname 42 357.Dl $ nc -p 31337 -w 5 host.example.com 42
358.Pp 358.Pp
359Open a UDP connection to port 53 of hostname: 359Open a UDP connection to port 53 of host.example.com:
360.Pp 360.Pp
361.Dl $ nc -u hostname 53 361.Dl $ nc -u host.example.com 53
362.Pp 362.Pp
363Open a TCP connection to port 42 of example.host using 10.1.2.3 as the 363Open a TCP connection to port 42 of host.example.com using 10.1.2.3 as the
364IP for the local end of the connection: 364IP for the local end of the connection:
365.Pp 365.Pp
366.Dl $ nc -s 10.1.2.3 example.host 42 366.Dl $ nc -s 10.1.2.3 host.example.com 42
367.Pp 367.Pp
368Send UDP packets to ports 20-30 of example.host, and report which ones 368Send UDP packets to ports 20-30 of host.example.com, and report which ones
369responded with an ICMP packet after three seconds: 369responded with an ICMP packet after three seconds:
370.Pp 370.Pp
371.Dl $ nc -uvz -w 3 hostname 20-30 371.Dl $ nc -uvz -w 3 host.example.com 20-30
372.Pp 372.Pp
373Create and listen on a Unix Domain Socket: 373Create and listen on a Unix Domain Socket:
374.Pp 374.Pp
375.Dl $ nc -lU /var/tmp/dsocket 375.Dl $ nc -lU /var/tmp/dsocket
376.Pp 376.Pp
377Connect to port 42 of hostname via an HTTP proxy at 10.2.3.4, port 8080: 377Connect to port 42 of host.example.com via an HTTP proxy at 10.2.3.4,
378port 8080:
378.Pp 379.Pp
379.Dl $ nc -x10.2.3.4:8080 -Xconnect hostname 42 380.Dl $ nc -x10.2.3.4:8080 -Xconnect host.example.com 42
380.Sh SEE ALSO 381.Sh SEE ALSO
381.Xr cat 1 382.Xr cat 1
382.Sh AUTHORS 383.Sh AUTHORS