* Made some functions static that should have been.

* Added a commented out dump_routes() function for debugging purposes.
* Removed weird spaces, fixed indentation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-10-25 15:13:34 +00:00
parent ff85245718
commit 9004a56437

View File

@ -53,6 +53,26 @@ net_route_private::~net_route_private()
// #pragma mark - // #pragma mark -
#if 0
static void
dump_routes(net_domain_private *domain)
{
RouteList::Iterator iterator = domain->routes.GetIterator();
uint32 count = 1;
while (iterator.HasNext()) {
net_route_private *route = iterator.Next();
dprintf(" [%lu] dest %s, mask %s, gw %s, flags %lx\n", count++,
AddressString(domain, route->destination ? route->destination : NULL).Data(),
AddressString(domain, route->mask ? route->mask : NULL).Data(),
AddressString(domain, route->gateway ? route->gateway : NULL).Data(),
route->flags);
}
}
#endif
static status_t static status_t
user_copy_address(const sockaddr *from, sockaddr **to) user_copy_address(const sockaddr *from, sockaddr **to)
{ {
@ -182,8 +202,9 @@ put_route_internal(struct net_domain_private *domain, net_route *_route)
} }
struct net_route * static struct net_route *
get_route_internal(struct net_domain_private *domain, const struct sockaddr *address) get_route_internal(struct net_domain_private *domain,
const struct sockaddr *address)
{ {
net_route_private *route = find_route(domain, address); net_route_private *route = find_route(domain, address);
if (route != NULL && atomic_add(&route->ref_count, 1) == 0) { if (route != NULL && atomic_add(&route->ref_count, 1) == 0) {
@ -195,7 +216,7 @@ get_route_internal(struct net_domain_private *domain, const struct sockaddr *add
} }
void static void
update_route_infos(struct net_domain_private *domain) update_route_infos(struct net_domain_private *domain)
{ {
RouteInfoList::Iterator iterator = domain->route_infos.GetIterator(); RouteInfoList::Iterator iterator = domain->route_infos.GetIterator();
@ -431,6 +452,7 @@ remove_route(struct net_domain *_domain, const struct net_route *removeRoute)
put_route_internal(domain, route); put_route_internal(domain, route);
update_route_infos(domain); update_route_infos(domain);
return B_OK; return B_OK;
} }