diff options
author | bz <bz@FreeBSD.org> | 2009-08-12 12:00:21 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-08-12 12:00:21 +0000 |
commit | a5f0cffcb437cb9aeb35d41f844e19d9d8cdc033 (patch) | |
tree | b7ce08cfb436bfd3d34fe3175f1f24cd4be5e338 /sys/net/vnet.c | |
parent | ad14c40deb10e4bd6d07253eff8c410b3c6b70ca (diff) | |
download | FreeBSD-src-a5f0cffcb437cb9aeb35d41f844e19d9d8cdc033.zip FreeBSD-src-a5f0cffcb437cb9aeb35d41f844e19d9d8cdc033.tar.gz |
Update DDB show vnet command to print all used and available information.
Reviewed by: rwatson, zec
Approved by: re
Diffstat (limited to 'sys/net/vnet.c')
-rw-r--r-- | sys/net/vnet.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 7866bb9..17bcbc6 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -615,14 +615,20 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif |