/usr/include/freeipmi/cmds/ipmi-device-global-cmds.h is in libfreeipmi-dev 0.8.12-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | /*
Copyright (C) 2003-2010 FreeIPMI Core Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _IPMI_DEVICE_GLOBAL_CMDS_H
#define _IPMI_DEVICE_GLOBAL_CMDS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <freeipmi/fiid/fiid.h>
#define IPMI_DEVICE_ID_UNSPECIFIED 0x00
#define IPMI_MANUFACTURER_ID_UNSPECIFIED 0x000000
#define IPMI_MANUFACTURER_ID_RESERVED 0x0FFFFF
#define IPMI_1_5_MAJOR_VERSION 1
#define IPMI_1_5_MINOR_VERSION 5
#define IPMI_2_0_MAJOR_VERSION 2
#define IPMI_2_0_MINOR_VERSION 0
#define IPMI_SELF_TEST_RESULT_NO_ERROR 0x55
#define IPMI_SELF_TEST_RESULT_SELF_TEST_FUNCTION_NOT_IMPLEMENTED_IN_THIS_CONTROLLER 0x56
#define IPMI_SELF_TEST_RESULT_CORRUPTED_OR_INACCESSIBLE_DATA_OR_DEVICES 0x57
#define IPMI_SELF_TEST_RESULT_FATAL_HARDWARE_ERROR 0x58
#define IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0 0x00
#define IPMI_ACPI_SYSTEM_POWER_STATE_S1 0x01
#define IPMI_ACPI_SYSTEM_POWER_STATE_S2 0x02
#define IPMI_ACPI_SYSTEM_POWER_STATE_S3 0x03
#define IPMI_ACPI_SYSTEM_POWER_STATE_S4 0x04
#define IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2 0x05
#define IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5 0x06
#define IPMI_ACPI_SYSTEM_POWER_STATE_G3 0x07
#define IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING 0x08
#define IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING 0x09
#define IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE 0x0A
#define IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON 0x20
#define IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21
#define IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN 0x2A
#define IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F
#define IPMI_ACPI_SYSTEM_POWER_STATE_VALID(__acpi_system_power_state) \
(((__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S1 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S2 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S3 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S4 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_G3 \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN \
|| (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE) ? 1 : 0)
#define IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE 0x1
#define IPMI_ACPI_SET_SYSTEM_POWER_STATE_DONT_SET_SYSTEM_POWER_STATE 0x0
#define IPMI_ACPI_SET_SYSTEM_POWER_STATE_VALID(__set_system_power_state) \
(((__set_system_power_state) == IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE \
|| (__set_system_power_state) == IPMI_ACPI_SET_SYSTEM_POWER_STATE_DONT_SET_SYSTEM_POWER_STATE) ? 1 : 0)
#define IPMI_ACPI_DEVICE_POWER_STATE_D0 0x00
#define IPMI_ACPI_DEVICE_POWER_STATE_D1 0x01
#define IPMI_ACPI_DEVICE_POWER_STATE_D2 0x02
#define IPMI_ACPI_DEVICE_POWER_STATE_D3 0x03
#define IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN 0x2A
#define IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE 0x7F
#define IPMI_ACPI_DEVICE_POWER_STATE_VALID(__acpi_device_power_state) \
(((__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D0 \
|| (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D1 \
|| (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D2 \
|| (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D3 \
|| (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN \
|| (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE) ? 1 : 0)
#define IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE 0x1
#define IPMI_ACPI_SET_DEVICE_POWER_STATE_DONT_SET_DEVICE_POWER_STATE 0x0
#define IPMI_ACPI_SET_DEVICE_POWER_STATE_VALID(__set_device_power_state) \
(((__set_device_power_state) == IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE \
|| (__set_device_power_state) == IPMI_ACPI_SET_DEVICE_POWER_STATE_DONT_SET_DEVICE_POWER_STATE) ? 1 : 0)
#define IPMI_SYSTEM_GUID_LENGTH 16
/*
* fill* functions return 0 on success, -1 on error.
*
* obj_cmd_rq must be for the fill function's respective fiid
* template request.
*
* see freeipmi/templates/ for template definitions
*/
extern fiid_template_t tmpl_cmd_get_device_id_rq;
extern fiid_template_t tmpl_cmd_get_device_id_rs;
extern fiid_template_t tmpl_cmd_cold_reset_rq;
extern fiid_template_t tmpl_cmd_cold_reset_rs;
extern fiid_template_t tmpl_cmd_warm_reset_rq;
extern fiid_template_t tmpl_cmd_warm_reset_rs;
extern fiid_template_t tmpl_cmd_get_self_test_results_rq;
extern fiid_template_t tmpl_cmd_get_self_test_results_rs;
extern fiid_template_t tmpl_cmd_set_acpi_power_state_rq;
extern fiid_template_t tmpl_cmd_set_acpi_power_state_rs;
extern fiid_template_t tmpl_cmd_get_acpi_power_state_rq;
extern fiid_template_t tmpl_cmd_get_acpi_power_state_rs;
extern fiid_template_t tmpl_cmd_get_device_guid_rq;
extern fiid_template_t tmpl_cmd_get_device_guid_rs;
extern fiid_template_t tmpl_cmd_get_device_guid_format_rs;
int fill_cmd_get_device_id (fiid_obj_t obj_cmd_rq);
int fill_cmd_cold_reset (fiid_obj_t obj_cmd_rq);
int fill_cmd_warm_reset (fiid_obj_t obj_cmd_rq);
int fill_cmd_set_acpi_power_state (uint8_t system_power_state_enumeration,
uint8_t set_system_power_state,
uint8_t device_power_state_enumeration,
uint8_t set_device_power_state,
fiid_obj_t obj_cmd_rq);
int fill_cmd_get_acpi_power_state (fiid_obj_t obj_cmd_rq);
int fill_cmd_get_self_test_results (fiid_obj_t obj_cmd_rq);
int fill_cmd_get_device_guid (fiid_obj_t obj_cmd_rq);
#ifdef __cplusplus
}
#endif
#endif /* ipmi-device-global-cmds.h */
|