sysctlinfo is a new interface to explore the sysctl MIB-Tree and to pass the info of the nodes to the userland,
briefly:
https://github.com/freebsd/freebsd-quarterly/blob/master/2019q3/sysctlinfo.md
README, manual, examples, tests and converted tools:
https://gitlab.com/alfix/sysctlinfo
(sysctlbyname(3):
"The sysctlbyname() function accepts an ASCII representation of the name
and internally looks up the integer name vector. Apart from that, it be-
haves the same as the standard sysctl() function".
Then the next step is adding a new node to allow sysctlbyname() to manage a CTLTYPE_NODE with a no-NULL handler, example "kern.proc.pid.<pid>" or an name-level with just '\0' example "security.jail.param.allow.mount." link: https://gitlab.com/alfix/sysctlbyname-improved).