RTLABEL_ID2NAME(9)

πŸ“¦ in nixpkgs unstable

🌸 NAME 🌸

okay so this is the RTLABEL_ID2NAME(9) page from the Kernel Developer's Manual, and we're talking about rtlabel_id2name, rtlabel_id2sa, rtlabel_name2id, and rtlabel_unref β€” the girlies that manipulate route labels. periodt. πŸ’…

✨ SYNOPSIS ✨

#include <sys/types.h>
#include <sys/socket.h>
#include <net/route.h>

const char *
rtlabel_id2name(u_int16_t id);

struct sockaddr *
rtlabel_id2sa(u_int16_t labelid, struct sockaddr_rtlabel *sa_rl);

u_int16_t
rtlabel_name2id(char *name);

void
rtlabel_unref(u_int16_t id);

πŸ’… DESCRIPTION πŸ’…

Route labels are arbitrary data appended to route entries, and they can be acted upon by pf(4). no cap, that's the vibe. ✨

πŸŽ€ rtlabel_name2id(char *name) πŸŽ€

Return the numerical ID of the route label named name, and create the label if it does not already exist. slay, it's giving "make it if it's not there." πŸ’–

πŸ¦‹ rtlabel_id2name(u_int16_t id) πŸ¦‹

Return the string name of the route label with ID id. iconic lookup behavior, honestly. 🌈

πŸ“ rtlabel_id2sa(u_int16_t labelid, struct sockaddr_rtlabel *sa_rl) πŸ“

Populate sa_rl with the data from the route label specified by labelid. yes bestie, fill it in. 🫢

πŸ’œ rtlabel_unref(u_int16_t id) πŸ’œ

Remove a reference to the route label with ID id, and free the label if the reference count drops to 0. that's the cleanup girlie. 🧚

πŸ¦‹ CONTEXT πŸ¦‹

rtlabel_id2name(), rtlabel_id2sa(), rtlabel_name2id(), and rtlabel_unref() can be called during autoconf, from process context, or from interrupt context. so flexible, lowkey obsessed. πŸ’…

πŸŽ€ RETURN VALUES πŸŽ€

rtlabel_name2id() returns 0 if it was unable to create a route label. if it can't create one, you get 0 back β€” noted, bestie. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ cute lil sign-off: this is Debian realness, dated October 15, 2014, serving RTLABEL_ID2NAME(9) energy. bye bestie! 🫢✨

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms