STRUCT CTL_TABLE_HEADER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME πŸ¦‹

okay bestie, this is the struct ctl_table_header(9) page from the Kernel API Manual β€” and it's all about struct ctl_table_header, the struct that maintains dynamic lists of struct ctl_table trees. slay πŸ’…

✨ SYNOPSIS ✨

here's the whole struct, copied exactly so you can vibe-check the shape:

       struct ctl_table_header {
           union {
             struct {
               const struct ctl_table *ctl_table;
               int ctl_table_size;
               int used;
               int count;
               int nreg;
             };
             struct rcu_head rcu;
           };
           struct completion *unregistering;
           const struct ctl_table *ctl_table_arg;
           struct ctl_table_root *root;
           struct ctl_table_set *set;
           struct ctl_dir *parent;
           struct ctl_node *node;
           struct hlist_head inodes;
           enum {
             SYSCTL_TABLE_TYPE_DEFAULT,
             SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY,
           } type;
        };

πŸŽ€ Members πŸŽ€

member-by-member, no skips, periodt πŸ’…

  • {unnamed_union} β€” anonymous.
  • {unnamed_struct} β€” anonymous.
  • ctl_table β€” pointer to the first element in the ctl_table array.
  • ctl_table_size β€” number of elements pointed by ctl_table.
  • used β€” The entry will never be touched when it's equal to 0.
  • count β€” upped every time something is added to inodes, and downed every time something is removed from inodes.
  • nreg β€” when nreg drops to 0, the ctl_table_header will be unregistered.
  • rcu β€” delays the freeing of the inode. Introduced with "unfuck proc_sysctl ->d_compare" β€” that's the note, fr fr.
  • type β€” enumeration to differentiate between ctl target types:
    • type.SYSCTL_TABLE_TYPE_DEFAULT β€” ctl target with no special considerations.
    • type.SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY β€” Identifies a permanently empty dir target to serve as a mount point.

🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/sysctl.h β€” go peek, bestie. iykyk ✨

πŸ’Œ that's the whole page, bestie β€” source/version ./include/linux, dated October 2026, signing off! πŸ’–

πŸ“¦ where this page comes from