381a2a9a387f449fab7d0c7e97c4184c26963abfdr * CDDL HEADER START
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * The contents of this file are subject to the terms of the
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * Common Development and Distribution License (the "License").
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * You may not use this file except in compliance with the License.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * See the License for the specific language governing permissions
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * and limitations under the License.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * When distributing Covered Code, include this CDDL HEADER in each
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * If applicable, add the following below this CDDL HEADER, with the
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * fields enclosed by brackets "[]" replaced with your own identifying
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * information: Portions Copyright [yyyy] [name of copyright owner]
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * CDDL HEADER END
7ddc9b1afd18f260b9fb78ec7732facd91769131Darren Reed * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * Use is subject to license terms.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * List pfhooks hook list information.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr/*ARGSUSED*/
381a2a9a387f449fab7d0c7e97c4184c26963abfdrhooklist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
381a2a9a387f449fab7d0c7e97c4184c26963abfdr if (mdb_vread((void *)&hr, sizeof (hr), (uintptr_t)addr) == -1) {
7ddc9b1afd18f260b9fb78ec7732facd91769131Darren Reed mdb_printf("%<u>%?s %8s %20s %4s %24s %24s%</u>\n",
7ddc9b1afd18f260b9fb78ec7732facd91769131Darren Reed "ADDR", "FLAG", "FUNC", "HINT", "NAME", "HINTVALUE");
7ddc9b1afd18f260b9fb78ec7732facd91769131Darren Reed mdb_warn("couldn't read list role at %p", h->h_name);
7ddc9b1afd18f260b9fb78ec7732facd91769131Darren Reed switch (h->h_hint) {
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * List pfhooks event information.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * List the hooks information in verbose mode as well.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr/*ARGSUSED*/
381a2a9a387f449fab7d0c7e97c4184c26963abfdrhookeventlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
381a2a9a387f449fab7d0c7e97c4184c26963abfdr if (mdb_vread((void *)&hf, sizeof (hf), (uintptr_t)addr) == -1) {
381a2a9a387f449fab7d0c7e97c4184c26963abfdr mdb_printf("%<u>%?s %10s %20s%</u>\n", "ADDR", "FLAG", "NAME");
381a2a9a387f449fab7d0c7e97c4184c26963abfdr if (mdb_vread((void *)&hr, sizeof (hr), (uintptr_t)hrp) == -1) {
381a2a9a387f449fab7d0c7e97c4184c26963abfdr mdb_printf("%0?p %10x %20s\n", hrp, hp.he_flags, hprstr);
381a2a9a387f449fab7d0c7e97c4184c26963abfdr * List pfhooks family information.
381a2a9a387f449fab7d0c7e97c4184c26963abfdr/*ARGSUSED*/
381a2a9a387f449fab7d0c7e97c4184c26963abfdrhookrootlist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
f4b3ec61df05330d25f55a36b975b4d7519fdeb1dh (uintptr_t)(addr + OFFSETOF(netstack_t, netstack_hook))) == -1) {
f4b3ec61df05330d25f55a36b975b4d7519fdeb1dh if (mdb_vread((void *)&hfh, sizeof (hfh), (uintptr_t)((uintptr_t)hks +
381a2a9a387f449fab7d0c7e97c4184c26963abfdr if (mdb_vread((void *)&hf, sizeof (hf), (uintptr_t)hfp) == -1) {
381a2a9a387f449fab7d0c7e97c4184c26963abfdr mdb_warn("couldn't read hook family at %p", wsp->walk_addr);
381a2a9a387f449fab7d0c7e97c4184c26963abfdr return (wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
381a2a9a387f449fab7d0c7e97c4184c26963abfdr mdb_warn("couldn't read hook event at %p", wsp->walk_addr);
381a2a9a387f449fab7d0c7e97c4184c26963abfdr return (wsp->walk_callback(wsp->walk_addr, wsp->walk_data,
381a2a9a387f449fab7d0c7e97c4184c26963abfdr { "hookrootlist", "", "display hook family information", hookrootlist },
f4b3ec61df05330d25f55a36b975b4d7519fdeb1dh hookevent_stack_walk_init, hookevent_stack_walk_step, NULL },
381a2a9a387f449fab7d0c7e97c4184c26963abfdrstatic const mdb_modinfo_t modinfo = { MDB_API_VERSION, dcmds, walkers };