RTABLE_ADD(9)

πŸ“¦ in nixpkgs unstable

okay bestie, this is RTABLE_ADD(9) from the Kernel Developer's Manual, and it's literally the group chat for routing tables and routing domains. πŸ’…βœ¨

πŸŽ€ NAME πŸŽ€

rtable_add, rtable_exists, rtable_loindex, rtable_l2, rtable_l2set β€” routing tables and routing domains interface. That's the whole vibe: we're managing routing tables and the routing domains they live in. πŸ¦‹

✨ SYNOPSIS ✨

#include <net/rtable.h>

int
rtable_add(unsigned int id);

int
rtable_exists(unsigned int id);

unsigned int
rtable_loindex(unsigned int id);

unsigned int
rtable_l2(unsigned int id);

void
rtable_l2set(unsigned int id, unsigned int rdomain);

🌸 DESCRIPTION 🌸

Routing tables contain layer 2 and 3 forwarding information. Each address family in use will have its own routing table. Routing domains are a way of logically segmenting a router among multiple networks and may contain more than one routing table. So yes, it's giving nested friend groups for packets. πŸ’–

  • rtable_add(unsigned int id) β€” adds the routing table with ID id to routing domain 0. New table, who dis? ✨
  • rtable_exists(unsigned int id) β€” returns 1 if the routing table with ID id exists, and 0 otherwise. A lil vibe check for your table. 🫢
  • rtable_loindex(unsigned int id) β€” returns the default lo(4) interface index for the routing table with ID id. Loopback bestie located. πŸŒ€
  • rtable_l2(unsigned int id) β€” gets the routing domain of the routing table with ID id. Peek at where it belongs. πŸ‘€
  • rtable_l2set(unsigned int id, unsigned int rdomain) β€” places the routing table with ID id under the routing domain with ID rdomain. Move it into its assigned group chat. πŸ“¦

πŸ”₯ CONTEXT πŸ”₯

rtable_add(), rtable_exists(), rtable_loindex(), rtable_l2(), and task_l2set() can be called during autoconf, from process context, or from interrupt context. (Yes, task_l2set() is exactly what the page says here β€” we're not editing it, bestie.) πŸ’€

πŸ’œ RETURN VALUES πŸ’œ

rtable_add() may fail with:

  • [ENOMEM] β€” Memory could not be allocated to extend the list of routing domains. No memory, no table, no slay. 😭

πŸ‘‘ SEE ALSO πŸ‘‘

Go peek at lo(4), route(4), and route(8) β€” the whole routing cinematic universe is waiting. 🌈


That's the page, bestie. Source/version: Debian, dated March 26, 2021 β€” xoxo, your Unix group-chat fairy πŸ§šπŸ’–

πŸ“¦ 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