KNET_LINK_GET_CONFIG(3)

okay so bestie, welcome to the Kronosnet Programmer's Manual β€” this is page KNET_LINK_GET_CONFIG(3) and it's literally the vibe check for your link config πŸ¦‹


✨ NAME ✨

knet_link_get_config β€” get the link configutation information. (yes the typo is canon, we keep it, no cap πŸ’…)


🌸 SYNOPSIS 🌸

#include <libknet.h>

int knet_link_get_config(
    knet_handle_t              knet_h,
    knet_node_id_t             host_id,
    uint8_t                    link_id,
    uint8_t                   *transport,
    struct sockaddr_storage   *src_addr,
    struct sockaddr_storage   *dst_addr,
    uint8_t                   *dynamic,
    uint64_t                  *flags
);

πŸŽ€ DESCRIPTION πŸŽ€

so like. knet_link_get_config is the little function that goes "hey, what's this link actually set to?" and hands you back all the deets. here's the group chat roll call of every argument, one by one, because we don't skip people in this house 🫢

  • knet_h β€” pointer to knet_handle_t
  • host_id β€” see knet_host_add(3)
  • link_id β€” see knet_link_set_config(3)
  • transport β€” see knet_link_set_config(3)
  • src_addr β€” sockaddr_storage that can be either IPv4 or IPv6
  • dst_addr β€” sockaddr_storage that can be either IPv4 or IPv6
  • dynamic β€” 0 if dst_addr is static or 1 if dst_addr is dynamic. In case of 1, dst_addr can be NULL and it will be left untouched. (iconic behaviour honestly, it respects your boundaries πŸ’…)
  • flags β€” KNET_LINK_FLAG_*

πŸ’« RETURN VALUE πŸ’«

knet_link_get_config returns 0 on success. -1 on error and errno is set. periodt.


🌈 SEE ALSO 🌈

the whole friend group, gathered here today πŸ’œ β€” every single one of these:


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


ok that's the whole page bestie, you ate that πŸ’…βœ¨ go forth and knet_link_get_config responsibly, mwah πŸŽ€

kronosnet Β· 2026-07-20 Β· KNET_LINK_GET_CONFIG(3) β€” that's the version, the date and the page name all wrapped up in a little bow, bye bestie, slay πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from