/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* FCIP mdb module
*/
#include <sys/mdb_modapi.h>
#include <sys/ethernet.h>
/*
*/
static int
{
mdb_warn("failed to read 'fcip_port_head'");
return (WALK_ERR);
}
return (WALK_NEXT);
}
static int
{
int status;
return (WALK_DONE);
return (WALK_DONE);
}
wsp->walk_cbdata);
return (status);
}
/*
* The walker's fini function is invoked at the end of each walk. Since we
* dynamically allocated a fc_fca_port_t in port_walk_i, we must free it now.
*/
static void
{
}
static int
{
if (argc != 0) {
return (DCMD_USAGE);
}
if (!(flags & DCMD_ADDRSPEC)) {
mdb_warn("failed to walk 'fcip_port_head'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags))
mdb_printf("%12s %12s %12s %16s %16s\n",
"FCIP Struct", "Handle", "DIP", "Port WWN", "Node WWN");
/*
* For each port, we just need to read the fc_fca_port_t struct, read
* the port_handle
*/
sizeof (fcip_port_info_t)) {
mdb_printf("%12p %12p %12p %02x%02x%02x%02x%02x%02x%02x%02x "
"%02x%02x%02x%02x%02x%02x%02x%02x\n",
} else
return (DCMD_OK);
}
/*
* MDB module linkage information:
*
* We declare a list of structures describing our dcmds, a list of structures
* describing our walkers, and a function named _mdb_init to return a pointer
* to our module information.
*/
{ NULL }
};
{ "fcip", "walk list of Leadville fcip instances",
{ NULL }
};
};
const mdb_modinfo_t *
_mdb_init(void)
{
return (&modinfo);
}