RTLABEL_ID2NAME(9)
πΈ 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
- Copyright (c) 2011 Bret S. Lambert <blambert@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms