7144 lofi mapping in non-GZ is not working with default match rules
[unleashed.git] / usr / src / uts / common / sys / contract.h
blobfaf4f6252985c6b1c8102067c419189aab441694
1 /*
2 * CDDL HEADER START
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]
19 * CDDL HEADER END
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _SYS_CONTRACT_H
27 #define _SYS_CONTRACT_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #include <sys/types.h>
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 typedef uint64_t ctevid_t;
40 * Contract parameter maximum size, in bytes
42 #define CT_PARAM_MAX_SIZE 8192
45 * Common event types
47 #define CT_EV_NEGEND 0
50 * Level of status detail requested
52 #define CTD_COMMON 0 /* No additional detail */
53 #define CTD_FIXED 1 /* O(1) info */
54 #define CTD_ALL 2 /* O(n) info */
57 * Values for ctev_flags.
59 #define CTE_ACK 0x1
60 #define CTE_INFO 0x2
61 #define CTE_NEG 0x4
63 #define CTP_EV_CRITICAL 100
64 #define CTP_EV_INFO 101
65 #define CTP_COOKIE 102
67 #define CTS_NEWCT "cts_newct"
68 #define CTS_NEVID "cts_nevid"
70 typedef enum ctstate {
71 CTS_OWNED, /* contract is owned by a process */
72 CTS_INHERITED, /* contract has been inherited by its parent */
73 CTS_ORPHAN, /* contract has no parent */
74 CTS_DEAD /* contract has been destroyed */
75 } ctstate_t;
77 typedef enum ct_typeid {
78 CTT_PROCESS, /* process contract */
79 CTT_DEVICE, /* device contract */
80 CTT_MAXTYPE
81 } ct_typeid_t;
83 typedef struct ct_event {
84 ctid_t ctev_id;
85 uint32_t ctev_pad1;
86 ctevid_t ctev_evid;
87 ct_typeid_t ctev_cttype;
88 uint32_t ctev_flags;
89 uint32_t ctev_type;
90 uint32_t ctev_nbytes;
91 uint32_t ctev_goffset;
92 uint32_t ctev_pad2;
93 char *ctev_buffer;
94 } ct_event_t;
96 typedef struct ct_status {
97 ctid_t ctst_id;
98 zoneid_t ctst_zoneid;
99 ct_typeid_t ctst_type;
100 pid_t ctst_holder;
101 ctstate_t ctst_state;
102 int ctst_nevents;
103 int ctst_ntime;
104 int ctst_qtime;
105 uint64_t ctst_nevid;
106 uint_t ctst_detail;
107 size_t ctst_nbytes;
108 uint_t ctst_critical;
109 uint_t ctst_informative;
110 uint64_t ctst_cookie;
111 char *ctst_buffer;
112 } ct_status_t;
114 typedef struct ct_param {
115 uint32_t ctpm_id;
116 uint32_t ctpm_size;
117 void *ctpm_value;
118 } ct_param_t;
120 #ifdef __cplusplus
122 #endif
124 #endif /* _SYS_CONTRACT_H */