tcping | Ping look-alike that uses TCP SYN packets | Networking library

 by   coolsnowwolf C Version: Current License: LGPL-3.0

kandi X-RAY | tcping Summary

kandi X-RAY | tcping Summary

tcping is a C library typically used in Networking applications. tcping has no bugs, it has no vulnerabilities, it has a Weak Copyleft License and it has low support. You can download it from GitHub.

Ping look-alike that uses TCP SYN packets to get around firewalls and ICMP blackholes. tcpping is a quick utility designed to emulate standard 'ping' in nearly every meaningful way and only diverge when necessary. It sends out forged TCP SYN packets and listens for a SYN/ACK or RST from the server or intermediary. It counts and reports on these results using an interface that is nearly identical to standard UNIX ping. --- Why Use Instead of Ping -------------------------------------------------. On the global Internet, some routers or systems will firewall ICMP messages while allowing TCP packets. Furthermore, some routers or hosts will 'deprioritize' ICMP ping (echo) messages destined for itself or others -- when the network gets busy, these get dropped. However, virtually all public servers and the majority of private systems have at least one TCP port open and will respond to requests on it quickly and reliably. This provides greater accuracy (or any accuracy at all) for determining if a host is available. It also yields more reliable timing for sensitive latency and loss measurements as deprioritized packets will not be a true measure of latency for normal traffic (better simulated by TCP packets). It was originally written by Steven Kehlet (blog at kehlet.cx); it was taken over, bugfixed, and now maintained (with the original author's blessing) by Jim Wyllie.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tcping has a low active ecosystem.
              It has 17 star(s) with 7 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 0 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of tcping is current.

            kandi-Quality Quality

              tcping has 0 bugs and 0 code smells.

            kandi-Security Security

              tcping has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tcping code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tcping is licensed under the LGPL-3.0 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              tcping releases are not available. You will need to build from source code and install.
              It has 70 lines of code, 0 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of tcping
            Get all kandi verified functions for this library.

            tcping Key Features

            No Key Features are available at this moment for tcping.

            tcping Examples and Code Snippets

            No Code Snippets are available at this moment for tcping.

            Community Discussions

            QUESTION

            Why is there a discrepancy between python sockets and tcp ping for the same IP:port destination?
            Asked 2021-Apr-02 at 13:36

            My setup:

            1. I am using an IP and port provided by portmap.io to allow me to perform port forwarding.
            2. I have OpenVPN installed (as required by portmap.io), and I run a ready-made config file when I want to operate my project.
            3. My main effort involves sending messages between a client and a server using sockets in Python.
            4. I have installed a software called tcping, which basically allows me to ping an IP:port over a tcp connection.

            This figure basically sums it up:

            Results I'm getting:

            1. When I try to "ping" said IP, the average RTT ends up being around 30ms consistently.
            2. I try to use the same IP to program sockets in Python, where I have a server script on my machine running, and a client script on any other machine but binding to this IP. I try sending a small message like "Hello" over the socket, and I am finding that the message is taking a significantly greater amount of time to travel across, and an inconsistent one for that matter. Sometimes it ends up taking 1 second, sometimes 400ms...

            What is the reason for this discrepancy?

            ...

            ANSWER

            Answered 2021-Apr-02 at 13:36

            What is the reason for this discrepancy?

            tcpping just measures the time needed to establish the TCP connection. The connection establishment is usually completely done in the OS kernel, so there is not even a switch to user space involved.

            Even some small data exchange at the application is significantly more expensive. First, the initial TCP handshake must be done. Usually only once the TCP handshake is done the client starts sending the payload, which then needs to be delivered to the other side, put into the sockets read buffer, schedule the user space application to run, read the data from the buffer in the application and process, create and deliver the response to the peers OS kernel, let the kernel deliver the response to the local system and lots of stuff here too until the local app finally gets the response and ends the timing of how long this takes.

            Given that the time for the last one is that much off from the pure RTT I would assume though that the server system has either low performance or high load or that the application is written badly.

            Source https://stackoverflow.com/questions/66917417

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tcping

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/coolsnowwolf/tcping.git

          • CLI

            gh repo clone coolsnowwolf/tcping

          • sshUrl

            git@github.com:coolsnowwolf/tcping.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Networking Libraries

            Moya

            by Moya

            diaspora

            by diaspora

            kcptun

            by xtaci

            cilium

            by cilium

            kcp

            by skywind3000

            Try Top Libraries by coolsnowwolf

            lede

            by coolsnowwolfC

            openwrt-gl-ax1800

            by coolsnowwolfC

            gargoyle

            by coolsnowwolfC