Network route API: Second try (WIP).

Implement BNetworkRoster::GetRoutes() and BNetworkInterface::GetRoutes().
Also implement BNetworkInterface::GetDefaultGateway().
There is code duplication at the moment, and the api only supports IPV4.
This commit is contained in:
Stefano Ceccherini
2013-11-16 13:29:32 +01:00
parent c88a1b9d2a
commit 905f910e53
5 changed files with 110 additions and 80 deletions
+3 -1
View File
@@ -9,7 +9,7 @@
#include <net/if.h>
#include <net/if_types.h>
#include <List.h>
#include <ObjectList.h>
#include <NetworkAddress.h>
@@ -106,6 +106,8 @@ public:
status_t RemoveRoute(int family,
const route_entry& route);
status_t RemoveDefaultRoute(int family);
status_t GetRoutes(BObjectList<route_entry>& routes) const;
status_t GetDefaultRoute(BNetworkAddress& gateway) const;
status_t AutoConfigure(int family);