4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
25 * Copyright 2016 Joyent, Inc.
29 #include <sys/mdb_modapi.h>
30 #include <mdb/mdb_ks.h>
32 #include <sys/usb/usba.h>
33 #include <sys/ddi_impldefs.h>
34 #include <sys/usb/usba/usba_types.h>
35 #include <sys/usb/usba/usba_impl.h>
36 #include <sys/usb/usba/hcdi_impl.h>
37 #include <sys/usb/hubd/hub.h>
38 #include <sys/usb/hubd/hubdvar.h>
40 #include <sys/sunndi.h>
48 extern uintptr_t mdb_usba_get_usba_device(uintptr_t);
49 extern uintptr_t mdb_usba_hcdi_get_hcdi(struct dev_info
*);
55 #define USB_DUMP_VERBOSE 0x01
56 #define USB_DUMP_ACTIVE_PIPES 0x02
58 /* Hardcoded slop factor designed into debug buf logic */
59 #define USB_DEBUG_SIZE_EXTRA_ALLOC 8
63 * Callback arg struct for find_dip (callback func used in usba_device2devinfo).
65 typedef struct usba_device2devinfo_data
{
66 uintptr_t u2d_target_usb_dev_p
; /* one we're looking for */
67 uintptr_t *u2d_dip_addr
; /* Where to store result */
68 boolean_t u2d_found
; /* Match found */
69 } usba_device2devinfo_cbdata_t
;
73 * Callback for usba_device2dip.
74 * Callback called from the devinfo_children walk invoked in usba_device2dip.
76 * For the current dip, get the (potential) pointer to its usba_device_t
78 * See if this pointer matches the address of the usba_device_t we're looking
79 * for (passed in as usb_dev_p). If so, stuff its value in u2d_dip_addr,
80 * and terminate the walk.
82 * - dip_addr is the address in core of the dip currently being processed by the
84 * - local_dip is a pointer to a copy of the struct dev_info in local memory
85 * - cb_data is the addr of the callback arg the walker was invoked with
86 * (passed through transparently from walk invoker).
89 * - WALK_NEXT on success (match not found yet)
90 * - WALK_ERR on errors.
91 * - WALK_DONE is returned, cb_data.found is set to TRUE, and
92 * *cb_data.u2d_dip_addr is set to the matched dip addr if a dip corresponding
93 * to the desired usba_device_t* is found.
97 find_dip(uintptr_t dip_addr
, const void *local_dip
, void *cb_arg
)
99 uintptr_t cur_usb_dev
;
100 usba_device2devinfo_cbdata_t
*cb_data
=
101 (usba_device2devinfo_cbdata_t
*)cb_arg
;
103 if ((cur_usb_dev
= mdb_usba_get_usba_device(dip_addr
)) ==
106 * If there's no corresponding usba_device_t, this dip isn't
107 * a usb node. Might be an sd node. Ignore it.
113 if (cur_usb_dev
== cb_data
->u2d_target_usb_dev_p
) {
114 *cb_data
->u2d_dip_addr
= dip_addr
;
115 cb_data
->u2d_found
= TRUE
;
125 * Given a usba_device pointer, figure out which dip is associated with it.
126 * Relies on usba_device.usb_root_hub_dip being accurate.
128 * - usb_dev_addr is a pointer to a usba_device_t in core.
129 * - dip_addr is the address of a uintptr_t to receive the address in core
130 * of the found dip (if any).
133 * 0 on success (no match found)
134 * 1 on success (match found)
138 usba_device2dip(uintptr_t usb_dev_addr
, uintptr_t *dip_addr
)
140 usba_device_t usb_dev
;
141 usba_device2devinfo_cbdata_t cb_data
;
144 * Walk all USB children of the root hub devinfo.
145 * The callback func looks for a match on the usba_device address.
147 cb_data
.u2d_target_usb_dev_p
= usb_dev_addr
;
148 cb_data
.u2d_dip_addr
= dip_addr
;
149 cb_data
.u2d_found
= FALSE
;
151 if (mdb_vread(&usb_dev
, sizeof (usba_device_t
),
152 usb_dev_addr
) == -1) {
153 mdb_warn("failed to read usba_device struct");
159 * Walk devinfo children starting with the root hub node,
160 * looking for a match on the usba_device pointer (which is what
162 * Result is placed in cb_data.dip_addr.
164 if (mdb_pwalk("devinfo_children", find_dip
, &cb_data
,
165 (uintptr_t)usb_dev
.usb_root_hub_dip
) != 0) {
166 mdb_warn("failed to walk devinfo_children");
171 if (cb_data
.u2d_found
== TRUE
) {
181 * Generic walker usba_list_entry_t walker.
182 * Works for any usba_list_entry_t list.
185 usba_list_walk_init(mdb_walk_state_t
*wsp
)
187 /* Must have a start addr. */
188 if (wsp
->walk_addr
== (uintptr_t)NULL
) {
189 mdb_warn("not a global walk. Starting address required\n");
199 * Generic list walker step routine.
200 * NOTE: multiple walkers share this routine.
203 usba_list_walk_step(mdb_walk_state_t
*wsp
)
206 usba_list_entry_t list_entry
;
208 if (mdb_vread(&list_entry
, sizeof (usba_list_entry_t
),
209 (uintptr_t)wsp
->walk_addr
) == -1) {
210 mdb_warn("failed to read usba_list_entry_t at %p",
216 status
= wsp
->walk_callback(wsp
->walk_addr
, &list_entry
,
218 wsp
->walk_addr
= (uintptr_t)list_entry
.next
;
220 /* Check if we're at the last element */
221 if (wsp
->walk_addr
== (uintptr_t)NULL
) {
231 * usb_pipe_handle walker
232 * Given a pointer to a usba_device_t, walk the array of endpoint
234 * For each list, traverse the list, invoking the callback on each element.
236 * Note this function takes the address of a usba_device struct (which is
237 * easily obtainable), but actually traverses a sub-portion of the struct
238 * (which address is not so easily obtainable).
241 usb_pipe_handle_walk_init(mdb_walk_state_t
*wsp
)
243 if (wsp
->walk_addr
== (uintptr_t)NULL
) {
244 mdb_warn("not a global walk; usba_device_t required\n");
249 wsp
->walk_data
= mdb_alloc((sizeof (usba_ph_impl_t
)) * USBA_N_ENDPOINTS
,
253 * Read the usb_ph_list array into local memory.
254 * Set start address to first element/endpoint in usb_pipehandle_list
256 if (mdb_vread(wsp
->walk_data
,
257 (sizeof (usba_ph_impl_t
)) * USBA_N_ENDPOINTS
,
258 (uintptr_t)((size_t)(wsp
->walk_addr
) +
259 offsetof(usba_device_t
, usb_ph_list
))) == -1) {
260 mdb_warn("failed to read usb_pipehandle_list at %p",
273 usb_pipe_handle_walk_step(mdb_walk_state_t
*wsp
)
276 usba_ph_impl_t
*impl_list
= (usba_ph_impl_t
*)(wsp
->walk_data
);
277 intptr_t index
= (intptr_t)wsp
->walk_arg
;
279 /* Find the first valid endpoint, starting from where we left off. */
280 while ((index
< USBA_N_ENDPOINTS
) &&
281 (impl_list
[index
].usba_ph_data
== NULL
)) {
285 /* No more valid endpoints. */
286 if (index
>= USBA_N_ENDPOINTS
) {
291 status
= wsp
->walk_callback((uintptr_t)impl_list
[index
].usba_ph_data
,
292 wsp
->walk_data
, wsp
->walk_cbdata
);
294 /* Set up to start at next pipe handle next time. */
295 wsp
->walk_arg
= (void *)(index
+ 1);
302 * Given the address of a usba_pipe_handle_data_t, dump summary info.
306 usb_pipe_handle(uintptr_t addr
, uint_t flags
, int argc
, const mdb_arg_t
*argv
)
308 char *dir
, *type
, *state
;
309 usb_ep_descr_t ept_descr
;
310 usba_pipe_handle_data_t pipe_handle
;
311 usba_ph_impl_t ph_impl
;
313 if (!(flags
& DCMD_ADDRSPEC
)) {
318 if (mdb_vread(&pipe_handle
,
319 sizeof (usba_pipe_handle_data_t
), addr
) == -1) {
320 mdb_warn("failed to read pipe handle at %p", addr
);
325 if (mdb_vread(&ph_impl
, sizeof (usba_ph_impl_t
),
326 (uintptr_t)pipe_handle
.p_ph_impl
) == -1) {
329 switch (ph_impl
.usba_ph_state
) {
330 case USB_PIPE_STATE_CLOSED
:
334 case USB_PIPE_STATE_IDLE
:
338 case USB_PIPE_STATE_ACTIVE
:
342 case USB_PIPE_STATE_ERROR
:
346 case USB_PIPE_STATE_CLOSING
:
356 bcopy(&pipe_handle
.p_ep
, &ept_descr
, sizeof (usb_ep_descr_t
));
358 if (DCMD_HDRSPEC(flags
)) {
359 mdb_printf("\n %<u>%-3s %5s %3s %7s %-?s %-?s %-?s%</u>\n",
360 "EP", "TYPE ", "DIR", "STATE ", "P_HANDLE", "P_POLICY",
364 dir
= ((ept_descr
.bEndpointAddress
& USB_EP_DIR_MASK
) &
365 USB_EP_DIR_IN
) ? "In " : "Out";
366 switch (ept_descr
.bmAttributes
& USB_EP_ATTR_MASK
) {
367 case USB_EP_ATTR_CONTROL
:
371 case USB_EP_ATTR_ISOCH
:
375 case USB_EP_ATTR_BULK
:
379 case USB_EP_ATTR_INTR
:
388 mdb_printf(" %3d %5s %3s %7s %-?p %-?p %-?p\n",
389 ept_descr
.bEndpointAddress
& USB_EP_NUM_MASK
, type
, dir
, state
,
390 addr
, addr
+ offsetof(usba_pipe_handle_data_t
, p_policy
),
391 addr
+ offsetof(usba_pipe_handle_data_t
, p_ep
));
398 * usba_device walker:
400 * walks the chain of usba_device structs headed by usba_device_list in usba.c
401 * NOTE: It uses the generic list walk step routine usba_list_walk_step.
402 * No walk_fini routine is needed.
405 usba_device_walk_init(mdb_walk_state_t
*wsp
)
407 usba_list_entry_t list_entry
;
409 if (wsp
->walk_addr
!= (uintptr_t)NULL
) {
411 "global walk only. Must be invoked without an address\n");
416 if (mdb_readvar(&list_entry
, "usba_device_list") == -1) {
417 mdb_warn("failed to read usba_device_list");
422 /* List head is not part of usba_device_t, get first usba_device_t */
423 wsp
->walk_addr
= (uintptr_t)list_entry
.next
;
429 usba_hubd_walk_init(mdb_walk_state_t
*wsp
)
431 if (wsp
->walk_addr
!= 0) {
432 mdb_warn("hubd only supports global walks.\n");
436 if (mdb_layered_walk("usba_device", wsp
) == -1) {
437 mdb_warn("couldn't walk 'usba_device'");
445 * Getting the hub state is annoying. The root hubs are stored on dev_info_t
446 * while the normal hubs are stored as soft state.
449 usba_hubd_walk_step(mdb_walk_state_t
*wsp
)
453 struct dev_info dev_info
;
454 uintptr_t state_addr
;
456 if (mdb_vread(&ud
, sizeof (ud
), wsp
->walk_addr
) != sizeof (ud
)) {
457 mdb_warn("failed to read usba_device_t at %p", wsp
->walk_addr
);
461 if (ud
.usb_root_hubd
!= NULL
) {
462 if (mdb_vread(&hubd
, sizeof (hubd
),
463 (uintptr_t)ud
.usb_root_hubd
) != sizeof (hubd
)) {
464 mdb_warn("failed to read hubd at %p", ud
.usb_root_hubd
);
467 return (wsp
->walk_callback((uintptr_t)ud
.usb_root_hubd
, &hubd
,
471 if (ud
.usb_hubdi
== NULL
)
475 * For non-root hubs, the hubd_t is stored in the soft state. Figure out
476 * the instance from the dev_info_t and then get its soft state.
478 if (mdb_vread(&dev_info
, sizeof (struct dev_info
),
479 (uintptr_t)ud
.usb_dip
) != sizeof (struct dev_info
)) {
480 mdb_warn("failed to read dev_info_t for device %p at %p",
481 wsp
->walk_addr
, ud
.usb_dip
);
485 if (mdb_get_soft_state_byname("hubd_statep", dev_info
.devi_instance
,
486 &state_addr
, &hubd
, sizeof (hubd
)) == -1) {
487 mdb_warn("failed to read hubd soft state for instance %d from "
488 "usb device %p", dev_info
.devi_instance
, wsp
->walk_addr
);
492 return (wsp
->walk_callback(state_addr
, &hubd
, wsp
->walk_cbdata
));
497 * Given the address of a usba_device struct, dump summary info
498 * -v: Print more (verbose) info
499 * -p: Walk/dump all open pipes for this usba_device
503 usba_device(uintptr_t addr
, uint_t flags
, int argc
, const mdb_arg_t
*argv
)
506 char pathname
[MAXNAMELEN
];
507 char dname
[MODMAXNAMELEN
+ 1] = "<unatt>"; /* Driver name */
508 char drv_statep
[MODMAXNAMELEN
+ 10];
510 boolean_t no_driver_attached
= FALSE
;
512 struct dev_info devinfo
;
514 if (!(flags
& DCMD_ADDRSPEC
)) {
516 if (mdb_walk_dcmd("usba_device", "usba_device", argc
,
518 mdb_warn("failed to walk usba_device");
526 if (mdb_getopts(argc
, argv
,
527 'p', MDB_OPT_SETBITS
, USB_DUMP_ACTIVE_PIPES
, &usb_flag
,
528 'v', MDB_OPT_SETBITS
, USB_DUMP_VERBOSE
, &usb_flag
, NULL
) != argc
) {
533 if (usb_flag
&& !(DCMD_HDRSPEC(flags
))) {
537 if (DCMD_HDRSPEC(flags
)) {
538 mdb_printf("%<u>%-15s %4s %-?s %-42s%</u>\n",
539 "NAME", "INST", "DIP", "PATH ");
542 status
= usba_device2dip(addr
, &dip_addr
);
545 * 0 = no error, no match
546 * 1 = no error, match
550 mdb_warn("error looking for dip for usba_device %p",
553 mdb_warn("failed to find dip for usba_device %p\n",
556 mdb_warn("dip and statep unobtainable\n");
561 /* Figure out what driver (name) is attached to this node. */
562 (void) mdb_devinfo2driver(dip_addr
, (char *)dname
, sizeof (dname
));
564 if (mdb_vread(&devinfo
, sizeof (struct dev_info
),
566 mdb_warn("failed to read devinfo");
571 if (!(DDI_CF2(&devinfo
))) {
572 no_driver_attached
= TRUE
;
575 (void) mdb_ddi_pathname(dip_addr
, pathname
, sizeof (pathname
));
576 mdb_printf("%-15s %2d %-?p %s\n", dname
, devinfo
.devi_instance
,
579 if (usb_flag
& USB_DUMP_VERBOSE
) {
581 uintptr_t statep
= (uintptr_t)NULL
;
583 char **config_cloud
, **conf_str_descr
;
584 usb_dev_descr_t usb_dev_descr
;
585 usba_device_t usba_device_struct
;
587 if (mdb_vread(&usba_device_struct
,
588 sizeof (usba_device_t
), addr
) == -1) {
589 mdb_warn("failed to read usba_device struct");
594 mdb_printf(" usba_device: %-16p\n\n", (usba_device_t
*)addr
);
596 if (mdb_vread(&usb_dev_descr
, sizeof (usb_dev_descr
),
597 (uintptr_t)usba_device_struct
.usb_dev_descr
) == -1) {
598 mdb_warn("failed to read usb_dev_descr_t struct");
603 mdb_printf("\n idVendor: 0x%04x idProduct: 0x%04x "
604 "usb_addr: 0x%02x\n", usb_dev_descr
.idVendor
,
605 usb_dev_descr
.idProduct
, usba_device_struct
.usb_addr
);
607 /* Get the string descriptor string into local space. */
608 string_descr
= (char *)mdb_alloc(USB_MAXSTRINGLEN
, UM_GC
);
610 if (usba_device_struct
.usb_mfg_str
== NULL
) {
611 (void) strcpy(string_descr
, "<No Manufacturer String>");
613 if (mdb_readstr(string_descr
, USB_MAXSTRINGLEN
,
614 (uintptr_t)usba_device_struct
.usb_mfg_str
) == -1) {
615 mdb_warn("failed to read manufacturer "
616 "string descriptor");
617 (void) strcpy(string_descr
, "???");
620 mdb_printf("\n Manufacturer String:\t%s\n", string_descr
);
622 if (usba_device_struct
.usb_product_str
== NULL
) {
623 (void) strcpy(string_descr
, "<No Product String>");
625 if (mdb_readstr(string_descr
, USB_MAXSTRINGLEN
,
626 (uintptr_t)usba_device_struct
.usb_product_str
) ==
628 mdb_warn("failed to read product string "
630 (void) strcpy(string_descr
, "???");
633 mdb_printf(" Product String:\t\t%s\n", string_descr
);
635 if (usba_device_struct
.usb_serialno_str
== NULL
) {
636 (void) strcpy(string_descr
, "<No SerialNumber String>");
638 if (mdb_readstr(string_descr
, USB_MAXSTRINGLEN
,
639 (uintptr_t)usba_device_struct
.usb_serialno_str
) ==
641 mdb_warn("failed to read serial number string "
643 (void) strcpy(string_descr
, "???");
646 mdb_printf(" SerialNumber String:\t%s\n", string_descr
);
648 if (no_driver_attached
) {
651 mdb_printf(" state_p: ");
654 * Given the dip, find the associated statep. The
655 * convention to generate this soft state anchor is:
656 * <driver_name>_statep
658 (void) mdb_snprintf(drv_statep
, sizeof (drv_statep
),
660 if (mdb_devinfo2statep(dip_addr
, drv_statep
,
662 mdb_warn("failed to find %s state struct for "
663 "dip %p", drv_statep
, dip_addr
);
667 mdb_printf("%-?p\n", statep
);
670 config_cloud
= (char **)mdb_alloc(sizeof (void *) *
671 usba_device_struct
.usb_n_cfgs
, UM_GC
);
673 conf_str_descr
= (char **)mdb_alloc(sizeof (void *) *
674 usba_device_struct
.usb_n_cfgs
, UM_GC
);
676 if ((usba_device_struct
.usb_cfg_array
) &&
677 (usba_device_struct
.usb_cfg_str_descr
)) {
678 if ((mdb_vread(config_cloud
, sizeof (void *) *
679 usba_device_struct
.usb_n_cfgs
,
680 (uintptr_t)usba_device_struct
.usb_cfg_array
) ==
681 -1) || (mdb_vread(conf_str_descr
, sizeof (void *)
682 * usba_device_struct
.usb_n_cfgs
, (uintptr_t)
683 usba_device_struct
.usb_cfg_str_descr
)) == -1) {
685 mdb_warn("failed to read config cloud "
690 mdb_printf("\n Device Config Clouds:\n"
691 " Index\tConfig\t\tConfiguration "
694 "--------------------\n");
696 for (i
= 0; i
< usba_device_struct
.usb_n_cfgs
;
698 if (mdb_readstr(string_descr
,
700 (uintptr_t)conf_str_descr
[i
]) ==
702 (void) strcpy(string_descr
,
706 mdb_printf(" %4d\t0x%p\t%s\n", i
,
707 config_cloud
[i
], string_descr
);
712 mdb_printf("\n Active configuration index: %d\n",
713 usba_device_struct
.usb_active_cfg_ndx
);
716 if (usb_flag
& USB_DUMP_ACTIVE_PIPES
) {
718 if (mdb_pwalk_dcmd("usb_pipe_handle", "usb_pipe_handle",
719 0, NULL
, addr
) == -1) {
720 mdb_warn("failed to walk usb_pipe_handle");
730 * Dump the contents of the usba_debug_buf, from the oldest to newest,
731 * wrapping around if necessary.
735 usba_debug_buf(uintptr_t addr
, uint_t flags
, int argc
, const mdb_arg_t
*argv
)
737 char *debug_buf_addr
; /* addr in core */
738 char *local_debug_buf
; /* local copy of buf */
743 if (flags
& DCMD_ADDRSPEC
) {
748 if (mdb_readvar(&being_cleared
, "usba_clear_debug_buf_flag") ==
750 mdb_warn("failed to read usba_clear_debug_buf_flag");
759 if (mdb_readvar(&debug_buf_addr
, "usba_debug_buf") == -1) {
760 mdb_warn("failed to read usba_debug_buf");
765 if (debug_buf_addr
== NULL
) {
766 mdb_warn("usba_debug_buf not allocated\n");
772 if (mdb_readvar(&debug_buf_size
, "usba_debug_buf_size") == -1) {
773 mdb_warn("failed to read usba_debug_buf_size");
778 debug_buf_size
+= USB_DEBUG_SIZE_EXTRA_ALLOC
;
779 local_debug_buf
= (char *)mdb_alloc(debug_buf_size
, UM_SLEEP
| UM_GC
);
781 if ((mdb_vread(local_debug_buf
, debug_buf_size
,
782 (uintptr_t)debug_buf_addr
)) == -1) {
783 mdb_warn("failed to read usba_debug_buf at %p",
788 local_debug_buf
[debug_buf_size
- 1] = '\0';
790 if (strlen(local_debug_buf
) == 0) {
795 if ((term_p
= strstr(local_debug_buf
, ">>>>")) == NULL
) {
796 mdb_warn("failed to find terminator \">>>>\"\n");
802 * Print the chunk of buffer from the terminator to the end.
803 * This will print a null string if no wrap has occurred yet.
805 mdb_printf("%s", term_p
+5); /* after >>>>\0 to end of buf */
806 mdb_printf("%s\n", local_debug_buf
); /* beg of buf to >>>>\0 */
813 usba_clear_debug_buf(
814 uintptr_t addr
, uint_t flags
, int argc
, const mdb_arg_t
*argv
)
818 /* stop the tracing */
819 if (mdb_writevar((void*)&clear
, "usba_clear_debug_buf_flag") == -1) {
820 mdb_warn("failed to set usba_clear_debug_buf_flag");
829 extern int prtusb(uintptr_t, uint_t
, int, const mdb_arg_t
*);
831 extern void prt_usb_usage(void);
834 * MDB module linkage information:
836 * We declare a list of structures describing our dcmds, and a function
837 * named _mdb_init to return a pointer to our module information.
839 static const mdb_dcmd_t dcmds
[] = {
840 { "usb_pipe_handle", ":",
841 "print a usb_pipe_handle struct", usb_pipe_handle
, NULL
},
842 { "usba_device", ": [-pv]",
843 "print summary info for a usba_device_t struct", usba_device
, NULL
},
844 { "usba_debug_buf", NULL
,
845 "print usba_debug_buf", usba_debug_buf
, NULL
},
846 { "usba_clear_debug_buf", NULL
,
847 "clear usba_debug_buf", usba_clear_debug_buf
, NULL
},
848 { "prtusb", "?[-t] [-v] [-i index]",
849 "print trees and descriptors for usba_device_t",
850 prtusb
, prt_usb_usage
},
854 static const mdb_walker_t walkers
[] = {
855 /* Generic list walker. */
856 { "usba_list_entry", "walk list of usba_list_entry_t structures",
857 usba_list_walk_init
, usba_list_walk_step
, NULL
, NULL
},
858 { "usb_pipe_handle", "walk USB pipe handles, given a usba_device_t ptr",
859 usb_pipe_handle_walk_init
, usb_pipe_handle_walk_step
, NULL
, NULL
},
860 { "usba_device", "walk global list of usba_device_t structures",
861 usba_device_walk_init
, usba_list_walk_step
, NULL
, NULL
},
862 { "hubd", "walk hubd instances", usba_hubd_walk_init
,
863 usba_hubd_walk_step
, NULL
, NULL
},
867 static const mdb_modinfo_t modinfo
= {
868 MDB_API_VERSION
, dcmds
, walkers
871 const mdb_modinfo_t
*