ping_send(3)

πŸ“¦
version 1.10.0 Β· 8 versions
, in alpine 3.24, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

✨ ping_send β€” the manual, but make it a group chat ✨

okay so bestie, welcome to ping_send(3) from the liboping manual πŸ’– this is the page about the actual, literal workhorse of the whole library, so sit down, hydrate, and let's get into it 🫢


🌸 NAME 🌸

ping_send β€” send ICMP echo requests to all the hosts you've associated, and then wait around for the ICMP echo responses to show up πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <oping.h>

int ping_send (pingobj_t *obj);

πŸ¦‹ DESCRIPTION πŸ¦‹

The ping_send method is, no exaggeration, the actual workhorse of this library πŸ‘‘ like, everything else is cute supporting cast and this is the main character. What it does:

  1. It crafts ICMP packets for all the hosts associated with obj ✨
  2. It sends them out through the corresponding sockets πŸ“€
  3. It then waits for echo responses and receives them, writing latency information for each host ⏳
  4. It comes back once all the echo replies have been read, or once the timeout is reached β€” and that timeout is the one you set with ping_setopt(3) ⏰
After this function returns, you'll most likely be looping over all your hosts using ping_iterator_get(3) and ping_iterator_next (which is described on that same manual page, iykyk) and then calling ping_iterator_get_info(3) on each host. That's the whole little routine, and honestly? obsessed πŸ’–

⭐ RETURN VALUE ⭐

ping_send returns the number of echo replies it received πŸŽ‰ or a value less than zero if something went wrong 😭 In that oopsie case, go call ping_get_error(3) to get yourself an error message.


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

liboping is written by Florian "octo" Forster <ff at octo.it>. Its homepage can be found at <http://noping.cc/> 🌈

Copyright (c) 2006-2017 by Florian "octo" Forster.


and that's the whole page, bestie πŸŽ€ this was version 1.10.0, dated 2017-05-11, and it lives under ping_send(3) in the liboping manual. slay, go send some packets, periodt πŸ’…πŸ’–