Added family parameter to the GetRoutes() API.
Moved common code to a private file.
This commit is contained in:
@@ -106,8 +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 GetRoutes(int family, BObjectList<route_entry>& routes) const;
|
||||
status_t GetDefaultRoute(int family, BNetworkAddress& gateway) const;
|
||||
|
||||
status_t AutoConfigure(int family);
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@ public:
|
||||
status_t RemoveInterface(
|
||||
const BNetworkInterface& interface);
|
||||
|
||||
status_t GetRoutes(BObjectList<route_entry>& routes) const;
|
||||
status_t GetRoutes(int family,
|
||||
BObjectList<route_entry>& routes) const;
|
||||
|
||||
int32 CountPersistentNetworks() const;
|
||||
status_t GetNextPersistentNetwork(uint32* cookie,
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2013, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
#ifndef ROUTESUPPORT_H_
|
||||
#define ROUTESUPPORT_H_
|
||||
|
||||
#include <ObjectList.h>
|
||||
|
||||
status_t get_routes(const char* interfaceName,
|
||||
int family, BObjectList<route_entry>& routes);
|
||||
|
||||
#endif /* __ROUTESUPPORT_H_ */
|
||||
Reference in New Issue
Block a user