1 /* 2 * ipmi_msgbits.h 3 * 4 * MontaVista IPMI interface, values used for messages. 5 * 6 * Author: MontaVista Software, Inc. 7 * Corey Minyard <minyard@mvista.com> 8 * source@mvista.com 9 * 10 * Copyright 2002,2003,2004,2005 MontaVista Software Inc. 11 * 12 * This software is available to you under a choice of one of two 13 * licenses. You may choose to be licensed under the terms of the GNU 14 * Lesser General Public License (GPL) Version 2 or the modified BSD 15 * license below. The following disclamer applies to both licenses: 16 * 17 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 18 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 23 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 25 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * GNU Lesser General Public Licence 29 * 30 * This program is free software; you can redistribute it and/or 31 * modify it under the terms of the GNU Lesser General Public License 32 * as published by the Free Software Foundation; either version 2 of 33 * the License, or (at your option) any later version. 34 * 35 * You should have received a copy of the GNU Lesser General Public 36 * License along with this program; if not, write to the Free 37 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 38 * 39 * Modified BSD Licence 40 * 41 * Redistribution and use in source and binary forms, with or without 42 * modification, are permitted provided that the following conditions 43 * are met: 44 * 45 * 1. Redistributions of source code must retain the above copyright 46 * notice, this list of conditions and the following disclaimer. 47 * 2. Redistributions in binary form must reproduce the above 48 * copyright notice, this list of conditions and the following 49 * disclaimer in the documentation and/or other materials provided 50 * with the distribution. 51 * 3. The name of the author may not be used to endorse or promote 52 * products derived from this software without specific prior 53 * written permission. 54 */ 55 56 #ifndef OPENIPMI_MSGBITS_H 57 #define OPENIPMI_MSGBITS_H 58 59 #define MAX_IPMI_DATA_SIZE 36 60 61 /* 62 * IPMI commands 63 */ 64 65 /* Chassis netfn (0x00) */ 66 #define IPMI_GET_CHASSIS_CAPABILITIES_CMD 0x00 67 #define IPMI_GET_CHASSIS_STATUS_CMD 0x01 68 #define IPMI_CHASSIS_CONTROL_CMD 0x02 69 #define IPMI_CHASSIS_RESET_CMD 0x03 70 #define IPMI_CHASSIS_IDENTIFY_CMD 0x04 71 #define IPMI_SET_CHASSIS_CAPABILITIES_CMD 0x05 72 #define IPMI_SET_POWER_RESTORE_POLICY_CMD 0x06 73 #define IPMI_GET_SYSTEM_RESTART_CAUSE_CMD 0x07 74 #define IPMI_SET_SYSTEM_BOOT_OPTIONS_CMD 0x08 75 #define IPMI_GET_SYSTEM_BOOT_OPTIONS_CMD 0x09 76 77 #define IPMI_GET_POH_COUNTER_CMD 0x0f 78 79 /* Bridge netfn (0x00) */ 80 #define IPMI_GET_BRIDGE_STATE_CMD 0x00 81 #define IPMI_SET_BRIDGE_STATE_CMD 0x01 82 #define IPMI_GET_ICMB_ADDRESS_CMD 0x02 83 #define IPMI_SET_ICMB_ADDRESS_CMD 0x03 84 #define IPMI_SET_BRIDGE_PROXY_ADDRESS_CMD 0x04 85 #define IPMI_GET_BRIDGE_STATISTICS_CMD 0x05 86 #define IPMI_GET_ICMB_CAPABILITIES_CMD 0x06 87 88 #define IPMI_CLEAR_BRIDGE_STATISTICS_CMD 0x08 89 #define IPMI_GET_BRIDGE_PROXY_ADDRESS_CMD 0x09 90 #define IPMI_GET_ICMB_CONNECTOR_INFO_CMD 0x0a 91 #define IPMI_SET_ICMB_CONNECTOR_INFO_CMD 0x0b 92 #define IPMI_SEND_ICMB_CONNECTION_ID_CMD 0x0c 93 94 #define IPMI_PREPARE_FOR_DISCOVERY_CMD 0x10 95 #define IPMI_GET_ADDRESSES_CMD 0x11 96 #define IPMI_SET_DISCOVERED_CMD 0x12 97 #define IPMI_GET_CHASSIS_DEVICE_ID_CMD 0x13 98 #define IPMI_SET_CHASSIS_DEVICE_ID_CMD 0x14 99 100 #define IPMI_BRIDGE_REQUEST_CMD 0x20 101 #define IPMI_BRIDGE_MESSAGE_CMD 0x21 102 103 #define IPMI_GET_EVENT_COUNT_CMD 0x30 104 #define IPMI_SET_EVENT_DESTINATION_CMD 0x31 105 #define IPMI_SET_EVENT_RECEPTION_STATE_CMD 0x32 106 #define IPMI_SEND_ICMB_EVENT_MESSAGE_CMD 0x33 107 #define IPMI_GET_EVENT_DESTIATION_CMD 0x34 108 #define IPMI_GET_EVENT_RECEPTION_STATE_CMD 0x35 109 110 #define IPMI_ERROR_REPORT_CMD 0xff 111 112 /* Sensor/Event netfn (0x04) */ 113 #define IPMI_SET_EVENT_RECEIVER_CMD 0x00 114 #define IPMI_GET_EVENT_RECEIVER_CMD 0x01 115 #define IPMI_PLATFORM_EVENT_CMD 0x02 116 117 #define IPMI_GET_PEF_CAPABILITIES_CMD 0x10 118 #define IPMI_ARM_PEF_POSTPONE_TIMER_CMD 0x11 119 #define IPMI_SET_PEF_CONFIG_PARMS_CMD 0x12 120 #define IPMI_GET_PEF_CONFIG_PARMS_CMD 0x13 121 #define IPMI_SET_LAST_PROCESSED_EVENT_ID_CMD 0x14 122 #define IPMI_GET_LAST_PROCESSED_EVENT_ID_CMD 0x15 123 #define IPMI_ALERT_IMMEDIATE_CMD 0x16 124 #define IPMI_PET_ACKNOWLEDGE_CMD 0x17 125 126 #define IPMI_GET_DEVICE_SDR_INFO_CMD 0x20 127 #define IPMI_GET_DEVICE_SDR_CMD 0x21 128 #define IPMI_RESERVE_DEVICE_SDR_REPOSITORY_CMD 0x22 129 #define IPMI_GET_SENSOR_READING_FACTORS_CMD 0x23 130 #define IPMI_SET_SENSOR_HYSTERESIS_CMD 0x24 131 #define IPMI_GET_SENSOR_HYSTERESIS_CMD 0x25 132 #define IPMI_SET_SENSOR_THRESHOLD_CMD 0x26 133 #define IPMI_GET_SENSOR_THRESHOLD_CMD 0x27 134 #define IPMI_SET_SENSOR_EVENT_ENABLE_CMD 0x28 135 #define IPMI_GET_SENSOR_EVENT_ENABLE_CMD 0x29 136 #define IPMI_REARM_SENSOR_EVENTS_CMD 0x2a 137 #define IPMI_GET_SENSOR_EVENT_STATUS_CMD 0x2b 138 #define IPMI_GET_SENSOR_READING_CMD 0x2d 139 #define IPMI_SET_SENSOR_TYPE_CMD 0x2e 140 #define IPMI_GET_SENSOR_TYPE_CMD 0x2f 141 142 /* App netfn (0x06) */ 143 #define IPMI_GET_DEVICE_ID_CMD 0x01 144 #define IPMI_BROADCAST_GET_DEVICE_ID_CMD 0x01 145 #define IPMI_COLD_RESET_CMD 0x02 146 #define IPMI_WARM_RESET_CMD 0x03 147 #define IPMI_GET_SELF_TEST_RESULTS_CMD 0x04 148 #define IPMI_MANUFACTURING_TEST_ON_CMD 0x05 149 #define IPMI_SET_ACPI_POWER_STATE_CMD 0x06 150 #define IPMI_GET_ACPI_POWER_STATE_CMD 0x07 151 #define IPMI_GET_DEVICE_GUID_CMD 0x08 152 #define IPMI_RESET_WATCHDOG_TIMER_CMD 0x22 153 #define IPMI_SET_WATCHDOG_TIMER_CMD 0x24 154 #define IPMI_GET_WATCHDOG_TIMER_CMD 0x25 155 #define IPMI_SET_BMC_GLOBAL_ENABLES_CMD 0x2e 156 #define IPMI_GET_BMC_GLOBAL_ENABLES_CMD 0x2f 157 #define IPMI_CLEAR_MSG_FLAGS_CMD 0x30 158 #define IPMI_GET_MSG_FLAGS_CMD 0x31 159 #define IPMI_ENABLE_MESSAGE_CHANNEL_RCV_CMD 0x32 160 #define IPMI_GET_MSG_CMD 0x33 161 #define IPMI_SEND_MSG_CMD 0x34 162 #define IPMI_READ_EVENT_MSG_BUFFER_CMD 0x35 163 #define IPMI_GET_BT_INTERFACE_CAPABILITIES_CMD 0x36 164 #define IPMI_GET_SYSTEM_GUID_CMD 0x37 165 #define IPMI_GET_CHANNEL_AUTH_CAPABILITIES_CMD 0x38 166 #define IPMI_GET_SESSION_CHALLENGE_CMD 0x39 167 #define IPMI_ACTIVATE_SESSION_CMD 0x3a 168 #define IPMI_SET_SESSION_PRIVILEGE_CMD 0x3b 169 #define IPMI_CLOSE_SESSION_CMD 0x3c 170 #define IPMI_GET_SESSION_INFO_CMD 0x3d 171 172 #define IPMI_GET_AUTHCODE_CMD 0x3f 173 #define IPMI_SET_CHANNEL_ACCESS_CMD 0x40 174 #define IPMI_GET_CHANNEL_ACCESS_CMD 0x41 175 #define IPMI_GET_CHANNEL_INFO_CMD 0x42 176 #define IPMI_SET_USER_ACCESS_CMD 0x43 177 #define IPMI_GET_USER_ACCESS_CMD 0x44 178 #define IPMI_SET_USER_NAME_CMD 0x45 179 #define IPMI_GET_USER_NAME_CMD 0x46 180 #define IPMI_SET_USER_PASSWORD_CMD 0x47 181 #define IPMI_ACTIVATE_PAYLOAD_CMD 0x48 182 #define IPMI_DEACTIVATE_PAYLOAD_CMD 0x49 183 #define IPMI_GET_PAYLOAD_ACTIVATION_STATUS_CMD 0x4a 184 #define IPMI_GET_PAYLOAD_INSTANCE_INFO_CMD 0x4b 185 #define IPMI_SET_USER_PAYLOAD_ACCESS_CMD 0x4c 186 #define IPMI_GET_USER_PAYLOAD_ACCESS_CMD 0x4d 187 #define IPMI_GET_CHANNEL_PAYLOAD_SUPPORT_CMD 0x4e 188 #define IPMI_GET_CHANNEL_PAYLOAD_VERSION_CMD 0x4f 189 #define IPMI_GET_CHANNEL_OEM_PAYLOAD_INFO_CMD 0x50 190 191 #define IPMI_MASTER_READ_WRITE_CMD 0x52 192 193 #define IPMI_GET_CHANNEL_CIPHER_SUITES_CMD 0x54 194 #define IPMI_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_CMD 0x55 195 #define IPMI_SET_CHANNEL_SECURITY_KEY_CMD 0x56 196 #define IPMI_GET_SYSTEM_INTERFACE_CAPABILITIES_CMD 0x57 197 198 199 /* Storage netfn (0x0a) */ 200 #define IPMI_GET_FRU_INVENTORY_AREA_INFO_CMD 0x10 201 #define IPMI_READ_FRU_DATA_CMD 0x11 202 #define IPMI_WRITE_FRU_DATA_CMD 0x12 203 204 #define IPMI_GET_SDR_REPOSITORY_INFO_CMD 0x20 205 #define IPMI_GET_SDR_REPOSITORY_ALLOC_INFO_CMD 0x21 206 #define IPMI_RESERVE_SDR_REPOSITORY_CMD 0x22 207 #define IPMI_GET_SDR_CMD 0x23 208 #define IPMI_ADD_SDR_CMD 0x24 209 #define IPMI_PARTIAL_ADD_SDR_CMD 0x25 210 #define IPMI_DELETE_SDR_CMD 0x26 211 #define IPMI_CLEAR_SDR_REPOSITORY_CMD 0x27 212 #define IPMI_GET_SDR_REPOSITORY_TIME_CMD 0x28 213 #define IPMI_SET_SDR_REPOSITORY_TIME_CMD 0x29 214 #define IPMI_ENTER_SDR_REPOSITORY_UPDATE_CMD 0x2a 215 #define IPMI_EXIT_SDR_REPOSITORY_UPDATE_CMD 0x2b 216 #define IPMI_RUN_INITIALIZATION_AGENT_CMD 0x2c 217 218 #define IPMI_GET_SEL_INFO_CMD 0x40 219 #define IPMI_GET_SEL_ALLOCATION_INFO_CMD 0x41 220 #define IPMI_RESERVE_SEL_CMD 0x42 221 #define IPMI_GET_SEL_ENTRY_CMD 0x43 222 #define IPMI_ADD_SEL_ENTRY_CMD 0x44 223 #define IPMI_PARTIAL_ADD_SEL_ENTRY_CMD 0x45 224 #define IPMI_DELETE_SEL_ENTRY_CMD 0x46 225 #define IPMI_CLEAR_SEL_CMD 0x47 226 #define IPMI_GET_SEL_TIME_CMD 0x48 227 #define IPMI_SET_SEL_TIME_CMD 0x49 228 #define IPMI_GET_AUXILIARY_LOG_STATUS_CMD 0x5a 229 #define IPMI_SET_AUXILIARY_LOG_STATUS_CMD 0x5b 230 231 /* Transport netfn (0x0c) */ 232 #define IPMI_SET_LAN_CONFIG_PARMS_CMD 0x01 233 #define IPMI_GET_LAN_CONFIG_PARMS_CMD 0x02 234 #define IPMI_SUSPEND_BMC_ARPS_CMD 0x03 235 #define IPMI_GET_IP_UDP_RMCP_STATS_CMD 0x04 236 237 #define IPMI_SET_SERIAL_MODEM_CONFIG_CMD 0x10 238 #define IPMI_GET_SERIAL_MODEM_CONFIG_CMD 0x11 239 #define IPMI_SET_SERIAL_MODEM_MUX_CMD 0x12 240 #define IPMI_GET_TAP_RESPONSE_CODES_CMD 0x13 241 #define IPMI_SET_PPP_UDP_PROXY_XMIT_DATA_CMD 0x14 242 #define IPMI_GET_PPP_UDP_PROXY_XMIT_DATA_CMD 0x15 243 #define IPMI_SEND_PPP_UDP_PROXY_PACKET_CMD 0x16 244 #define IPMI_GET_PPP_UDP_PROXY_RECV_DATA_CMD 0x17 245 #define IPMI_SERIAL_MODEM_CONN_ACTIVE_CMD 0x18 246 #define IPMI_CALLBACK_CMD 0x19 247 #define IPMI_SET_USER_CALLBACK_OPTIONS_CMD 0x1a 248 #define IPMI_GET_USER_CALLBACK_OPTIONS_CMD 0x1b 249 250 #define IPMI_SOL_ACTIVATING_CMD 0x20 251 #define IPMI_SET_SOL_CONFIGURATION_PARAMETERS 0x21 252 #define IPMI_GET_SOL_CONFIGURATION_PARAMETERS 0x22 253 254 /* 255 * NetFNs 256 */ 257 #define IPMI_CHASSIS_NETFN 0x00 258 #define IPMI_BRIDGE_NETFN 0x02 259 #define IPMI_SENSOR_EVENT_NETFN 0x04 260 #define IPMI_APP_NETFN 0x06 261 #define IPMI_FIRMWARE_NETFN 0x08 262 #define IPMI_STORAGE_NETFN 0x0a 263 #define IPMI_TRANSPORT_NETFN 0x0c 264 #define IPMI_GROUP_EXTENSION_NETFN 0x2c 265 #define IPMI_OEM_GROUP_NETFN 0x2e 266 267 #ifdef __cplusplus 268 extern "C" { 269 #endif 270 271 /* Convert a netfn into a string. You must pass a buffer in (32 272 bytes is good) and the buffer length. The string will be stored in 273 that buffer and also returned. */ 274 char *ipmi_get_netfn_string(unsigned int netfn, 275 char *buffer, 276 unsigned int buf_len); 277 278 /* Convert a netfn/cmd into a string. You must pass a buffer in (32 279 bytes is good) and the buffer length. The string will be stored in 280 that buffer and also returned. */ 281 char *ipmi_get_command_string(unsigned int netfn, 282 unsigned int cmd, 283 char *buffer, 284 unsigned int buf_len); 285 286 #ifdef __cplusplus 287 } 288 #endif 289 290 #endif /* OPENIPMI_MSGBITS_H */ 291