From owner-svn-src-all@FreeBSD.ORG Thu Mar 5 13:27:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72854B9A; Thu, 5 Mar 2015 13:27:31 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F79078F; Thu, 5 Mar 2015 13:27:30 +0000 (UTC) Received: from dhcp-172-17-156-6.eduroam.wireless.private.cam.ac.uk (global-1-26.nat.csx.cam.ac.uk [131.111.184.26]) (authenticated bits=0) by theravensnest.org (8.15.1/8.14.9) with ESMTPSA id t25DRNZ9050221 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Mar 2015 13:27:28 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host global-1-26.nat.csx.cam.ac.uk [131.111.184.26] claimed to be dhcp-172-17-156-6.eduroam.wireless.private.cam.ac.uk Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r279603 - in head: bin/rcp usr.bin/rlogin usr.bin/rsh From: David Chisnall In-Reply-To: <20150305131448.GW48476@zxy.spb.ru> Date: Thu, 5 Mar 2015 13:27:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <08E91A87-E3FA-47AE-ABDC-C23CA1A55B4C@FreeBSD.org> References: <201503042201.t24M1jDG009278@svn.freebsd.org> <20150305114828.GK17947@FreeBSD.org> <20150305122103.GA90978@zxy.spb.ru> <20150305122359.GM17947@FreeBSD.org> <20150305123016.GO48476@zxy.spb.ru> <20150305123053.GN17947@FreeBSD.org> <20150305123349.GP48476@zxy.spb.ru> <364175B2-D8E4-489C-91BF-C121EA3C4EB3@cl.cam.ac.uk> <20150305124246.GS48476@zxy.spb.ru> <113C6811-8C79-4E7F-A909-73D0F3F6315C@FreeBSD.org> <20150305131448.GW48476@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, Baptiste Daroussin , Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2015 13:27:31 -0000 On 5 Mar 2015, at 13:14, Slawa Olhovchenkov wrote: >=20 > In previos message -- silently return when telnet speak about used IP > address and diagnostic messages. One simple command do many diagnostic > information. Okay, so check the return code. Or pass -v if you want more verbose = information: $ nc -v foo.example.com 80 nc: getaddrinfo: nodename nor servname provided, or not known $ nc -v localhost 80 nc: connectx to localhost port 80 (tcp) failed: Connection refused nc: connectx to localhost port 80 (tcp) failed: Connection refused nc: connectx to localhost port 80 (tcp) failed: Connection refused Or even alias nc -v to telnet if you like typing more... Or add -D, if you want more debugging information. > I am know only about telnet can connect to unix socket. So can cat... Actually, so can nc if you read the man page (which, of = course, you did before deciding that it couldn't do what you needed). = With -U, it will connect to a UNIX domain socket. Oh, and it can also = create UNIX sockets for listening to: $ nc -l -U tmp=20 $ # in another terminal: $ nc -U tmp And now you have two nc instances talking to each other via a UNIX = socket. > Why not? And why before this is will be ok? Telnet is in the base system because, back in the 4BSD days, telnet was = the recommended way that you logged into remote computers. Now it = isn't. For most network diagnostic and simple socket operations, nc is = a far more useful tool. Including things that want to talk to UNIX = sockets. David