summaryrefslogtreecommitdiff
path: root/usr/src/cmd/mdb/common/modules/hook/hook.c
diff options
context:
space:
mode:
authordh155122 <none@none>2007-01-19 16:59:38 -0800
committerdh155122 <none@none>2007-01-19 16:59:38 -0800
commitf4b3ec61df05330d25f55a36b975b4d7519fdeb1 (patch)
tree395c234b901886c84a82603a767e031fca136e09 /usr/src/cmd/mdb/common/modules/hook/hook.c
parent2e59fc6dac28cd69376c21d6b90a5624160ba94c (diff)
downloadillumos-gate-f4b3ec61df05330d25f55a36b975b4d7519fdeb1.tar.gz
PSARC 2006/366 IP Instances
6289221 RFE: Need virtualized ip-stack for each local zone 6512601 panic in ipsec_in_tag - allocation failure 6514637 error message from dhcpagent: add_pkt_opt: option type 60 is missing required value 6364643 RFE: allow persistent setting of interface flags per zone 6307539 RFE: Invalid network address causes zone boot failure 5041214 Allow IPMP configuration with zones 5005887 RFE: zoneadmd should support plumbing an interface via DHCP 4991139 RFE: zones should provide a mechanism to configure a defaultrouter for a zone 6218378 zoneadmd doesn't set the netmask for non-loopback addresses hosted on lo0 4963280 zones: need to virtualize the IPv6 default address selection mechanism 4963285 zones: need support of stateless address autoconfiguration for IPv6 5048068 zones don't boot if one of its interfaces has failed 5057154 RFE: ability to change interface status from within a zone 4963287 zones should support the plumbing of the first (and only) logical interface 4978517 TCP privileged port space should be partitioned per zone 5023347 zones don't work well with network routes other than default 4963372 investigate whether global zone can act as a router for local zones 6378364 RFE: Allow each zone to have its own virtual IPFilter
Diffstat (limited to 'usr/src/cmd/mdb/common/modules/hook/hook.c')
-rw-r--r--usr/src/cmd/mdb/common/modules/hook/hook.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/usr/src/cmd/mdb/common/modules/hook/hook.c b/usr/src/cmd/mdb/common/modules/hook/hook.c
index d9ab29eb24..ec9679b2f9 100644
--- a/usr/src/cmd/mdb/common/modules/hook/hook.c
+++ b/usr/src/cmd/mdb/common/modules/hook/hook.c
@@ -19,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -29,6 +29,7 @@
#include <sys/rwlock.h>
#include <mdb/mdb_modapi.h>
#include <sys/queue.h>
+#include <inet/ip.h>
#include <sys/hook.h>
#include <sys/hook_impl.h>
@@ -153,6 +154,7 @@ hookeventlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
int
hookrootlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
{
+ struct hook_stack *hks;
hook_family_int_head_t hfh;
hook_family_int_t hf, *hfp;
char hrrstr[MAX_LENGTH];
@@ -160,8 +162,15 @@ hookrootlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (argc)
return (DCMD_USAGE);
- if (mdb_readvar(&hfh, "familylist") == -1) {
- mdb_warn("couldn't read symbol 'familylist'");
+ if (mdb_vread((void *)&hks, sizeof (hks),
+ (uintptr_t)(addr + OFFSETOF(netstack_t, netstack_hook))) == -1) {
+ mdb_warn("couldn't read netstack_hook");
+ return (DCMD_ERR);
+ }
+
+ if (mdb_vread((void *)&hfh, sizeof (hfh), (uintptr_t)((uintptr_t)hks +
+ OFFSETOF(hook_stack_t, hks_familylist))) == -1) {
+ mdb_warn("couldn't read hook family head");
return (DCMD_ERR);
}
@@ -192,7 +201,7 @@ hookrootlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
static int
-hookevent_walk_init(mdb_walk_state_t *wsp)
+hookevent_stack_walk_init(mdb_walk_state_t *wsp)
{
hook_family_int_t hf;
@@ -212,7 +221,7 @@ hookevent_walk_init(mdb_walk_state_t *wsp)
}
static int
-hookevent_walk_step(mdb_walk_state_t *wsp)
+hookevent_stack_walk_step(mdb_walk_state_t *wsp)
{
hook_event_int_t hr;
@@ -228,7 +237,6 @@ hookevent_walk_step(mdb_walk_state_t *wsp)
wsp->walk_cbdata));
}
-
static const mdb_dcmd_t dcmds[] = {
{ "hookrootlist", "", "display hook family information", hookrootlist },
{ "hookeventlist", "", "display hook event information",
@@ -238,8 +246,8 @@ static const mdb_dcmd_t dcmds[] = {
};
static const mdb_walker_t walkers[] = {
- { "hookevent", "walk a list of hooks",
- hookevent_walk_init, hookevent_walk_step, NULL },
+ { "hookevent_stack", "walk list of hooks",
+ hookevent_stack_walk_init, hookevent_stack_walk_step, NULL },
{ NULL }
};