Date: Tue, 16 Dec 2003 23:30:37 +0800 From: Dryice Liu <dryice@hotpop.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Dryice Liu <dryice@liu.com.cn> Subject: ports/60301: New Port: net/tcping Do a TCP connect to the given ip/port combination Message-ID: <20031216152307.909C91A0178@smtp-1.hotpop.com> Resent-Message-ID: <200312161540.hBGFeF03037163@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60301 >Category: ports >Synopsis: New Port: net/tcping Do a TCP connect to the given ip/port combination >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Dec 16 07:40:14 PST 2003 >Closed-Date: >Last-Modified: >Originator: Dryice Liu >Release: FreeBSD 5.1-RELEASE-p10 i386 >Organization: >Environment: System: FreeBSD dryice.3322.org 5.1-RELEASE-p10 FreeBSD 5.1-RELEASE-p10 #5: Wed Nov 26 23:55:53 CST 2003 ddliu@dryice.3322.org:/usr/obj/usr/src/sys/SERVER i386 >Description: Below is the shar file for tcping, which can do a TCP connection to the given ip/pport combination >How-To-Repeat: N/A >Fix: --- tcping.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # /usr/ports/net/tcping # /usr/ports/net/tcping/Makefile # /usr/ports/net/tcping/pkg-descr # /usr/ports/net/tcping/pkg-plist # /usr/ports/net/tcping/distinfo # echo c - /usr/ports/net/tcping mkdir -p /usr/ports/net/tcping > /dev/null 2>&1 echo x - /usr/ports/net/tcping/Makefile sed 's/^X//' >/usr/ports/net/tcping/Makefile << 'END-of-/usr/ports/net/tcping/Makefile' X# New ports collection makefile for: tcping X# Date created: Dec, 16 2003 X# Whom: Dryice Liu X# X# $FreeBSD$ X# X XPORTNAME= tcping XPORTVERSION= 1.3.3 XCATEGORIES= net XMASTER_SITES= http://stud.fh-heilbronn.de/~kirchner/tcping/ X XMAINTAINER= dryice@liu.com.cn XCOMMENT= Do a TCP connect to the given ip/port combination X XALL_TARGET= tcping.openbsd X Xdo-install: X ${INSTALL_PROGRAM} ${WRKSRC}/tcping ${PREFIX}/bin/tcping X X.include <bsd.port.mk> END-of-/usr/ports/net/tcping/Makefile echo x - /usr/ports/net/tcping/pkg-descr sed 's/^X//' >/usr/ports/net/tcping/pkg-descr << 'END-of-/usr/ports/net/tcping/pkg-descr' Xtcping does a TCP connect to the given ip/port combination. The user Xcan specify a timeout in seconds. This is useful in shell scripts Xrunning in firewalled environments. Often SYNs are just being dropped Xby firewalls, thus connection establishment will be retried several Xtimes (for minutes) until a TCP timeout is reached. With tcping it is Xpossible to check first if the desired port is reachable and then Xstart connection establishment. X XExit codes are: X X * -1: an error occured. X * 0: port is open X * 1: port is closed X * 2: user timeout X X XSyntax is: tcping [-q] [-t timeout_sec] [-u timeout_usec] <ip addr> <port> X X * -q : quiet mode, do not output anything (except error messages) X * -t : timeout in seconds X * -u : timeout in microseconds X XWWW: http://stud.fh-heilbronn.de/~kirchner/tcping/tcping.html END-of-/usr/ports/net/tcping/pkg-descr echo x - /usr/ports/net/tcping/pkg-plist sed 's/^X//' >/usr/ports/net/tcping/pkg-plist << 'END-of-/usr/ports/net/tcping/pkg-plist' Xbin/tcping X END-of-/usr/ports/net/tcping/pkg-plist echo x - /usr/ports/net/tcping/distinfo sed 's/^X//' >/usr/ports/net/tcping/distinfo << 'END-of-/usr/ports/net/tcping/distinfo' XMD5 (tcping-1.3.3.tar.gz) = 93621ec0a5d460ca22828d67178ec908 END-of-/usr/ports/net/tcping/distinfo exit --- tcping.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031216152307.909C91A0178>