xref: /illumos-gate/usr/src/cmd/mdb/common/modules/genunix/sysevent.h (revision 4de2612967d06c4fdbf524a62556a1e8118a006f)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #ifdef _KERNEL
37 #include <sys/sysmacros.h>
38 #else
39 #include <stddef.h>
40 #endif
41 #include <string.h>
42 #include <sys/types.h>
43 #include <sys/time.h>
44 #include <sys/sysevent.h>
45 #include <sys/sysevent_impl.h>
46 #include <mdb/mdb_modapi.h>
47 
48 #define	SYSEVENT_SENTQ		0x1
49 #define	SYSEVENT_VERBOSE	0x2
50 #define	CLASS_FIELD_MAX		9
51 #define	CHAN_FIELD_MAX		14
52 #define	CLASS_LIST_FIELD_MAX	24
53 #define	SUBCLASS_FIELD_MAX	10
54 
55 
56 extern int sysevent_buf(uintptr_t addr, uint_t flags, uint_t opt_flags);
57 extern int sysevent(uintptr_t addr, uint_t flags, int argc,
58     const mdb_arg_t *argv);
59 extern int sysevent_channel(uintptr_t addr, uint_t flags, int argc,
60     const mdb_arg_t *argv);
61 extern int sysevent_class_list(uintptr_t addr, uint_t flags, int argc,
62     const mdb_arg_t *argv);
63 extern int sysevent_subclass_list(uintptr_t addr, uint_t flags, int argc,
64     const mdb_arg_t *argv);
65 
66 extern int sysevent_pend_walk_init(mdb_walk_state_t *wsp);
67 extern int sysevent_walk_step(mdb_walk_state_t *wsp);
68 extern int sysevent_sent_walk_init(mdb_walk_state_t *wsp);
69 extern void sysevent_walk_fini(mdb_walk_state_t *wsp);
70 extern int sysevent_channel_walk_init(mdb_walk_state_t *wsp);
71 extern int sysevent_channel_walk_step(mdb_walk_state_t *wsp);
72 extern void sysevent_channel_walk_fini(mdb_walk_state_t *wsp);
73 extern int sysevent_class_list_walk_init(mdb_walk_state_t *wsp);
74 extern int sysevent_class_list_walk_step(mdb_walk_state_t *wsp);
75 extern void sysevent_class_list_walk_fini(mdb_walk_state_t *wsp);
76 extern int sysevent_subclass_list_walk_init(mdb_walk_state_t *wsp);
77 extern int sysevent_subclass_list_walk_step(mdb_walk_state_t *wsp);
78 extern void sysevent_subclass_list_walk_fini(mdb_walk_state_t *wsp);
79 
80 #ifdef	__cplusplus
81 }
82 #endif
83 
84 #endif	/* _SYSEVENT_H */
85