xref: /illumos-gate/usr/src/uts/common/sys/bl.h (revision 2d6eb4a5e0a47d30189497241345dc5466bb68ab)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_BL_H
28 #define	_SYS_BL_H
29 
30 /*
31  * The interfaces described below are private to FMA.
32  */
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 #include <sys/types.h>
39 #include <sys/processor.h>
40 #include <sys/fm/protocol.h>
41 
42 #define	BLIOC_INSERT		(('B' << 8) | 0x01)
43 #define	BLIOC_DELETE		(('B' << 8) | 0x02)
44 
45 typedef struct bl_req {
46 	caddr_t		bl_fmri;	/* buffer containing packed FMRI */
47 	size_t		bl_fmrisz;	/* size of packed FMRI */
48 	caddr_t		bl_class;	/* event class reason for blacklist */
49 } bl_req_t;
50 
51 #if defined(_SYSCALL32)
52 typedef struct bl_req32 {
53 	caddr32_t	bl_fmri;
54 	size32_t	bl_fmrisz;
55 	caddr32_t	bl_class;
56 } bl_req32_t;
57 #endif	/* _SYSCALL32 */
58 
59 #define	BL_FMRI_MAX_BUFSIZE	8192	/* maximum allowed packed FMRI size */
60 
61 #ifdef _KERNEL
62 
63 extern int blacklist(int, const char *, nvlist_t *, const char *);
64 
65 #endif
66 
67 #ifdef	__cplusplus
68 }
69 #endif
70 
71 #endif	/* _SYS_BL_H */
72