Style fixes.
Style fixes pointed out by Axel. I'm rusty, and it shows. Hope I got it right. Also moved get_route() into BPrivate.
This commit is contained in:
@@ -2,13 +2,21 @@
|
|||||||
* Copyright 2013, Haiku, Inc. All Rights Reserved.
|
* Copyright 2013, Haiku, Inc. All Rights Reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ROUTESUPPORT_H_
|
#ifndef ROUTESUPPORT_H_
|
||||||
#define ROUTESUPPORT_H_
|
#define ROUTESUPPORT_H_
|
||||||
|
|
||||||
|
|
||||||
#include <ObjectList.h>
|
#include <ObjectList.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace BPrivate {
|
||||||
|
|
||||||
|
|
||||||
status_t get_routes(const char* interfaceName,
|
status_t get_routes(const char* interfaceName,
|
||||||
int family, BObjectList<route_entry>& routes);
|
int family, BObjectList<route_entry>& routes);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ROUTESUPPORT_H_ */
|
#endif /* __ROUTESUPPORT_H_ */
|
||||||
|
|||||||
@@ -569,7 +569,7 @@ BNetworkInterface::RemoveDefaultRoute(int family)
|
|||||||
status_t
|
status_t
|
||||||
BNetworkInterface::GetRoutes(int family, BObjectList<route_entry>& routes) const
|
BNetworkInterface::GetRoutes(int family, BObjectList<route_entry>& routes) const
|
||||||
{
|
{
|
||||||
return get_routes(Name(), family, routes);
|
return BPrivate::get_routes(Name(), family, routes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ BNetworkRoster::RemoveInterface(const BNetworkInterface& interface)
|
|||||||
status_t
|
status_t
|
||||||
BNetworkRoster::GetRoutes(int family, BObjectList<route_entry>& routes) const
|
BNetworkRoster::GetRoutes(int family, BObjectList<route_entry>& routes) const
|
||||||
{
|
{
|
||||||
return get_routes(NULL, family, routes);
|
return BPrivate::get_routes(NULL, family, routes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <sys/sockio.h>
|
#include <sys/sockio.h>
|
||||||
@@ -11,6 +12,10 @@
|
|||||||
#include <ObjectList.h>
|
#include <ObjectList.h>
|
||||||
#include <RouteSupport.h>
|
#include <RouteSupport.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace BPrivate {
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
get_routes(const char* interfaceName, int family, BObjectList<route_entry>& routes)
|
get_routes(const char* interfaceName, int family, BObjectList<route_entry>& routes)
|
||||||
{
|
{
|
||||||
@@ -72,3 +77,6 @@ get_routes(const char* interfaceName, int family, BObjectList<route_entry>& rout
|
|||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user