Was busy looking at a C API ( <https://man7.org/li...
# kotlin-native
n
Was busy looking at a C API ( https://man7.org/linux/man-pages/man7/rtnetlink.7.html ) and wondering if it is a User Space or Kernel Space API. The Man Page description is a bit confusing, "... though this usage is not documented here, and for communication with user-space programs..." 😕. If it is a User Space API then it should be accessible from the Kotlin side, although it appears this API is macro heavy which complicates matters.
e
it is describing the netlink protocol used for routing; netlink is used for some local IPC on Linux, both within the kernel, within userspace, and across the boundary. if you want to interact with the routing tables, you should probably wrap libnl-route instead of dealing with netlink directly: https://www.infradead.org/~tgr/libnl/doc/api/group__rtnl.html not that it's well documented either, but at least it'll handle the low-level protocol details
👍 1
n
More after an API that can provide some basic networking statistics (upload/download speeds, total data uploaded/downloaded etc) at the process level by supplying a PID.