13b6e0a59SMatt Amdur /* 23b6e0a59SMatt Amdur * CDDL HEADER START 33b6e0a59SMatt Amdur * 43b6e0a59SMatt Amdur * The contents of this file are subject to the terms of the 53b6e0a59SMatt Amdur * Common Development and Distribution License (the "License"). 63b6e0a59SMatt Amdur * You may not use this file except in compliance with the License. 73b6e0a59SMatt Amdur * 83b6e0a59SMatt Amdur * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 93b6e0a59SMatt Amdur * or http://www.opensolaris.org/os/licensing. 103b6e0a59SMatt Amdur * See the License for the specific language governing permissions 113b6e0a59SMatt Amdur * and limitations under the License. 123b6e0a59SMatt Amdur * 133b6e0a59SMatt Amdur * When distributing Covered Code, include this CDDL HEADER in each 143b6e0a59SMatt Amdur * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 153b6e0a59SMatt Amdur * If applicable, add the following below this CDDL HEADER, with the 163b6e0a59SMatt Amdur * fields enclosed by brackets "[]" replaced with your own identifying 173b6e0a59SMatt Amdur * information: Portions Copyright [yyyy] [name of copyright owner] 183b6e0a59SMatt Amdur * 193b6e0a59SMatt Amdur * CDDL HEADER END 203b6e0a59SMatt Amdur */ 213b6e0a59SMatt Amdur /* 22*72a1114bSHenrik Mattsson * Copyright (c) 2013 by Delphix. All rights reserved. 233b6e0a59SMatt Amdur * Copyright (c) 2012 Joyent, Inc. All rights reserved. 243b6e0a59SMatt Amdur */ 253b6e0a59SMatt Amdur /* 263b6e0a59SMatt Amdur * This file contains mdb private tab completion related functions. Public 273b6e0a59SMatt Amdur * functions for modules are put into the module API, see mdb_modapi.h. Note 283b6e0a59SMatt Amdur * that the mdb_ctf_id_t value is private to mdb and not a part of the module 293b6e0a59SMatt Amdur * api, hence it has to stay in here. 303b6e0a59SMatt Amdur */ 313b6e0a59SMatt Amdur 323b6e0a59SMatt Amdur #ifndef _MDB_TAB_H 333b6e0a59SMatt Amdur #define _MDB_TAB_H 343b6e0a59SMatt Amdur 353b6e0a59SMatt Amdur #include <sys/types.h> 363b6e0a59SMatt Amdur #include <mdb/mdb_ctf.h> 373b6e0a59SMatt Amdur #include <mdb/mdb_nv.h> 383b6e0a59SMatt Amdur #include <mdb/mdb_modapi.h> 393b6e0a59SMatt Amdur 403b6e0a59SMatt Amdur #ifdef __cplusplus 413b6e0a59SMatt Amdur extern "C" { 423b6e0a59SMatt Amdur #endif 433b6e0a59SMatt Amdur 443b6e0a59SMatt Amdur #ifdef _MDB 453b6e0a59SMatt Amdur 463b6e0a59SMatt Amdur struct mdb_tab_cookie { 473b6e0a59SMatt Amdur mdb_nv_t mtc_nv; 483b6e0a59SMatt Amdur char mtc_match[MDB_SYM_NAMLEN]; 493b6e0a59SMatt Amdur char mtc_base[MDB_SYM_NAMLEN]; 503b6e0a59SMatt Amdur void *mtc_cba; 513b6e0a59SMatt Amdur }; 523b6e0a59SMatt Amdur 533b6e0a59SMatt Amdur extern mdb_tab_cookie_t *mdb_tab_init(void); 543b6e0a59SMatt Amdur extern size_t mdb_tab_size(mdb_tab_cookie_t *); 553b6e0a59SMatt Amdur extern const char *mdb_tab_match(mdb_tab_cookie_t *); 563b6e0a59SMatt Amdur extern void mdb_tab_print(mdb_tab_cookie_t *); 573b6e0a59SMatt Amdur extern void mdb_tab_fini(mdb_tab_cookie_t *); 58*72a1114bSHenrik Mattsson extern int mdb_tab_complete_global(mdb_tab_cookie_t *, const char *); 593b6e0a59SMatt Amdur extern int mdb_tab_complete_dcmd(mdb_tab_cookie_t *, const char *); 603b6e0a59SMatt Amdur extern int mdb_tab_complete_walker(mdb_tab_cookie_t *, const char *); 613b6e0a59SMatt Amdur extern int mdb_tab_complete_member_by_id(mdb_tab_cookie_t *, mdb_ctf_id_t, 623b6e0a59SMatt Amdur const char *); 633b6e0a59SMatt Amdur extern int mdb_tab_command(mdb_tab_cookie_t *, const char *); 643b6e0a59SMatt Amdur 653b6e0a59SMatt Amdur #endif /* _MDB */ 663b6e0a59SMatt Amdur 673b6e0a59SMatt Amdur #ifdef __cplusplus 683b6e0a59SMatt Amdur } 693b6e0a59SMatt Amdur #endif 703b6e0a59SMatt Amdur 713b6e0a59SMatt Amdur #endif /* _MDB_TAB_H */ 72