3 ms·
> I don't think (but could be wrong) that there's a nice machine readable way to get this information. Typically (on bsd-derived systems) there a clearly defin
by cat199 8y ago
> I don't think (but could be wrong) that there's a nice machine readable way to get this information.
Typically (on bsd-derived systems) there a clearly defined kernel IOCTL interface for any given mechanism is created when it is implemented along with with specific c-structs which can be used to query and configure the interface; the core tools are then added to the system or modified to use this interface (rather than publishing text files from proc that an optional 3rd party package then uses ) - depending on the importance of the api people then tend to write language bindings (or a standalone library which in turn has language bindings) for this or somesuch.
see also:
https://www.freebsd.org/cgi/man.cgi?query=netintro&sektion=4&apropos=0&manpath=FreeBSD+11.1-RELEASE+and+Ports https://www.freebsd.org/cgi/man.cgi?query=netintro&sektion=4...
etc.