/proc
is populated “live” by the kernel: the contents of the directories and files are built on the fly when an application accesses them. So you won't find any utility that populates them: if you want to know how things get there, you'll have to read the kernel code or the kernel documentation. In the source code, entries are created by various parts of the networking code. Many entries in /proc/net
are documented as part of the networking documentation.
This is as low-level as it gets to read the OS internals. The only way to get any deeper is to write a kernel driver.
Another way to retrieve networking-related information is via ioctl
and getsockopt
calls on sockets. This is sometimes more convenient in C. I think there's information that you can get by one method but not by the other method and vice versa but I don't know the details.