* Improved the output of the "net_domains" KDL command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38077 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "stack_private.h"
|
||||
|
||||
#include <net_device.h>
|
||||
#include <NetUtilities.h>
|
||||
|
||||
#include <lock.h>
|
||||
#include <util/AutoLock.h>
|
||||
@@ -75,8 +76,14 @@ dump_domains(int argc, char** argv)
|
||||
kprintf(" routes:\n");
|
||||
|
||||
RouteList::Iterator routeIterator = domain->routes.GetIterator();
|
||||
while (net_route* route = routeIterator.Next()) {
|
||||
kprintf(" %p\n", route);
|
||||
while (net_route_private* route = routeIterator.Next()) {
|
||||
kprintf(" %p: dest %s, mask %s, gw %s, flags %lx, address %p\n",
|
||||
route, 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, route->interface_address);
|
||||
}
|
||||
|
||||
if (!domain->route_infos.IsEmpty())
|
||||
|
||||
@@ -54,26 +54,6 @@ net_route_private::~net_route_private()
|
||||
// #pragma mark - private functions
|
||||
|
||||
|
||||
#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
|
||||
user_copy_address(const sockaddr* from, sockaddr** to)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user