dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libtsalarm / common / tsalarm.h
blob313110ae0ed74570cdf84d292954b97cb7aab785
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 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _TSALARM_H
27 #define _TSALARM_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
35 /* alarm_action */
36 #define TSALARM_ENABLE 1
37 #define TSALARM_DISABLE 2
38 #define TSALARM_STATUS 3
40 /* alarm_id */
41 #define TSALARM_CRITICAL 0
42 #define TSALARM_MAJOR 1
43 #define TSALARM_MINOR 2
44 #define TSALARM_USER 3
46 /* alarm_state */
47 #define TSALARM_STATE_ON 1
48 #define TSALARM_STATE_OFF 2
49 #define TSALARM_STATE_UNKNOWN 3
51 /* Status Types */
52 #define TSALARM_OK 1
53 #define TSALARM_ERROR 2
55 /* Error codes */
56 #define TSALARM_SUCCESS 0
57 #define TSALARM_CHANNEL_INIT_FAILURE -1
58 #define TSALARM_NULL_REQ_DATA -2
59 #define TSALARM_COMM_FAILURE -3
60 #define TSALARM_UNBOUND_PACKET_RECVD -4
61 #define TSALARM_GET_ERROR -5
62 #define TSALARM_SET_ERROR -6
65 * alarm set/get request message
67 typedef struct tsalarm_req {
68 uint32_t alarm_id;
69 uint32_t alarm_action;
70 } tsalarm_req_t;
73 * alarm set/get response message
75 typedef struct tsalarm_resp {
76 uint32_t status;
77 uint32_t alarm_id;
78 uint32_t alarm_state;
79 } tsalarm_resp_t;
81 int tsalarm_get(uint32_t alarm_type, uint32_t *alarm_state);
82 int tsalarm_set(uint32_t alarm_type, uint32_t alarm_state);
84 #ifdef __cplusplus
86 #endif
88 #endif /* _TSALARM_H */