libnetapi: missing api for getting routing table / gateways
|Reported by:||jackburton||Owned by:||axeld|
Libnetapi currently lacks methods to get the system routing table. Could be implemented in various places:
In the mailing list I proposed
status_t BNetworkInterface::GetRouteAt(int32 index, route_entry* entry)
but since the routing table isn't interface-specific, although a single route can of course be interface-specific, I think it could be implemented in BNetworkRoster as a single method
status_t BNetworkRoster::GetRoutingTable(const char* interfaceName, BObjectList<route_entry>*)
which would return a list of route_entry objects (or a more friendly class (BRoute?)), with the option of filtering by interface name, or even family.
Unfortunately I suspect we don't push the use of BObjectList in public api, so we'll need to use a BList here....
Other ideas ?