Network Interface API Cleanup
The goal of this undertaking is to provide a clean separation between the network interfaces used by kernel and userland. This was attempted before but applications still include non-public interfaces.
The usage of the current network interfaces is being studied and this page will be updated as details are uncovered.
More detailed info is available in the ../CleanupOfNetworkInterfaceApisProposal.
What will be done
- New network interface API and documentation will be created
- Appliactions that use the old interfaces will be modified and corresponding man pages will be updated as needed
Status
July 1st
- Created a new branch in perforce
- Combing through eariler work to find relevant parts
July 6th
- Have looked through how netstat retrieves information about interfaces and routes (which is rather non-uniform, both kvm and sysctl is being used)
- Currently exploring the possibility of only relying on sysctl to obtain the required information
July 7th
- Started removing kvm code from netstat. Using the '-w' switch now only relies on ifmib.
July 9th
- Still working on removing kvm from netstat. Currently most interface information can be retrieved without any references to internal data structures. Interface information is now being obtained through sysctl with the {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST} mib. However, two pieces of into that is not readily available is:
- Watchdog timer
- Per address statistics (as provided by struct if_data)
July 11th
- At this point all interface information is obtained using sysctl. Other parts of netstat that already use either sysctl or ioctl include:
- IPv4 Multicast routing informaiton
- Mbuf info