Uploaded August 2020 | Updated September 2026, 1 hour ago
From bsdcan.org/events/bsdcan_2020/schedule/session/48-sysctlinfo-a-new-interface-to-visit-the-freebsd-sysctl-mib-and-to-pass-the-objects-info-to-userland
The FreeBSD kernel maintains a Management Information Base (MIB) where a component (object) represents a parameter of the system. The sysctl system call explores the MIB to find an object by its Object Identifier (OID) and calls its handler to get or set the value of the parameter. It is often necessary to find an object not to call its handler but to get its info (description, type, name, next object, etc.), so the kernel provides an undocumented interface implemented in kern_sysctl.c.
From bsdcan.org/events/bsdcan_2020/schedule/session/48-sysctlinfo-a-new-interface-to-visit-the-freebsd-sysctl-mib-and-to-pass-the-objects-info-to-userland
The FreeBSD kernel maintains a Management Information Base (MIB) where a component (object) represents a parameter of the system. The sysctl system call explores the MIB to find an object by its Object Identifier (OID) and calls its handler to get or set the value of the parameter. It is often necessary to find an object not to call its handler but to get its info (description, type, name, next object, etc.), so the kernel provides an undocumented interface implemented in kern_sysctl.c.










