KNET_LINK_SET_ENABLE(3)

okay bestie, welcome to the Kronosnet Programmer's Manual β€” this one's about flicking a link on and off like a light switch πŸ’‘


🌸 NAME 🌸

knet_link_set_enable</purpose> β€” enable traffic on a link. yes, that's the whole vibe. one link, on or off, you decide πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <libknet.h>

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. knet_link_set_enable is the function, and here's what you're handing it:

  • knet_h β€” a pointer to knet_handle_t. it's your handle, your main character, the whole context of the operation 🫢
  • host_id β€” head over to knet_host_add(3) for the deets on this one, i'm not re-explaining it here
  • link_id β€” this one's explained in knet_link_set_config(3), go peek
  • enabled β€” the actual switch, and it's literally just 0 or 1:
    • 0 β†’ disable the link
    • 1 β†’ enable the link

periodt. that's the entire menu πŸ“


πŸ’– RETURN VALUE πŸ’–

knet_link_set_enable returns 0 on success, and -1 on error β€” and when it errors, errno gets set, so go look at that instead of staring at the return value πŸ’€


🌈 SEE ALSO 🌈

the whole friend group, in the order the original said, no cap:


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


🫢 that's the page bestie, go enable some links (responsibly). iykyk ✨

kronosnet Β· 2026-07-20 Β· KNET_LINK_SET_ENABLE(3) πŸ’…πŸŽ€

πŸ“¦ where this page comes from