KNET_LINK_GET_ENABLE(3)

okay so bestie, welcome to the kronosnet programmer's manual, section 3 β€” this is KNET_LINK_GET_ENABLE(3) and it's literally just "hey, is this link on or off?" and honestly? iconic. tiny function, big main character energy. let's get into it πŸ¦‹


✨ NAME ✨

knet_link_get_enable β€” Find out whether a link is enabled or not.

like. that's it. that's the whole job. snooping on a link's on/off status. slay πŸ”₯


✨ SYNOPSIS ✨

#include <libknet.h>

int knet_link_get_enable(
    knet_handle_t   knet_h,
    knet_node_id_t  host_id,
    uint8_t         link_id,
    unsigned int   *enabled
);

✨ DESCRIPTION ✨

so the function is knet_link_get_enable πŸ’… and here's the tea on every single thing you're passing in:

  • knet_h β€” pointer to knet_handle_t. your main handle, your whole vibe, the thing everything hangs off of.
  • host_id β€” see knet_host_add(3). (iykyk β€” go read that one if you need the deets on host ids.)
  • link_id β€” see knet_link_set_config(3). that's where link ids get their whole moment.
  • enabled β€” 0 disable the link, 1 enable the link. yup, she's an out-param, she writes back to you 🌸

✨ RETURN VALUE ✨

knet_link_get_enable returns 0 on success, -1 on error β€” and when it errors, errno is set. periodt. no cap, always check it πŸ™ˆ


✨ SEE ALSO ✨

the whole friend group 🫢 every single one of these:


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


okay that's the whole page bestie, go forth and vibe check your links πŸ’–βœ¨

this was the kronosnet programmer's manual, page KNET_LINK_GET_ENABLE(3), dated 2026-07-20 β€” mwah, no notes, 10/10, she ate πŸŽ€πŸŒˆπŸ’…

πŸ“¦ where this page comes from