KNET_GET...PORT_LIST(3)

πŸ’– NAME πŸ’–

okay bestie, so knet_get_transport_list β€” it hands you the list of transports that this specific build of knet actually supports. that's it. that's the whole job. no cap ✨


🌸 SYNOPSIS 🌸

#include <libknet.h>

int knet_get_transport_list(
    struct knet_transport_info   *transport_list,
    size_t                       *transport_list_entries
);

πŸ¦‹ DESCRIPTION πŸ¦‹

knet_get_transport_list β€” she's giving "let me tell you what you've got" energy πŸ’…

  • transport_list β€” this is an array of struct transport_info, and bestie, it must be at least as big as struct transport_info * KNET_MAX_TRANSPORTS. like, do not skimp on the sizing. she will not be happy. πŸ™ˆ
  • transport_list_entries β€” a pointer to a size_t where she'll stash the number of transports available in this build of libknet. that's how many you actually got, fr fr. ✨

πŸŽ€ STRUCTURES πŸŽ€

this is the transport info you get back from knet_get_transport_list(), iconic little struct, love her:

struct knet_transport_info {
    const char   *name;        /* Transport name. UDP, SCTP, etc... */
    uint8_t       id;          /* value that can be used for knet_link_set_config() */
    uint8_t       properties;  /* currently unused */
    char          pad[256];    /* currently unused */
};

so name is the transport name (UDP, SCTP, etc…), id is the value you can feed into knet_link_set_config(), and properties plus pad[256] are both currently unused β€” they're just sitting there, main character energy but no lines yet. 🫢


⭐ RETURN VALUE ⭐

  • 0 on success πŸŽ‰
  • -1 on error, and errno gets set. so check it, bestie, don't just vibe past it. πŸ’€

🌈 SEE ALSO 🌈

the whole girl gang, all of them, every single one:


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


and that's the whole page, bestie 🫢 this one came out of the Kronosnet Programmer's Manual, it's the kronosnet source, dated 2026-07-20, and if you ever need to find it again the lookup string is literally KNET_GET...PORT_LIST(3) πŸ’–βœ¨ go forth and enumerate your transports, periodt πŸ’…

πŸ“¦ where this page comes from