KNET_LINK_INSERT_ACL(3)

okay bestie, sit down, hydrate, because we're doing a kronosnet manpage from the Kronosnet Programmer's Manual and honestly? it's giving niche-but-powerful. ✨


🌸 NAME 🌸

knet_link_insert_acl β€” insert an access list entry to an open link at a given index. like, you're slipping a new VIP into the guest list at a specific spot, not just yeeting it at the end. πŸ’…


✨ SYNOPSIS ✨

#include <libknet.h>

int knet_link_insert_acl(
    knet_handle_t              knet_h,
    knet_node_id_t             host_id,
    uint8_t                    link_id,
    int                        index,
    struct sockaddr_storage   *ss1,
    struct sockaddr_storage   *ss2,
    check_type_t               type,
    check_acceptreject_t       acceptreject
);

πŸ¦‹ DESCRIPTION πŸ¦‹

knet_link_insert_acl β€” that's the function, that's the whole vibe. here's what each lil parameter is doing:

  • knet_h β€” pointer to a knet_handle_t. this is your main character handle, hold onto it. πŸ‘‘
  • host_id β€” go peek at knet_host_add(3) for the deets on this one.
  • link_id β€” and this one lives over in knet_link_set_config(3), so go read that.
  • index β€” insert at position "index", where 0 is the first entry and -1 appends to the current list. so like, 0 = front of the line bestie, -1 = back of the line, no cutting. πŸŽ€
  • ss1 / ss2 / type / acceptreject β€” check the typedef definitions for the full tea. πŸ”

🧚 STRUCTURES 🧚

enum check_type_t {
      CHECK_TYPE_ADDRESS;
      CHECK_TYPE_MASK;
      CHECK_TYPE_RANGE;
};

enum check_acceptreject_t {
      CHECK_ACCEPT;
      CHECK_REJECT;
};

the options are: CHECK_TYPE_ADDRESS, CHECK_TYPE_MASK, CHECK_TYPE_RANGE β€” and then for the vibe check, CHECK_ACCEPT or CHECK_REJECT. pick your fighter. βš”οΈ


πŸ’€ RETURN VALUE πŸ’€

knet_link_insert_acl returns 0 on success β€” slay. ✨

-1 on error, and errno is set β€” so yeah, check errno, she's telling you what went wrong. 😭


🌈 SEE ALSO 🌈

a whole friend group of functions, fr fr:


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


and that's the page, babe πŸ’– this one came from kronosnet, dated 2026-07-20, and yeah it's literally titled KNET_LINK_INSERT_ACL(3). go insert some ACLs responsibly, ily, bye! πŸ¦‹βœ¨

πŸ“¦ where this page comes from