KNET_LIN...NG_TIMERS(3)

πŸ’– KNET_LIN...NG_TIMERS(3) πŸ’–

okay bestie, welcome to the Kronosnet Programmer's Manual, and today's main character is a lil getter function that tells you how fast a link is pinging and when it decides someone's ghosted. no cap, it's giving "read the vibe of your link" energy. 🫢


✨ NAME ✨

knet_link_get_ping_timers β€” Get the ping timers for a link.

like… literally what it says. it fetches the ping timers. slay.


✨ SYNOPSIS ✨

#include <libknet.h>

int knet_link_get_ping_timers(
    knet_handle_t   knet_h,
    knet_node_id_t  host_id,
    uint8_t         link_id,
    time_t         *interval,
    time_t         *timeout,
    unsigned int   *precision
);

✨ DESCRIPTION ✨

so knet_link_get_ping_timers is the function, and here's the tea on every single thing you hand it πŸ‘‡

  • knet_h β€” pointer to knet_handle_t. your handle, your home base, your main character.
  • host_id β€” see knet_host_add(3). it's the host you're asking about, iykyk.
  • link_id β€” see knet_link_set_config(3). which link on that host, bestie.
  • interval β€” the ping interval. how often we go "u up?" πŸ’Œ
  • timeout β€” if no pong is received within this time, the link is declared dead. yes literally, it's over, the link got left on read and now it's πŸ’€
  • precision β€” how many values of latency are used to calculate the average link latency (see also knet_link_get_status(3)). so it's the sample size for the vibe average 🌸

✨ RETURN VALUE ✨

knet_link_get_ping_timers returns 0 on success, -1 on error, and errno is set. so like, 0 is the "we ate" and -1 is the "check errno, something went feral" 😭


✨ SEE ALSO ✨

the whole friend group, fr fr β€” every single one of them, no skips πŸ‘‘:


Copyright (C) 2010-2026 Red Hat, Inc. All rights reserved.


okay that's the whole page bestie, you understood it, periodt πŸ’…

<cute>this was kronosnet, dated 2026-07-20, filed under KNET_LIN...NG_TIMERS(3) β€” go forth and read your timers, icon πŸŽ€βœ¨πŸ¦‹</cute>

πŸ“¦ where this page comes from