From: Arnaud RĂ©billout Date: Fri, 13 Sep 2013 07:33:58 +0000 (+0200) Subject: tcping: new package X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cccb417e8fb169569561cfa4446e43db714eab36;p=buildroot.git tcping: new package tcping does a TCP connect to the given ip/port combination. The user can specify a timeout in seconds. This is useful in shell scripts running in firewalled environments. Often SYNs are just being dropped by firewalls, thus connection establishment will be retried several times (for minutes) until a TCP timeout is reached. With tcping it is possible to check first if the desired port is reachable and then start connection establishment. http://www.linuxco.de/tcping/tcping.html [Peter: wrap help text, pass TARGET_LDFLAGS] Signed-off-by: Arnaud RĂ©billout Signed-off-by: Peter Korsgaard --- diff --git a/package/Config.in b/package/Config.in index aae3296dee..3ea4b4ecbd 100644 --- a/package/Config.in +++ b/package/Config.in @@ -858,6 +858,7 @@ source "package/squid/Config.in" source "package/strongswan/Config.in" source "package/stunnel/Config.in" source "package/tcpdump/Config.in" +source "package/tcping/Config.in" source "package/tcpreplay/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/tftpd/Config.in" diff --git a/package/tcping/Config.in b/package/tcping/Config.in new file mode 100644 index 0000000000..6677b58b7c --- /dev/null +++ b/package/tcping/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port + combination. The user can specify a timeout in seconds. This + is useful in shell scripts running in firewalled + environments. Often SYNs are just being dropped by + firewalls, thus connection establishment will be retried + several times (for minutes) until a TCP timeout is + reached. With tcping it is possible to check first if the + desired port is reachable and then start connection + establishment. + + http://www.linuxco.de/tcping/tcping.html diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk new file mode 100644 index 0000000000..ff43490c81 --- /dev/null +++ b/package/tcping/tcping.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.5 +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package))