1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SYSEVENT_H
28 #define	_SYSEVENT_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 #ifdef _KERNEL
35 #include <sys/sysmacros.h>
36 #else
37 #include <stddef.h>
38 #endif
39 #include <string.h>
40 #include <sys/types.h>
41 #include <sys/time.h>
42 #include <sys/sysevent.h>
43 #include <sys/sysevent_impl.h>
44 #include <mdb/mdb_modapi.h>
45 
46 #define	SYSEVENT_SENTQ		0x1
47 #define	SYSEVENT_VERBOSE	0x2
48 #define	CLASS_FIELD_MAX		9
49 #define	CHAN_FIELD_MAX		14
50 #define	CLASS_LIST_FIELD_MAX	24
51 #define	SUBCLASS_FIELD_MAX	10
52 
53 
54 extern int sysevent_buf(uintptr_t addr, uint_t flags, uint_t opt_flags);
55 extern int sysevent(uintptr_t addr, uint_t flags, int argc,
56     const mdb_arg_t *argv);
57 extern int sysevent_channel(uintptr_t addr, uint_t flags, int argc,
58     const mdb_arg_t *argv);
59 extern int sysevent_class_list(uintptr_t addr, uint_t flags, int argc,
60     const mdb_arg_t *argv);
61 extern int sysevent_subclass_list(uintptr_t addr, uint_t flags, int argc,
62     const mdb_arg_t *argv);
63 
64 extern int sysevent_pend_walk_init(mdb_walk_state_t *wsp);
65 extern int sysevent_walk_step(mdb_walk_state_t *wsp);
66 extern int sysevent_sent_walk_init(mdb_walk_state_t *wsp);
67 extern void sysevent_walk_fini(mdb_walk_state_t *wsp);
68 extern int sysevent_channel_walk_init(mdb_walk_state_t *wsp);
69 extern int sysevent_channel_walk_step(mdb_walk_state_t *wsp);
70 extern void sysevent_channel_walk_fini(mdb_walk_state_t *wsp);
71 extern int sysevent_class_list_walk_init(mdb_walk_state_t *wsp);
72 extern int sysevent_class_list_walk_step(mdb_walk_state_t *wsp);
73 extern void sysevent_class_list_walk_fini(mdb_walk_state_t *wsp);
74 extern int sysevent_subclass_list_walk_init(mdb_walk_state_t *wsp);
75 extern int sysevent_subclass_list_walk_step(mdb_walk_state_t *wsp);
76 extern void sysevent_subclass_list_walk_fini(mdb_walk_state_t *wsp);
77 
78 #ifdef	__cplusplus
79 }
80 #endif
81 
82 #endif	/* _SYSEVENT_H */
83