/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_ENVMON_H
#define _SYS_ENVMON_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* environmental monitoring ioctls
*
* there are two types of environmental monitor:
* sensors - these provide a value for the environmental property
* indicators - these provide a status of "within range" or "out of range"
*
* for any given environmental property, a particular platform is likely
* to support either a sensor or an indicator
*
* a reserved value is used to signify that a particular sensor value is
* not available
*/
/* reserved values to signify "value unavailable" */
/*
* The ability of a sensor or indicator to deliver a value is encapsulated
* in the sensor_status field.
* The following sensor_status bit fields are defined
*/
/*
* Some drivers may implement the older lomv interface in addition to
* the ioctls defined here. To avoid a clash with values from older
* interfaces, ioctls defined here start high in the available range.
*/
#define ENVMONIOCGETALARM \
#define ENVMONIOCCHASSISSERIALNUM \
/* field length for text identifiers */
typedef struct {
/*
* Some structures include threshold fields.
* Where a particular threshold is not defined for a given sensor,
* the reserved value ENVMON_VAL_UNAVAILABLE is returned.
*/
typedef struct {
/*
* id identifies the fru to be accessed.
* next_id returns the id for the next component of the type implied by
* the ioctl command. If there are no more frus in this sequence,
* next_id is set to an empty string.
* If id is set to an empty string on entry, next_id returns the first id.
* In this case, sensor_status will be returned as ENVMON_NOT_PRESENT.
*/
typedef struct {
typedef struct {
typedef struct {
} envmon_fan_t;
/*
* Values for led_state
*/
#define ENVMON_LED_OFF 0
/*
* Values for the hue of the leds
*/
#define ENVMON_LED_CLR_ANY 0
typedef struct {
typedef struct {
/*
* Values for alarm_state
*/
#define ENVMON_ALARM_OFF 0
typedef struct {
typedef struct {
/*
* Values for fru_status
*/
#define ENVMON_FRU_NOT_PRESENT 0
typedef struct {
} envmon_hpu_t;
/*
* env_sysinto_t is used to return limits on various item types
*/
typedef struct {
/*
* envmon_keysw_t is used to return the current value of the
* keyswitch (if fitted)
*/
typedef enum envmon_keysw_pos {
/*
* envmon_chassis_t is used to retuen the chassis serial number
*/
typedef struct {
#ifdef __cplusplus
}
#endif
#endif /* _SYS_ENVMON_H */