/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <ipp/ipp_impl.h>
#include <mdb/mdb_modapi.h>
static int byid_walk_init(mdb_walk_state_t *);
static int byid_walk_step(mdb_walk_state_t *);
static void byid_walk_fini(mdb_walk_state_t *);
static int action_format(uintptr_t, const void *, void *);
static int mod_format(uintptr_t, const void *, void *);
static void aid2aname(ipp_action_id_t, char *);
static int ref_walk_init(mdb_walk_state_t *);
static int ref_walk_step(mdb_walk_state_t *);
static void ref_walk_fini(mdb_walk_state_t *);
typedef struct afdata {
} afdata_t;
typedef struct mfdata {
} mfdata_t;
/*
* walker. Skips entries that are NULL.
*/
static int
{
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
void *ptr;
return (WALK_ERR);
}
if (ptr == (void *)-1) {
} else {
wsp->walk_cbdata);
}
return (status);
}
/*ARGSUSED*/
static void
{
}
/*ARGSUSED*/
static int
int argc,
{
int status;
return (DCMD_USAGE);
if (flags & DCMD_ADDRSPEC) {
goto cleanup;
}
ipp_action_byid) == -1) {
mdb_warn("failed to execute ipp_byid walk");
}
return (rc);
}
/*ARGSUSED*/
static int
const void *data,
void *arg)
{
int rc;
goto done;
}
else
done:
return (rc);
}
/*ARGSUSED*/
static int
{
if (!ap->ippa_nameless) {
}
switch (ap->ippa_state) {
case IPP_ASTATE_PROTO:
break;
break;
case IPP_ASTATE_AVAILABLE:
break;
default:
break;
}
mdb_printf("\n");
return (WALK_NEXT);
}
static int
{
if (banner)
mdb_printf("%?s %<u>%20s %5s %20s%</u>\n",
"", "NAME", "ID", "MODNAME");
return (WALK_ERR);
}
return (WALK_NEXT);
}
/*ARGSUSED*/
static int
int argc,
{
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_ERR);
return (WALK_ERR);
}
mdb_printf("\n");
return (DCMD_OK);
}
/*ARGSUSED*/
static int
mod(
int argc,
{
int status;
return (DCMD_USAGE);
if (flags & DCMD_ADDRSPEC) {
goto cleanup;
}
ipp_mod_byid) == -1) {
mdb_warn("failed to execute ipp_byid walk");
}
return (rc);
}
/*ARGSUSED*/
static int
const void *data,
void *arg)
{
int rc;
goto done;
}
else
done:
return (rc);
}
/*ARGSUSED*/
static int
{
switch (imp->ippm_state) {
case IPP_MODSTATE_PROTO:
break;
case IPP_MODSTATE_AVAILABLE:
break;
default:
break;
}
mdb_printf("\n");
return (WALK_NEXT);
}
static int
{
if (banner)
mdb_printf("%?s %<u>%20s %5s%</u>\n",
"", "NAME", "ID");
return (WALK_NEXT);
}
/*ARGSUSED*/
static int
int argc,
{
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_ERR);
return (DCMD_ERR);
}
else
else
else
else
else
mdb_printf("\n");
return (DCMD_OK);
}
static int
{
return (WALK_DONE);
return (WALK_NEXT);
}
static int
{
int status;
return (WALK_DONE);
return (WALK_ERR);
}
wsp->walk_cbdata);
return (status);
}
/*ARGSUSED*/
static void
{
}
/*ARGSUSED*/
static int
int argc,
{
if ((flags & DCMD_ADDRSPEC) == 0)
return (DCMD_ERR);
return (DCMD_ERR);
}
return (DCMD_OK);
}
static void
{
uint_t i;
return;
}
for (i = 0; i < nelt; i++) {
if (first_time) {
"classes", "NAME", "ACTION");
}
}
}
static void
{
uint_t i;
return;
}
for (i = 0; i < nelt; i++) {
if (first_time) {
"log", "CLASS NAME", "ACTION");
}
}
}
static void
char *buf)
{
switch (aid) {
case IPP_ACTION_INVAL:
break;
case IPP_ACTION_CONT:
break;
case IPP_ACTION_DEFER:
break;
case IPP_ACTION_DROP:
break;
default:
ipp_action_byid) == -1) {
mdb_warn("failed to read from address %p",
break;
}
break;
}
break;
}
break;
}
}
}
{ "ipp_action", "?[-v]",
"display ipp_action structure", action },
{ "ipp_mod", "?[-v]",
"display ipp_mod structure", mod },
{ "cfglock", ":",
"display cfglock structure", cfglock },
{ "ippops", ":",
"display ipp_ops structure", ippops },
{ "ipp_packet", ":",
"display ipp_packet structure", packet },
{ NULL }
};
{ NULL }
};
const mdb_modinfo_t *
_mdb_init(void)
{
mdb_warn("failed to lookup 'ipp_action_byid'");
return (NULL);
}
mdb_warn("failed to lookup 'ipp_mod_byid'");
return (NULL);
}
return (&ipp_modinfo);
}