Git Product home page Git Product logo

liboping's Introduction

 liboping – Library to ping IPv4 and IPv6 hosts in parallel
════════════════════════════════════════════════════════════
http://noping.cc/

About
━━━━━

  liboping was inspired by ping, libping and fping: It differs from these
  existing solutions in that it can “ping” multiple hosts in parallel using
  IPv4 or IPv6 transparently. Other design principles were an object oriented
  interface, simplicity and extensibility.

  On top of liboping two command line applications have been built. “oping” is
  a drop-in replacement for ping(1) with very similar output. “noping” is an
  ncurses-based application which displays statistics while pinging and
  highlights aberrant round-trip times.


Features
━━━━━━━━

  • Support for multiple hosts.

  • Support for IPv4 and IPv6.

  • Object oriented interface.


Perl bindings
━━━━━━━━━━━━━

  Included in the source package of liboping are bindings for Perl. The code
  resides in the bindings/ subdirectory and is compiled and installed by
  default. To disable building the Perl bindings, call “configure” with
  “--without-perl-bindings”.


Permissions
━━━━━━━━━━━━━

  On UNIX, special permissions are required to open raw sockets (raw(7)). If
  you compile and install the “oping” and “noping” binaries as normal user
  (which is strongly suggested), you won't be able to use the binaries as a
  normal user, because you won't have the permission to open raw sockets.

  The “install” target will automatically try fix this, if it is run with UID~0
  (as user root).  When on Linux, the capabilities described below will be
  added. On other UNIXes the traditional Set-UID method (also described below)
  is used instead. The build system will not abort if this fails, because there
  are file systems which do not support either method. Also, the Debian
  packaging system and possibly other scenarios only act as if they were
  running as root.

  Linux
  ━━━━━
  On Linux, the preferred method is to assign the required “capability” to the
  binaries. This will allow the binary to open raw sockets, but doesn't give
  any other permissions such as reading other users' files or shutting down the
  system. The downside is that this mechanism is comparatively new: Assigning
  capabilities to files is available since Linux 2.6.24.

  To set the required capabilities, run (as user root):

    # setcap cap_net_raw=ep /opt/oping/bin/oping
    # setcap cap_net_raw=ep /opt/oping/bin/noping

  Other UNIX
  ━━━━━━━━━━
  Capabilities are a nice but Linux-specific solution. To make “oping” and
  “noping” available to unprivileged users on other UNIX systems, use the
  traditional set-UID root solution. If your system supports “saved set-UIDs”
  (basically all systems do), the applications will drop the privileges during
  initialization and only regain them when actually opening the socket(s).

  To set the set-UID bit, run (as user root):

    # chown root: /opt/oping/bin/{,n}oping
    # chmod u+s   /opt/oping/bin/{,n}oping


Licensing terms
━━━━━━━━━━━━━━━

  liboping is licensed under the “GNU Lesser General Public License” (LGPL),
  version 2.1 or later. The exact licensing terms can be found in the file
  “COPYING” included in the source distribution of liboping.

  The “oping” and “noping” utilities included in this package are licensed
  under the “GNU General Public License” (GPL), version 2. The full licensing
  terms can be found online at <http://www.gnu.org/licenses/gpl-2.0.html>.


Author
━━━━━━

  Florian “octo” Forster <ff at octo.it>

liboping's People

Contributors

octo avatar hamishcoleman avatar anarcat avatar tokkee avatar wladwm avatar barak avatar claytono avatar dougm avatar fsoderblom avatar vesath avatar cron2 avatar kylezhou avatar manish364824 avatar whissi avatar tfheen avatar yann-morin-1998 avatar middleo avatar

Stargazers

Harold Ancell avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

manish364824

liboping's Issues

mixes up clients

I'm not sure if this applies to 1.8.0 but just in case I am placing it here.
This is a copy of https://bugs.debian.org/745026

From: "Steinar H. Gunderson" [email protected]
To: Debian Bug Tracking System [email protected]
Subject: mixes up clients, causing spurious ping replies
Date: Thu, 17 Apr 2014 12:44:24 +0200

Package: liboping0
Version: 1.6.2-1

Hi,

I'm using liboping (through the Perl module) to ping ~250 devices and put the results on a map. However, frequently, clients that cannot possibly be up (they haven't been deployed yet) blip up for one ping as if they were up, with a completely reasonable latency value.

Some code reading uncovered why: liboping uses random ICMP ident values (which are 16 bit) for each ping, and when the ping reply comes back, it uses only this ident value to correlate it back to the machine. Due to the birthday problem, 250 devices mean that there's ~50% probability of two devices getting the same ident value, and so the ping reply from one of the hosts actually being up gets misattributed to one of the hosts that are down. This affects both IPv4 and IPv6.

I've hacked around it by dropping the randomization (just counting ident sequentially up), but a better fix would probably be simply checking the source address of the reply packet (in addition to the ident); by definition, it should be the same as the one we sent to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.