diff --git a/source/freeipmi/install/doinst.sh b/source/freeipmi/install/doinst.sh
new file mode 100644
index 00000000..9bc9f4ca
--- /dev/null
+++ b/source/freeipmi/install/doinst.sh
@@ -0,0 +1,50 @@
+# Update the /usr/info/dir info-database, so that we will see the new
+# "gmp" item in info root structure, if we type "info".
+ErrCount=0
+
+function echo_exit {
+ ((ErrCount += $1))
+ if [ $1 -eq 0 ]; then
+ echo -n "$2 "
+ else
+ echo -n $3
+ fi
+}
+
+if [ -x /usr/bin/install-info ] ; then
+ echo -n "Installing info page... "
+ install-info --info-dir=/usr/info /usr/info/freeipmi-faq.info.gz 2>/dev/null
+ echo_exit $ErrCount "DONE" "FAILURE"
+ echo
+else
+ echo "WARNING: Info pages cannot be installed!"
+fi
+
+( cd usr/sbin ; rm -rf rmcp-ping )
+( cd usr/sbin ; ln -sf /usr/sbin/rmcpping rmcp-ping )
+( cd usr/sbin ; rm -rf ipmi-power )
+( cd usr/sbin ; ln -sf /usr/sbin/ipmipower ipmi-power )
+( cd usr/sbin ; rm -rf ipmi-ping )
+( cd usr/sbin ; ln -sf /usr/sbin/ipmiping ipmi-ping )
+( cd usr/sbin ; rm -rf ipmi-detect )
+( cd usr/sbin ; ln -sf /usr/sbin/ipmidetect ipmi-detect )
+( cd usr/sbin ; rm -rf ipmi-console )
+( cd usr/sbin ; ln -sf /usr/sbin/ipmiconsole ipmi-console )
+( cd usr/sbin ; rm -rf pef-config )
+( cd usr/sbin ; ln -sf /usr/sbin/ipmi-pef-config pef-config )
+( cd usr/lib ; rm -rf libipmidetect.so )
+( cd usr/lib ; ln -sf libipmidetect.so.0.0.0 libipmidetect.so )
+( cd usr/lib ; rm -rf libipmidetect.so.0 )
+( cd usr/lib ; ln -sf libipmidetect.so.0.0.0 libipmidetect.so.0 )
+( cd usr/lib ; rm -rf libipmimonitoring.so )
+( cd usr/lib ; ln -sf libipmimonitoring.so.5.0.6 libipmimonitoring.so )
+( cd usr/lib ; rm -rf libipmimonitoring.so.5 )
+( cd usr/lib ; ln -sf libipmimonitoring.so.5.0.6 libipmimonitoring.so.5 )
+( cd usr/lib ; rm -rf libipmiconsole.so )
+( cd usr/lib ; ln -sf libipmiconsole.so.2.3.2 libipmiconsole.so )
+( cd usr/lib ; rm -rf libipmiconsole.so.2 )
+( cd usr/lib ; ln -sf libipmiconsole.so.2.3.2 libipmiconsole.so.2 )
+( cd usr/lib ; rm -rf libfreeipmi.so )
+( cd usr/lib ; ln -sf libfreeipmi.so.17.0.0 libfreeipmi.so )
+( cd usr/lib ; rm -rf libfreeipmi.so.17 )
+( cd usr/lib ; ln -sf libfreeipmi.so.17.0.0 libfreeipmi.so.17 )
diff --git a/source/freeipmi/install/slack-desc b/source/freeipmi/install/slack-desc
new file mode 100644
index 00000000..9de3c2db
--- /dev/null
+++ b/source/freeipmi/install/slack-desc
@@ -0,0 +1,14 @@
+freeipmi: FreeIPMI (GNU implementation of the IPMI protocol)
+freeipmi:
+freeipmi: FreeIPMI provides in-band and out-of-band IPMI software based on
+freeipmi: the IPMI v1.5/2.0 specification. The IPMI specification defines a
+freeipmi: set of interfaces for platform management and is implemented by a
+freeipmi: number vendors for system management. The features of IPMI that
+freeipmi: most users will be interested in are sensor monitoring, system event
+freeipmi: monitoring, power control, and serial-over-LAN (SOL). The FreeIPMI
+freeipmi: tools and libraries provide users with the ability to access and
+freeipmi: utilize these and many other features. A number of useful features
+freeipmi: for large HPC or cluster environments have also been implemented
+freeipmi: into FreeIPMI.
+freeipmi:
+freeipmi: Packaged by Derek Macias
diff --git a/source/freeipmi/install/slack-required b/source/freeipmi/install/slack-required
new file mode 100644
index 00000000..c8afc2e5
--- /dev/null
+++ b/source/freeipmi/install/slack-required
@@ -0,0 +1,3 @@
+glibc-solibs >= 2.17
+libgcrypt >= 1.6.5
+libgpg-error >= 1.21
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-api.h
new file mode 100644
index 00000000..cf533542
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-api.h
@@ -0,0 +1,375 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_API_H
+#define IPMI_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/* ERROR CODE NOTES
+ *
+ * IPMI_ERR_BMC_BUSY vs IPMI_ERR_DRIVER_BUSY
+ *
+ * BMC_BUSY indicates the BMC cannot handle more requests, it is an
+ * error typically from a completion code returned from the BMC. The
+ * DRIVER_BUSY error indicates a driver is too busy to handle
+ * additional requests, the error does not come from the BMC.
+ *
+ * IPMI_ERR_MESSAGE_TIMEOUT
+ *
+ * message timeout is typical of bridging commands. The
+ * session/connection has not timed out and is fine, but a
+ * bridging command could not get its bridged response back in a
+ * reasonable timeframe.
+ */
+
+/* IPMI COMPLETION CODE / RMCPPLUS CODE MAPPING
+ *
+ * For most users, the high level error codes listed below will
+ * suffice. However, for those who want/need to see deeper IPMI
+ * completion code or RMCPPlus errors, the following are mappings of
+ * IPMI completion codes and RMCPPlus codes to their respective error
+ * codes.
+ *
+ * Not that other factors outside of completion codes/RMCPPlus codes
+ * could also lead to these IPMI errors. For example, depending on
+ * motherboard support of username types, a IPMI_ERR_USERNAME_INVALID
+ * could be returned even though no IPMI error occurred. In addition,
+ * completion codes/RMCPPlus codes could map to different error codes,
+ * depending on when the error occurred (such as during session
+ * authentication vs. after authentication).
+ *
+ * (*) - Completion code is specific to an IPMI command
+ *
+ * IPMI_ERR_USERNAME_INVALID
+ * - IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME (*)
+ * - IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED (*)
+ *
+ * IPMI_ERR_PASSWORD_INVALID
+ * - RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE
+ *
+ * IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT
+ * - IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL
+ *
+ * IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED
+ * - IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL (*)
+ * - IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL
+ * - IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER (*)
+ * - IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT (*)
+ * - RMCPPLUS_STATUS_INVALID_ROLE
+ * - RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED
+ *
+ * IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE
+ * - RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS
+ *
+ * IPMI_ERR_MESSAGE_TIMEOUT
+ * - IPMI_COMP_CODE_COMMAND_TIMEOUT
+ *
+ * IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED
+ * - IPMI_COMP_CODE_INVALID_COMMAND
+ * - IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN
+ * - IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID
+ * - IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED
+ * - IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE
+ * - IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST
+ *
+ * IPMI_ERR_BMC_BUSY
+ * - IPMI_COMP_CODE_NODE_BUSY
+ * - IPMI_COMP_CODE_OUT_OF_SPACE
+ * - IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE
+ * - IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE
+ * - IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS
+ *
+ * All other IPMI completion codes will map to IPMI_ERR_BAD_COMPLETION_CODE.
+ * All other RMCPPlus codes will map to IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE.
+ */
+
+enum ipmi_errnum
+ {
+ IPMI_ERR_SUCCESS = 0,
+ IPMI_ERR_CTX_NULL = 1,
+ IPMI_ERR_CTX_INVALID = 2,
+ IPMI_ERR_PERMISSION = 3,
+ IPMI_ERR_USERNAME_INVALID = 4,
+ IPMI_ERR_PASSWORD_INVALID = 5,
+ IPMI_ERR_K_G_INVALID = 6,
+ IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT = 7,
+ IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED = 8,
+ IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE = 9,
+ IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE = 10,
+ IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT = 11,
+ IPMI_ERR_IPMI_2_0_UNAVAILABLE = 12,
+ IPMI_ERR_CONNECTION_TIMEOUT = 13,
+ IPMI_ERR_SESSION_TIMEOUT = 14,
+ IPMI_ERR_DEVICE_ALREADY_OPEN = 15,
+ IPMI_ERR_DEVICE_NOT_OPEN = 16,
+ IPMI_ERR_DEVICE_NOT_SUPPORTED = 17,
+ IPMI_ERR_DEVICE_NOT_FOUND = 18,
+ IPMI_ERR_DRIVER_BUSY = 19,
+ IPMI_ERR_DRIVER_TIMEOUT = 20,
+ IPMI_ERR_MESSAGE_TIMEOUT = 21,
+ IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE = 22,
+ IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED = 23,
+ IPMI_ERR_BAD_COMPLETION_CODE = 24,
+ IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE = 25,
+ IPMI_ERR_NOT_FOUND = 26,
+ IPMI_ERR_BMC_BUSY = 27,
+ IPMI_ERR_OUT_OF_MEMORY = 28,
+ IPMI_ERR_HOSTNAME_INVALID = 29,
+ IPMI_ERR_PARAMETERS = 30,
+ IPMI_ERR_DRIVER_PATH_REQUIRED = 31,
+ IPMI_ERR_IPMI_ERROR = 32,
+ IPMI_ERR_SYSTEM_ERROR = 33,
+ IPMI_ERR_INTERNAL_ERROR = 34,
+ IPMI_ERR_ERRNUMRANGE = 35,
+ };
+typedef enum ipmi_errnum ipmi_errnum_type_t;
+
+enum ipmi_driver_type
+{
+ IPMI_DEVICE_UNKNOWN = 0,
+ IPMI_DEVICE_LAN = 1,
+ IPMI_DEVICE_LAN_2_0 = 2,
+ IPMI_DEVICE_KCS = 3,
+ IPMI_DEVICE_SMIC = 4,
+ IPMI_DEVICE_BT = 5,
+ IPMI_DEVICE_SSIF = 6,
+ IPMI_DEVICE_OPENIPMI = 7,
+ IPMI_DEVICE_SUNBMC = 8,
+ IPMI_DEVICE_INTELDCMI = 9,
+};
+typedef enum ipmi_driver_type ipmi_driver_type_t;
+
+#define IPMI_SESSION_TIMEOUT_DEFAULT 20000
+#define IPMI_RETRANSMISSION_TIMEOUT_DEFAULT 1000
+
+#define IPMI_WORKAROUND_FLAGS_DEFAULT 0x00000000
+
+/* For use w/ ipmi_ctx_open_outofband() */
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES 0x00000001
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO 0x00000002
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION 0x00000004
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE 0x00000008
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER 0x00000010
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK 0x00000020
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK 0x00000040
+
+/* For use w/ ipmi_ctx_open_outofband_2_0() */
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES 0x00000001
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION 0x00000002
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION 0x00000004
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION 0x00000008
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE 0x00000010
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE 0x00000020
+#define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK 0x00000040
+
+/* For use w/ ipmi_ctx_open_inband() or ipmi_ctx_find_inband() */
+#define IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS 0x00000001
+#define IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL 0x00000002
+
+/* NONBLOCKING - for inband only, do no block if device busy.
+ *
+ * NOSESSION - for outofband only, do not create an IPMI session.
+ * Useful for the few IPMI payloads that do not require a session for
+ * an IPMI command to be sent (e.g. Get Channel Authentication
+ * Capabilities, Get System GUID, PET Acknowledge). Can only be set
+ * during opening, not later using ipmi_ctx_set_flags(). If set, you
+ * cannot call most IPMI payload functions, only those few that send
+ * data without a session.
+ *
+ * DEBUG_DUMP - for all interfaces
+ *
+ * NO_VALID_CHECK - do not check if IPMI response payloads are valid
+ * (i.e. all required fields set). Useful to workaround non-compliant
+ * motherboards. For example, if an IPMI payload did not return a
+ * required flag in the payload, an error would be returned. The
+ * error might possibly be a session timeout, as no valid response
+ * packet was ever received. This flag would skip the checks for
+ * valid fields and return the packet to the user.
+ *
+ * NO_LEGAL_CHECK - do no check if IPMI response payloads have
+ * sufficient data (i.e. completion code fields) to be legal. Useful
+ * to work around non-compliant motherboards. This flag is ignores
+ * the legality of IPMI payloads greater than the NO_VALID_CHECK
+ * option. For example, NO_VALID_CHECK would still return an error if
+ * an IPMI payload did not return a completion code in an IPMI
+ * response. The NO_LEGAL_CHECK would return such a packet to the
+ * user without an error. If the payload did not return a completion
+ * code, the completion code will not be checked for.
+ *
+ * IGNORE_AUTHENTICATION_CODE - for IPMI 1.5 packets, do not check the
+ * authentication code on response packets. Useful to workaround
+ * around non-compliant motherboards implementing invalid code/hashes.
+ * Note that this is different than
+ * IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK above. With the
+ * workaround flag, all authentication codes will be ignored during
+ * the entire IPMI session. With this flag, specific packets can have
+ * their authentication codes ignored.
+ */
+
+#define IPMI_FLAGS_DEFAULT 0x00000000
+#define IPMI_FLAGS_NONBLOCKING 0x00000001
+#define IPMI_FLAGS_NOSESSION 0x00000002
+#define IPMI_FLAGS_DEBUG_DUMP 0x00000010
+#define IPMI_FLAGS_NO_VALID_CHECK 0x00000100
+#define IPMI_FLAGS_NO_LEGAL_CHECK 0x00000200
+#define IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE 0x00000400
+
+typedef struct ipmi_ctx *ipmi_ctx_t;
+
+ipmi_ctx_t ipmi_ctx_create (void);
+
+int ipmi_ctx_errnum (ipmi_ctx_t ctx);
+
+char *ipmi_ctx_strerror (int errnum);
+
+char *ipmi_ctx_errormsg (ipmi_ctx_t ctx);
+
+int ipmi_ctx_get_flags (ipmi_ctx_t ctx, unsigned int *flags);
+
+/* for changing flags mid-operation for corner cases */
+int ipmi_ctx_set_flags (ipmi_ctx_t ctx, unsigned int flags);
+
+/* For IPMI 1.5 sessions */
+/* For session_timeout and retransmission_timeout, specify 0 for default */
+int ipmi_ctx_open_outofband (ipmi_ctx_t ctx,
+ const char *hostname,
+ const char *username,
+ const char *password,
+ uint8_t authentication_type,
+ uint8_t privilege_level,
+ unsigned int session_timeout,
+ unsigned int retransmission_timeout,
+ unsigned int workaround_flags,
+ unsigned int flags);
+
+/* For IPMI 2.0 sessions */
+/* For session_timeout and retransmission_timeout, specify 0 for default */
+int ipmi_ctx_open_outofband_2_0 (ipmi_ctx_t ctx,
+ const char *hostname,
+ const char *username,
+ const char *password,
+ const unsigned char *k_g,
+ unsigned int k_g_len,
+ uint8_t privilege_level,
+ uint8_t cipher_suite_id,
+ unsigned int session_timeout,
+ unsigned int retransmission_timeout,
+ unsigned int workaround_flags,
+ unsigned int flags);
+
+/* For inband sessions */
+int ipmi_ctx_open_inband (ipmi_ctx_t ctx,
+ ipmi_driver_type_t driver_type,
+ int disable_auto_probe,
+ uint16_t driver_address,
+ uint8_t register_spacing,
+ const char *driver_device,
+ unsigned int workaround_flags,
+ unsigned int flags);
+
+/* like ipmi_ctx_open_inband, but finds probes/discovers an inband device */
+/* returns 1 on driver found, 0 on not found, -1 on error */
+/* if specified, driver type returned in 'driver_type' */
+int ipmi_ctx_find_inband (ipmi_ctx_t ctx,
+ ipmi_driver_type_t *driver_type,
+ int disable_auto_probe,
+ uint16_t driver_address,
+ uint8_t register_spacing,
+ const char *driver_device,
+ unsigned int workaround_flags,
+ unsigned int flags);
+
+/* Set target channel and slave address so all ipmi_cmd() calls and
+ * library API calls use ipmb.
+ *
+ * To set only one parameter, pass in NULL for the other parameter.
+ * When only one parameter is passed, the other will be the default
+ * target channel of IPMI_CHANNEL_NUMBER_PRIMARY_IPMB (0x0) or the
+ * default rs_addr of IPMI_SLAVE_ADDRESS_BMC (0x20).
+ *
+ * To reset to defaults, pass in NULL for both parameters.
+ *
+ * Can only be called after device opened.
+ */
+int ipmi_ctx_set_target (ipmi_ctx_t ctx,
+ uint8_t *channel_number,
+ uint8_t *rs_addr);
+
+int ipmi_ctx_get_target (ipmi_ctx_t ctx,
+ uint8_t *channel_number,
+ uint8_t *rs_addr);
+
+int ipmi_cmd (ipmi_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+/* convenience function to perform a single bridged IPMI command.
+ * Will effectively call ipmi_ctx_set_target(), then ipmi_cmd(), then
+ * will set targets back to prior originals.
+ */
+int ipmi_cmd_ipmb (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t rs_addr,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+/* for request/response, byte #1 = cmd */
+/* for response, byte #2 (typically) = completion code */
+/* returns length written into buf_fs on success, -1 on error */
+int ipmi_cmd_raw (ipmi_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ const void *buf_rq,
+ unsigned int buf_rq_len,
+ void *buf_rs,
+ unsigned int buf_rs_len);
+
+/* convenience function to perform a single bridged IPMI raw command.
+ * Will effectively call ipmi_ctx_set_target(), then ipmi_cmd_raw(),
+ * then will set targets back to prior originals.
+ */
+int ipmi_cmd_raw_ipmb (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t rs_addr,
+ uint8_t lun,
+ uint8_t net_fn,
+ const void *buf_rq,
+ unsigned int buf_rq_len,
+ void *buf_rs,
+ unsigned int buf_rs_len);
+
+int ipmi_ctx_close (ipmi_ctx_t ctx);
+
+void ipmi_ctx_destroy (ipmi_ctx_t ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-chassis-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-chassis-cmds-api.h
new file mode 100644
index 00000000..df1224d0
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-chassis-cmds-api.h
@@ -0,0 +1,189 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_CHASSIS_CMDS_API_H
+#define IPMI_CHASSIS_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_chassis_capabilities (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_chassis_status (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_chassis_control (ipmi_ctx_t ctx,
+ uint8_t chassis_control,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_chassis_identify (ipmi_ctx_t ctx,
+ const uint8_t *identify_interval,
+ const uint8_t *force_identify,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_front_panel_enables (ipmi_ctx_t ctx,
+ uint8_t disable_power_off_button_for_power_off_only,
+ uint8_t disable_reset_button,
+ uint8_t disable_diagnostic_interrupt_button,
+ uint8_t disable_standby_button_for_entering_standby,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_power_restore_policy (ipmi_ctx_t ctx,
+ uint8_t power_restore_policy,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_power_cycle_interval (ipmi_ctx_t ctx,
+ uint8_t interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_restart_cause (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ uint8_t parameter_valid,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ uint8_t dont_clear_on_power_up,
+ uint8_t dont_clear_on_pushbutton_reset_soft_reset,
+ uint8_t dont_clear_on_watchdog_timeout,
+ uint8_t dont_clear_on_chassis_control,
+ uint8_t dont_clear_on_PEF,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ const uint8_t *bios_or_post_handled_boot_info,
+ const uint8_t *os_loader_handled_boot_info,
+ const uint8_t *os_or_service_partition_handled_boot_info,
+ const uint8_t *sms_handled_boot_info,
+ const uint8_t *oem_handled_boot_info,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_boot_flags (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ uint8_t bios_boot_type,
+ uint8_t boot_flags_persistent,
+ uint8_t boot_flags_valid,
+ uint8_t lock_out_reset_button,
+ uint8_t screen_blank,
+ uint8_t boot_device,
+ uint8_t lock_keyboard,
+ uint8_t cmos_clear,
+ uint8_t console_redirection,
+ uint8_t lock_out_sleep_button,
+ uint8_t user_password_bypass,
+ uint8_t force_progress_event_traps,
+ uint8_t firmware_bios_verbosity,
+ uint8_t lock_out_via_power_button,
+ uint8_t bios_mux_control_override,
+ uint8_t bios_shared_mode_override,
+ uint8_t device_instance_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ uint8_t boot_source_channel_number,
+ uint32_t session_id,
+ uint32_t boot_info_timestamp,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx,
+ uint8_t parameter_valid,
+ uint8_t set_selector,
+ const void *block_data,
+ unsigned int block_data_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_service_partition_selector (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_service_partition_scan (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_boot_flags (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_power_on_hours_counter (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_CHASSIS_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-dcmi-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-dcmi-cmds-api.h
new file mode 100644
index 00000000..7b4a0884
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-dcmi-cmds-api.h
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+/*****************************************************************************\
+ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC.
+ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ * Written by Albert Chu
+ * LLNL-CODE-413270
+ *
+ * This file is part of Ipmi-Dcmi, tools and libraries to support the
+ * data center manageability interface (DCMI). For details, see
+ * http://www.llnl.gov/linux/.
+ *
+ * Ipmi-Dcmi 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 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Ipmi-Dcmi 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 Ipmi-Dcmi. If not, see .
+\*****************************************************************************/
+
+#ifndef IPMI_DCMI_CMDS_API_H
+#define IPMI_DCMI_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t activate,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t option_12,
+ uint8_t option_60_with_option_43,
+ uint8_t random_back_off,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t initial_timeout_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint16_t server_contact_timeout_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint16_t server_contact_retry_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_asset_tag (ipmi_ctx_t ctx,
+ uint8_t offset_to_read,
+ uint8_t number_of_bytes_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_asset_tag (ipmi_ctx_t ctx,
+ uint8_t offset_to_write,
+ uint8_t number_of_bytes_to_write,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_management_controller_identifier_string (ipmi_ctx_t ctx,
+ uint8_t offset_to_read,
+ uint8_t number_of_bytes_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_management_controller_identifier_string (ipmi_ctx_t ctx,
+ uint8_t offset_to_write,
+ uint8_t number_of_bytes_to_write,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_dcmi_sensor_info (ipmi_ctx_t ctx,
+ uint8_t sensor_type,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t entity_instance_start,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_power_reading (ipmi_ctx_t ctx,
+ uint8_t mode,
+ uint8_t mode_attributes,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_power_limit (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_power_limit (ipmi_ctx_t ctx,
+ uint8_t exception_actions,
+ uint16_t power_limit_requested,
+ uint32_t correction_time_limit,
+ uint16_t management_application_statistics_sampling_period,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_activate_deactivate_power_limit (ipmi_ctx_t ctx,
+ uint8_t power_limit_activation,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_thermal_limit (ipmi_ctx_t ctx,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_set_thermal_limit (ipmi_ctx_t ctx,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t temperature_limit,
+ uint8_t exception_actions_log_event_to_sel_only,
+ uint8_t exception_actions_hard_power_off_system_and_log_event,
+ uint16_t exception_time,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_dcmi_get_temperature_reading (ipmi_ctx_t ctx,
+ uint8_t sensor_type,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t entity_instance_start,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_DCMI_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-device-global-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-device-global-cmds-api.h
new file mode 100644
index 00000000..cf5b22d2
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-device-global-cmds-api.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_DEVICE_GLOBAL_CMDS_API_H
+#define IPMI_DEVICE_GLOBAL_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_device_id (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_cold_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_warm_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_acpi_power_state (ipmi_ctx_t ctx,
+ 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_rs);
+
+int ipmi_cmd_get_acpi_power_state (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_self_test_results (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_device_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_DEVICE_GLOBAL_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-event-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-event-cmds-api.h
new file mode 100644
index 00000000..e47888e5
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-event-cmds-api.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_EVENT_CMDS_API_H
+#define IPMI_EVENT_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_event_receiver (ipmi_ctx_t ctx,
+ uint8_t event_receiver_slave_address,
+ uint8_t event_receiver_lun,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_event_receiver_ipmb (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t slave_address,
+ uint8_t event_receiver_slave_address,
+ uint8_t event_receiver_lun,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_event_receiver (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+/* generator_id is optional */
+int ipmi_cmd_platform_event (ipmi_ctx_t ctx,
+ uint8_t *generator_id,
+ uint8_t event_message_format_version,
+ uint8_t sensor_type,
+ uint8_t sensor_number,
+ uint8_t event_type_code,
+ uint8_t event_dir,
+ uint8_t event_data1,
+ uint8_t event_data2,
+ uint8_t event_data3,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_EVENT_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h
new file mode 100644
index 00000000..a828818e
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_netfn_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_command_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_command_sub_function_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_configurable_commands (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_configurable_command_sub_functions (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_command_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint8_t *enable_disable_bitmask,
+ unsigned int enable_disable_bitmask_len,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_command_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_command_sub_function_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_command_sub_function_enables_defining_body_code (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint8_t defining_body_code,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_command_sub_function_enables_oem_iana (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t oem_iana,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_command_sub_function_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_oem_netfn_iana_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t list_index,
+ fiid_obj_t obj_cmd_rs);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-fru-inventory-device-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-fru-inventory-device-cmds-api.h
new file mode 100644
index 00000000..baec66a8
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-fru-inventory-device-cmds-api.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+/*****************************************************************************\
+ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.
+ * Copyright (C) 2007 The Regents of the University of California.
+ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ * Written by Albert Chu
+ * UCRL-CODE-232183
+ *
+ * This file is part of Ipmi-fru, a tool used for retrieving
+ * motherboard field replaceable unit (FRU) information. For details,
+ * see http://www.llnl.gov/linux/.
+ *
+ * Ipmi-fru 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 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Ipmi-fru 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 Ipmi-fru. If not, see .
+\*****************************************************************************/
+
+#ifndef IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H
+#define IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_fru_inventory_area_info (ipmi_ctx_t ctx,
+ uint8_t fru_device_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_read_fru_data (ipmi_ctx_t ctx,
+ uint8_t fru_device_id,
+ uint16_t fru_inventory_offset_to_read,
+ uint8_t count_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-lan-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-lan-cmds-api.h
new file mode 100644
index 00000000..fe57ede6
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-lan-cmds-api.h
@@ -0,0 +1,415 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_LAN_CMDS_API_H
+#define IPMI_LAN_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_lan_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t callback_level_none,
+ uint8_t callback_level_md2,
+ uint8_t callback_level_md5,
+ uint8_t callback_level_straight_password,
+ uint8_t callback_level_oem_proprietary,
+ uint8_t user_level_none,
+ uint8_t user_level_md2,
+ uint8_t user_level_md5,
+ uint8_t user_level_straight_password,
+ uint8_t user_level_oem_proprietary,
+ uint8_t operator_level_none,
+ uint8_t operator_level_md2,
+ uint8_t operator_level_md5,
+ uint8_t operator_level_straight_password,
+ uint8_t operator_level_oem_proprietary,
+ uint8_t admin_level_none,
+ uint8_t admin_level_md2,
+ uint8_t admin_level_md5,
+ uint8_t admin_level_straight_password,
+ uint8_t admin_level_oem_proprietary,
+ uint8_t oem_level_none,
+ uint8_t oem_level_md2,
+ uint8_t oem_level_md5,
+ uint8_t oem_level_straight_password,
+ uint8_t oem_level_oem_proprietary,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t ip_address_source,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint32_t subnet_mask,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t time_to_live,
+ uint8_t flags,
+ uint8_t type_of_service,
+ uint8_t precedence,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint16_t primary_rmcp_port_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint16_t secondary_rmcp_port_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t bmc_generated_gratuitous_arps,
+ uint8_t bmc_generated_arp_responses,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t gratuitous_arp_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_community_string (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ const char *community_string,
+ unsigned int community_string_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t destination_type,
+ uint8_t alert_acknowledge,
+ uint8_t alert_acknowledge_timeout,
+ uint8_t retries,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t gateway_selector,
+ uint32_t alerting_ip_address,
+ uint64_t alerting_mac_address,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint16_t vlan_id,
+ uint8_t vlan_id_enable,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint32_t vlan_priority,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t maximum_privilege_for_cipher_suite_1,
+ uint8_t maximum_privilege_for_cipher_suite_2,
+ uint8_t maximum_privilege_for_cipher_suite_3,
+ uint8_t maximum_privilege_for_cipher_suite_4,
+ uint8_t maximum_privilege_for_cipher_suite_5,
+ uint8_t maximum_privilege_for_cipher_suite_6,
+ uint8_t maximum_privilege_for_cipher_suite_7,
+ uint8_t maximum_privilege_for_cipher_suite_8,
+ uint8_t maximum_privilege_for_cipher_suite_9,
+ uint8_t maximum_privilege_for_cipher_suite_10,
+ uint8_t maximum_privilege_for_cipher_suite_11,
+ uint8_t maximum_privilege_for_cipher_suite_12,
+ uint8_t maximum_privilege_for_cipher_suite_13,
+ uint8_t maximum_privilege_for_cipher_suite_14,
+ uint8_t maximum_privilege_for_cipher_suite_15,
+ uint8_t maximum_privilege_for_cipher_suite_16,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t user_disabled_event_message,
+ uint8_t bad_password_threshold_number,
+ uint16_t attempt_count_reset_interval,
+ uint16_t user_lockout_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_authentication_type_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_community_string (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_number_of_destinations (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_suspend_bmc_arps (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t gratuitous_arp_suspend,
+ uint8_t arp_response_suspend,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_ip_udp_rmcp_statistics (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t clear_all_statistics,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_LAN_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-messaging-support-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-messaging-support-cmds-api.h
new file mode 100644
index 00000000..cc434d92
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-messaging-support-cmds-api.h
@@ -0,0 +1,408 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_MESSAGING_SUPPORT_CMDS_API_H
+#define IPMI_MESSAGING_SUPPORT_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_bmc_global_enables (ipmi_ctx_t ctx,
+ uint8_t receive_message_queue_interrupt,
+ uint8_t event_message_buffer_full_interrupt,
+ uint8_t event_message_buffer,
+ uint8_t system_event_logging,
+ uint8_t oem_0,
+ uint8_t oem_1,
+ uint8_t oem_2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_bmc_global_enables (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_clear_message_flags (ipmi_ctx_t ctx,
+ uint8_t receive_message_queue,
+ uint8_t event_message_buffer,
+ uint8_t watchdog_pre_timeout_interrupt_flag,
+ uint8_t oem_0,
+ uint8_t oem_1,
+ uint8_t oem_2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_message_flags (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_enable_message_channel_receive (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t channel_operation,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_message (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_send_message (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t message_authentication,
+ uint8_t message_encryption,
+ uint8_t tracking_operation,
+ const void *message_data,
+ unsigned int message_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_read_event_message_buffer (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_interface_capabilities (ipmi_ctx_t ctx,
+ uint8_t system_interface,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_interface_capabilities_ssif (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_interface_capabilities_kcs (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_bt_interface_capabilities (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_master_write_read (ipmi_ctx_t ctx,
+ uint8_t bus_type,
+ uint8_t bus_id,
+ uint8_t channel_number,
+ uint8_t slave_address,
+ uint8_t read_count,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_channel_authentication_capabilities (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t maximum_privilege_level,
+ uint8_t get_ipmi_v20_extended_data,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_system_name (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_operating_system_name (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_bmc_url (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx,
+ uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_system_name (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_operating_system_name (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_bmc_url (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_session_challenge (ipmi_ctx_t ctx,
+ uint8_t authentication_type,
+ const char *user_name,
+ unsigned int user_name_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_activate_session (ipmi_ctx_t ctx,
+ uint8_t authentication_type,
+ uint8_t maximum_privilege_level,
+ const void *challenge_string,
+ unsigned int challenge_string_len,
+ uint32_t initial_outbound_sequence_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_session_privilege_level (ipmi_ctx_t ctx,
+ uint8_t privilege_level,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_close_session (ipmi_ctx_t ctx,
+ uint32_t session_id,
+ uint8_t *session_handle,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_channel_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t ipmi_messaging_access_mode,
+ uint8_t user_level_authentication,
+ uint8_t per_message_authentication,
+ uint8_t pef_alerting,
+ uint8_t channel_access_set,
+ uint8_t channel_privilege_level_limit,
+ uint8_t channel_privilege_level_limit_set,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_channel_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t channel_access_get,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_channel_info (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_channel_security_keys (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t operation,
+ uint8_t key_id,
+ const void *key_value,
+ unsigned int key_value_len,
+ fiid_obj_t obj_cmd_rq);
+
+int ipmi_cmd_set_user_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t user_ipmi_messaging,
+ uint8_t user_link_authentication,
+ uint8_t user_restricted_to_callback,
+ uint8_t change_bits_in_byte,
+ uint8_t user_id,
+ uint8_t user_privilege_level_limit,
+ uint8_t user_session_number_limit,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_user_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t user_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_user_name (ipmi_ctx_t ctx,
+ uint8_t user_id,
+ const char *user_name,
+ unsigned int user_name_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_user_name (ipmi_ctx_t ctx,
+ uint8_t user_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_user_password (ipmi_ctx_t ctx,
+ uint8_t user_id,
+ uint8_t password_size,
+ uint8_t operation,
+ const char *password,
+ unsigned int password_len,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_MESSAGING_SUPPORT_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h
new file mode 100644
index 00000000..bf3d4b7b
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h
@@ -0,0 +1,306 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H
+#define IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+/*******************************************
+ * Intel *
+ *******************************************/
+
+/*
+ * Intel Node Manager
+ *
+ * For Intel Chips, not just Intel Motherboards. Confirmed for:
+ *
+ * Intel S5500WB/Penguin Computing Relion 700
+ * Intel S2600JF/Appro 512X
+ * Intel S2600KP
+ * Intel S2600WT2
+ * Intel S2600WTT
+ * Inventec 5441/Dell Xanadu II
+ * Inventec 5442/Dell Xanadu III
+ * Quanta S99Q/Dell FS12-TY
+ * Quanta QSSC-S4R/Appro GB812X-CN
+ */
+
+int ipmi_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t policy_enable_disable,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_enabled,
+ uint8_t policy_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_configuration_action,
+ uint8_t aggressive_cpu_power_correction,
+ uint8_t policy_storage_option,
+ uint8_t policy_exception_actions_send_alert,
+ uint8_t policy_exception_actions_shutdown_system,
+ uint8_t policy_power_domain,
+ uint16_t policy_target_limit,
+ uint32_t correction_time_limit,
+ uint16_t policy_trigger_limit,
+ uint16_t statistics_reporting_period,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_enabled,
+ uint8_t policy_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_configuration_action,
+ uint8_t aggressive_cpu_power_correction,
+ uint8_t policy_storage_option,
+ uint8_t policy_exception_actions_send_alert,
+ uint8_t policy_exception_actions_shutdown_system,
+ uint8_t policy_power_domain,
+ uint8_t platform_booting_mode,
+ uint8_t cores_disabled,
+ uint32_t correction_time_limit,
+ uint16_t policy_trigger_limit,
+ uint16_t statistics_reporting_period,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ uint16_t *alert_threshold1,
+ uint16_t *alert_threshold2,
+ uint16_t *alert_threshold3,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ uint8_t *policy1_suspend_start_time,
+ uint8_t *policy1_suspend_stop_time,
+ uint8_t *policy1_suspend_period_recurrence_monday,
+ uint8_t *policy1_suspend_period_recurrence_tuesday,
+ uint8_t *policy1_suspend_period_recurrence_wednesday,
+ uint8_t *policy1_suspend_period_recurrence_thursday,
+ uint8_t *policy1_suspend_period_recurrence_friday,
+ uint8_t *policy1_suspend_period_recurrence_saturday,
+ uint8_t *policy1_suspend_period_recurrence_sunday,
+ uint8_t *policy2_suspend_start_time,
+ uint8_t *policy2_suspend_stop_time,
+ uint8_t *policy2_suspend_period_recurrence_monday,
+ uint8_t *policy2_suspend_period_recurrence_tuesday,
+ uint8_t *policy2_suspend_period_recurrence_wednesday,
+ uint8_t *policy2_suspend_period_recurrence_thursday,
+ uint8_t *policy2_suspend_period_recurrence_friday,
+ uint8_t *policy2_suspend_period_recurrence_saturday,
+ uint8_t *policy2_suspend_period_recurrence_sunday,
+ uint8_t *policy3_suspend_start_time,
+ uint8_t *policy3_suspend_stop_time,
+ uint8_t *policy3_suspend_period_recurrence_monday,
+ uint8_t *policy3_suspend_period_recurrence_tuesday,
+ uint8_t *policy3_suspend_period_recurrence_wednesday,
+ uint8_t *policy3_suspend_period_recurrence_thursday,
+ uint8_t *policy3_suspend_period_recurrence_friday,
+ uint8_t *policy3_suspend_period_recurrence_saturday,
+ uint8_t *policy3_suspend_period_recurrence_sunday,
+ uint8_t *policy4_suspend_start_time,
+ uint8_t *policy4_suspend_stop_time,
+ uint8_t *policy4_suspend_period_recurrence_monday,
+ uint8_t *policy4_suspend_period_recurrence_tuesday,
+ uint8_t *policy4_suspend_period_recurrence_wednesday,
+ uint8_t *policy4_suspend_period_recurrence_thursday,
+ uint8_t *policy4_suspend_period_recurrence_friday,
+ uint8_t *policy4_suspend_period_recurrence_saturday,
+ uint8_t *policy4_suspend_period_recurrence_sunday,
+ uint8_t *policy5_suspend_start_time,
+ uint8_t *policy5_suspend_stop_time,
+ uint8_t *policy5_suspend_period_recurrence_monday,
+ uint8_t *policy5_suspend_period_recurrence_tuesday,
+ uint8_t *policy5_suspend_period_recurrence_wednesday,
+ uint8_t *policy5_suspend_period_recurrence_thursday,
+ uint8_t *policy5_suspend_period_recurrence_friday,
+ uint8_t *policy5_suspend_period_recurrence_saturday,
+ uint8_t *policy5_suspend_period_recurrence_sunday,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_reset_node_manager_statistics (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t mode,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_statistics (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t mode,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_capabilities (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_type,
+ uint8_t policy_power_domain,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_version (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ uint16_t minimum_power_draw,
+ uint16_t maximum_power_draw,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t destination_information,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t slave_address,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t destination_selector,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_node_manager_alert_destination (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t cpu_socket_number,
+ uint8_t active_cores_configuration,
+ uint8_t turbo_ratio_limit,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t cpu_socket_number,
+ uint8_t active_cores_configuration,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_oem_intel_node_manager_get_limiting_policy_id (ipmi_ctx_t ctx,
+ uint8_t target_channel_number,
+ uint8_t target_slave_address,
+ uint8_t target_lun,
+ uint8_t domain_id,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-pef-and-alerting-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-pef-and-alerting-cmds-api.h
new file mode 100644
index 00000000..52b27e81
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-pef-and-alerting-cmds-api.h
@@ -0,0 +1,254 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_PEF_AND_ALERTING_CMDS_API_H
+#define IPMI_PEF_AND_ALERTING_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_pef_capabilities (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_arm_pef_postpone_timer (ipmi_ctx_t ctx,
+ uint8_t pef_postpone_timeout,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx,
+ uint8_t pef,
+ uint8_t pef_event_messages,
+ uint8_t pef_startup_delay,
+ uint8_t pef_alert_startup_delay,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx,
+ uint8_t alert_action,
+ uint8_t power_down_action,
+ uint8_t reset_action,
+ uint8_t power_cycle_action,
+ uint8_t oem_action,
+ uint8_t diagnostic_interrupt,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx,
+ uint8_t pef_startup_delay,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx,
+ uint8_t pef_alert_startup_delay,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx,
+ uint8_t filter_number,
+ uint8_t filter_configuration_type,
+ uint8_t filter_configuration_filter,
+ uint8_t event_filter_action_alert,
+ uint8_t event_filter_action_power_off,
+ uint8_t event_filter_action_reset,
+ uint8_t event_filter_action_power_cycle,
+ uint8_t event_filter_action_oem,
+ uint8_t event_filter_action_diagnostic_interrupt,
+ uint8_t event_filter_action_group_control_operation,
+ uint8_t alert_policy_number_policy_number,
+ uint8_t alert_policy_number_group_control_selector,
+ uint8_t event_severity,
+ uint8_t generator_id_byte1,
+ uint8_t generator_id_byte2,
+ uint8_t sensor_type,
+ uint8_t sensor_number,
+ uint8_t event_trigger,
+ uint16_t event_data1_offset_mask,
+ uint8_t event_data1_AND_mask,
+ uint8_t event_data1_compare1,
+ uint8_t event_data1_compare2,
+ uint8_t event_data2_AND_mask,
+ uint8_t event_data2_compare1,
+ uint8_t event_data2_compare2,
+ uint8_t event_data3_AND_mask,
+ uint8_t event_data3_compare1,
+ uint8_t event_data3_compare2,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx,
+ uint8_t filter_number,
+ uint8_t filter_configuration_type,
+ uint8_t filter_configuration_filter,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx,
+ uint8_t alert_policy_entry_number,
+ uint8_t policy_type,
+ uint8_t policy_enabled,
+ uint8_t policy_number,
+ uint8_t destination_selector,
+ uint8_t channel_number,
+ uint8_t alert_string_set_selector,
+ uint8_t event_specific_alert_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx,
+ uint8_t string_selector,
+ uint8_t filter_number,
+ uint8_t set_number_for_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_pef_configuration_parameters_alert_strings (ipmi_ctx_t ctx,
+ uint8_t string_selector,
+ uint8_t block_selector,
+ const uint8_t *string_data,
+ unsigned int string_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t parameter_selector,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_alert_string (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_last_processed_event_id (ipmi_ctx_t ctx,
+ uint8_t set_record_id_for_last_record,
+ uint16_t record_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_last_processed_event_id (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_alert_immediate (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t operation,
+ uint8_t string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_pet_acknowledge (ipmi_ctx_t ctx,
+ uint16_t sequence_number,
+ uint32_t local_timestamp,
+ uint8_t event_source_type,
+ uint8_t sensor_device,
+ uint8_t sensor_number,
+ uint32_t event_data,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_PEF_AND_ALERTING_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h
new file mode 100644
index 00000000..03414705
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H
+#define IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_user_payload_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t user_id,
+ uint8_t operation,
+ uint8_t standard_payload_1,
+ uint8_t standard_payload_2,
+ uint8_t standard_payload_3,
+ uint8_t standard_payload_4,
+ uint8_t standard_payload_5,
+ uint8_t standard_payload_6,
+ uint8_t standard_payload_7,
+ uint8_t oem_payload_0,
+ uint8_t oem_payload_1,
+ uint8_t oem_payload_2,
+ uint8_t oem_payload_3,
+ uint8_t oem_payload_4,
+ uint8_t oem_payload_5,
+ uint8_t oem_payload_6,
+ uint8_t oem_payload_7,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_user_payload_access (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t user_id,
+ fiid_obj_t obj_cmd_rs);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-sdr-repository-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-sdr-repository-cmds-api.h
new file mode 100644
index 00000000..cdf41c80
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-sdr-repository-cmds-api.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SDR_REPOSITORY_CMDS_API_H
+#define IPMI_SDR_REPOSITORY_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_sdr_repository_info (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sdr_repository_allocation_info (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_reserve_sdr_repository (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sdr (ipmi_ctx_t ctx,
+ uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sdr_repository_time (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sdr_repository_time (ipmi_ctx_t ctx,
+ uint32_t time,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SDR_REPOSITORY_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-sel-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-sel-cmds-api.h
new file mode 100644
index 00000000..46f30d18
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-sel-cmds-api.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SEL_CMDS_API_H
+#define IPMI_SEL_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_sel_info (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sel_allocation_info (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_reserve_sel (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sel_entry (ipmi_ctx_t ctx,
+ uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_delete_sel_entry (ipmi_ctx_t ctx,
+ uint16_t reservation_id,
+ uint16_t record_id,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_clear_sel (ipmi_ctx_t ctx,
+ uint16_t reservation_id,
+ uint8_t operation,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sel_time (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sel_time (ipmi_ctx_t ctx,
+ uint32_t time,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sel_time_utc_offset (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sel_time_utc_offset (ipmi_ctx_t ctx,
+ int16_t offset,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_auxiliary_log_status (ipmi_ctx_t ctx,
+ uint8_t log_type,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_auxiliary_log_status (ipmi_ctx_t ctx,
+ uint8_t log_type,
+ const void *log_data,
+ unsigned int log_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SEL_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-sensor-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-sensor-cmds-api.h
new file mode 100644
index 00000000..e8de9583
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-sensor-cmds-api.h
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SENSOR_CMDS_API_H
+#define IPMI_SENSOR_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_get_device_sdr_info (ipmi_ctx_t ctx,
+ uint8_t operation,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_device_sdr (ipmi_ctx_t ctx,
+ uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_reserve_device_sdr_repository (ipmi_ctx_t ctx,
+ fiid_obj_t obj_cmd_rs);
+
+/* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */
+int ipmi_cmd_set_sensor_hysteresis (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t hysteresis_mask,
+ uint8_t positive_going_threshold_hysteresis_value,
+ uint8_t negative_going_threshold_hysteresis_value,
+ fiid_obj_t obj_cmd_rs);
+
+/* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */
+int ipmi_cmd_get_sensor_hysteresis (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t hysteresis_mask,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sensor_thresholds (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ const uint8_t *lower_non_critical_threshold,
+ const uint8_t *lower_critical_threshold,
+ const uint8_t *lower_non_recoverable_threshold,
+ const uint8_t *upper_non_critical_threshold,
+ const uint8_t *upper_critical_threshold,
+ const uint8_t *upper_non_recoverable_threshold,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_thresholds (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sensor_event_enable (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint16_t assertion_event_bitmask,
+ uint16_t deassertion_event_bitmask,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sensor_event_enable_threshold (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint8_t assertion_event_lower_non_critical_going_low,
+ uint8_t assertion_event_lower_non_critical_going_high,
+ uint8_t assertion_event_lower_critical_going_low,
+ uint8_t assertion_event_lower_critical_going_high,
+ uint8_t assertion_event_lower_non_recoverable_going_low,
+ uint8_t assertion_event_lower_non_recoverable_going_high,
+ uint8_t assertion_event_upper_non_critical_going_low,
+ uint8_t assertion_event_upper_non_critical_going_high,
+ uint8_t assertion_event_upper_critical_going_low,
+ uint8_t assertion_event_upper_critical_going_high,
+ uint8_t assertion_event_upper_non_recoverable_going_low,
+ uint8_t assertion_event_upper_non_recoverable_going_high,
+ uint8_t deassertion_event_lower_non_critical_going_low,
+ uint8_t deassertion_event_lower_non_critical_going_high,
+ uint8_t deassertion_event_lower_critical_going_low,
+ uint8_t deassertion_event_lower_critical_going_high,
+ uint8_t deassertion_event_lower_non_recoverable_going_low,
+ uint8_t deassertion_event_lower_non_recoverable_going_high,
+ uint8_t deassertion_event_upper_non_critical_going_low,
+ uint8_t deassertion_event_upper_non_critical_going_high,
+ uint8_t deassertion_event_upper_critical_going_low,
+ uint8_t deassertion_event_upper_critical_going_high,
+ uint8_t deassertion_event_upper_non_recoverable_going_low,
+ uint8_t deassertion_event_upper_non_recoverable_going_high,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sensor_event_enable_discrete (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint8_t assertion_event_state_bit_0,
+ uint8_t assertion_event_state_bit_1,
+ uint8_t assertion_event_state_bit_2,
+ uint8_t assertion_event_state_bit_3,
+ uint8_t assertion_event_state_bit_4,
+ uint8_t assertion_event_state_bit_5,
+ uint8_t assertion_event_state_bit_6,
+ uint8_t assertion_event_state_bit_7,
+ uint8_t assertion_event_state_bit_8,
+ uint8_t assertion_event_state_bit_9,
+ uint8_t assertion_event_state_bit_10,
+ uint8_t assertion_event_state_bit_11,
+ uint8_t assertion_event_state_bit_12,
+ uint8_t assertion_event_state_bit_13,
+ uint8_t assertion_event_state_bit_14,
+ uint8_t deassertion_event_state_bit_0,
+ uint8_t deassertion_event_state_bit_1,
+ uint8_t deassertion_event_state_bit_2,
+ uint8_t deassertion_event_state_bit_3,
+ uint8_t deassertion_event_state_bit_4,
+ uint8_t deassertion_event_state_bit_5,
+ uint8_t deassertion_event_state_bit_6,
+ uint8_t deassertion_event_state_bit_7,
+ uint8_t deassertion_event_state_bit_8,
+ uint8_t deassertion_event_state_bit_9,
+ uint8_t deassertion_event_state_bit_10,
+ uint8_t deassertion_event_state_bit_11,
+ uint8_t deassertion_event_state_bit_12,
+ uint8_t deassertion_event_state_bit_13,
+ uint8_t deassertion_event_state_bit_14,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_event_enable (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_event_enable_threshold (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_event_enable_discrete (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_re_arm_sensor_events (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t re_arm_all_event_status_from_this_sensor,
+ uint16_t *re_arm_assertion_event,
+ uint16_t *re_arm_deassertion_event,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_re_arm_sensor_events_ipmb (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t slave_address,
+ uint8_t lun,
+ uint8_t sensor_number,
+ uint8_t re_arm_all_event_status_from_this_sensor,
+ uint16_t *re_arm_assertion_event,
+ uint16_t *re_arm_deassertion_event,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_reading (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_reading_ipmb (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t slave_address,
+ uint8_t lun,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_reading_threshold (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sensor_reading_discrete (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sensor_reading_and_event_status (ipmi_ctx_t ctx,
+ uint8_t sensor_number,
+ uint8_t sensor_reading_operation,
+ uint8_t deassertion_bits_operation,
+ uint8_t assertion_bits_operation,
+ uint8_t event_data_bytes_operation,
+ uint8_t sensor_reading,
+ uint16_t assertion_event_bitmask,
+ uint16_t deassertion_event_bitmask,
+ uint8_t event_data1,
+ uint8_t event_data2,
+ uint8_t event_data3,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SENSOR_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-serial-modem-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-serial-modem-cmds-api.h
new file mode 100644
index 00000000..f04e9cde
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-serial-modem-cmds-api.h
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SERIAL_MODEM_CMDS_API_H
+#define IPMI_SERIAL_MODEM_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_serial_modem_configuration (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t basic_mode,
+ uint8_t ppp_mode,
+ uint8_t terminal_mode,
+ uint8_t connect_mode,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t dtr_hangup,
+ uint8_t flow_control,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t page_blackout_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t call_retry_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_serial_modem_configuration (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+
+int ipmi_cmd_get_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SERIAL_MODEM_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/api/ipmi-sol-cmds-api.h b/source/freeipmi/usr/include/freeipmi/api/ipmi-sol-cmds-api.h
new file mode 100644
index 00000000..1a0bc876
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/api/ipmi-sol-cmds-api.h
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SOL_CMDS_API_H
+#define IPMI_SOL_CMDS_API_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+/*
+ * ipmi_cmd* functions return 0 on success, -1 on error.
+ *
+ * obj_cmd_rs must be for the function's respective fiid template
+ * response.
+ *
+ */
+
+int ipmi_cmd_set_sol_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t sol_enable,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t sol_privilege_level,
+ uint8_t force_sol_payload_authentication,
+ uint8_t force_sol_payload_encryption,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t character_accumulate_interval,
+ uint8_t character_send_threshold,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t retry_count,
+ uint8_t retry_interval,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_set_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint16_t port_number,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_payload_channel (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_cmd_get_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SOL_CMDS_API_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h
new file mode 100644
index 00000000..6d5d6d35
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h
@@ -0,0 +1,135 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_BMC_WATCHDOG_TIMER_CMDS_H
+#define IPMI_BMC_WATCHDOG_TIMER_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2 0x1
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST 0x2
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD 0x3
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS 0x4
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM 0x5
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2 \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE 0x0
+#define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_DISABLE 0x1
+
+#define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_DISABLE) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE 0x0
+#define IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE 0x1
+
+#define IPMI_BMC_WATCHDOG_TIMER_LOG_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION 0x0
+#define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET 0x1
+#define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN 0x2
+#define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE 0x3
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE 0x0
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI 0x1
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI 0x2
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT 0x3
+
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_CLEAR_TIMER_EXPIRATION_BIT 0x1
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_LEAVE_ALONE 0x0
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID(__x) \
+ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_CLEAR_TIMER_EXPIRATION_BIT \
+ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_LEAVE_ALONE) ? 1 : 0)
+
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_RUNNING 0x1
+#define IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_STOPPED 0x0
+
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MIN 0x00
+#define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MAX 0xFF
+
+#define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN 0x0000
+#define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX 0xFFFF
+
+#define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN_SECONDS IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN
+#define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX_SECONDS (IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX/10)
+
+/*
+ * 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_reset_watchdog_timer_rq;
+extern fiid_template_t tmpl_cmd_reset_watchdog_timer_rs;
+extern fiid_template_t tmpl_cmd_set_watchdog_timer_rq;
+extern fiid_template_t tmpl_cmd_set_watchdog_timer_rs;
+extern fiid_template_t tmpl_cmd_get_watchdog_timer_rq;
+extern fiid_template_t tmpl_cmd_get_watchdog_timer_rs;
+
+int fill_cmd_reset_watchdog_timer (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_watchdog_timer (uint8_t timer_use,
+ uint8_t stop_timer,
+ uint8_t log,
+ uint8_t timeout_action,
+ uint8_t pre_timeout_interrupt,
+ uint8_t pre_timeout_interval,
+ uint8_t timer_use_expiration_flag_bios_frb2,
+ uint8_t timer_use_expiration_flag_bios_post,
+ uint8_t timer_use_expiration_flag_os_load,
+ uint8_t timer_use_expiration_flag_sms_os,
+ uint8_t timer_use_expiration_flag_oem,
+ uint16_t initial_countdown_value,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_watchdog_timer (fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_BMC_WATCHDOG_TIMER_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-chassis-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-chassis-cmds.h
new file mode 100644
index 00000000..c0d7fa26
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-chassis-cmds.h
@@ -0,0 +1,410 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_CHASSIS_CMDS_H
+#define IPMI_CHASSIS_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_POWER_RESTORE_POLICY_POWERED_OFF_AFTER_AC_RETURNS 0x00
+#define IPMI_POWER_RESTORE_POLICY_POWER_RESTORED_TO_STATE 0x01
+#define IPMI_POWER_RESTORE_POLICY_POWERS_UP_AFTER_AC_RETURNS 0x02
+#define IPMI_POWER_RESTORE_POLICY_UNKNOWN 0x03
+
+#define IPMI_SYSTEM_POWER_IS_ON 1
+#define IPMI_SYSTEM_POWER_IS_OFF 0
+
+#define IPMI_LAST_POWER_EVENT_AC_FAILED 0x00
+#define IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_OVERLOAD 0x01
+#define IPMI_LAST_POWER_EVENT_POWER_DOWN_INTERLOCK_ACTIVATED 0x02
+#define IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_FAULT 0x03
+#define IPMI_LAST_POWER_EVENT_POWER_ON_VIA_IPMI 0x04
+#define IPMI_LAST_POWER_EVENT_UNKNOWN 0x05
+
+#define IPMI_CHASSIS_CONTROL_POWER_DOWN 0x00
+#define IPMI_CHASSIS_CONTROL_POWER_UP 0x01
+#define IPMI_CHASSIS_CONTROL_POWER_CYCLE 0x02
+#define IPMI_CHASSIS_CONTROL_HARD_RESET 0x03
+#define IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT 0x04
+#define IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN 0x05
+
+#define IPMI_CHASSIS_CONTROL_VALID(__chassis_control) \
+ (((__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_DOWN \
+ || (__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_UP \
+ || (__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_CYCLE \
+ || (__chassis_control) == IPMI_CHASSIS_CONTROL_HARD_RESET \
+ || (__chassis_control) == IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT \
+ || (__chassis_control) == IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN) ? 1 : 0)
+
+#define IPMI_CHASSIS_FORCE_IDENTIFY_OFF 0x00
+#define IPMI_CHASSIS_FORCE_IDENTIFY_ON 0x01
+
+#define IPMI_CHASSIS_FORCE_IDENTIFY_VALID(__force_identify) \
+ (((__force_identify) == IPMI_CHASSIS_FORCE_IDENTIFY_OFF \
+ || (__force_identify) == IPMI_CHASSIS_FORCE_IDENTIFY_ON) ? 1 : 0)
+
+#define IPMI_CHASSIS_IDENTIFY_STATE_OFF 0x00
+#define IPMI_CHASSIS_IDENTIFY_STATE_TEMPORARY_ON 0x01
+#define IPMI_CHASSIS_IDENTIFY_STATE_INDEFINITE_ON 0x02
+
+/* min is degenerate "off" case */
+#define IPMI_CHASSIS_IDENTIFY_INTERVAL_MIN 0x00
+#define IPMI_CHASSIS_IDENTIFY_INTERVAL_MAX 0xFF
+
+/* min is degenerate "no delay" case */
+#define IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MIN 0x00
+#define IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MAX 0xFF
+
+/* achu: it's backwards on buttons, I don't know why */
+#define IPMI_CHASSIS_BUTTON_ENABLE 0x00
+#define IPMI_CHASSIS_BUTTON_DISABLE 0x01
+
+#define IPMI_CHASSIS_BUTTON_VALID(__button) \
+ (((__button) == IPMI_CHASSIS_BUTTON_ENABLE \
+ || (__button) == IPMI_CHASSIS_BUTTON_DISABLE) ? 1 : 0)
+
+#define IPMI_CHASSIS_BUTTON_DISABLE_ALLOWED 0x1
+#define IPMI_CHASSIS_BUTTON_DISABLE_NOT_ALLOWED 0x0
+
+#define IPMI_POWER_RESTORE_POLICY_ALWAYS_STAY_POWERED_OFF 0x00
+#define IPMI_POWER_RESTORE_POLICY_RESTORE_POWER_TO_STATE_WHEN_AC_WAS_LOST 0x01
+#define IPMI_POWER_RESTORE_POLICY_ALWAYS_POWER_UP_AFTER_AC_IS_LOST 0x02
+#define IPMI_POWER_RESTORE_POLICY_NO_CHANGE 0x03
+
+#define IPMI_POWER_RESTORE_POLICY_VALID(__policy) \
+ (((__policy) == IPMI_POWER_RESTORE_POLICY_NO_CHANGE \
+ || (__policy) == IPMI_POWER_RESTORE_POLICY_ALWAYS_POWER_UP_AFTER_AC_IS_LOST \
+ || (__policy) == IPMI_POWER_RESTORE_POLICY_RESTORE_POWER_TO_STATE_WHEN_AC_WAS_LOST \
+ || (__policy) == IPMI_POWER_RESTORE_POLICY_ALWAYS_STAY_POWERED_OFF) ? 1 : 0)
+
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_UNKNOWN 0x00
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND 0x01
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PUSHBUTTON 0x02
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_POWER_PUSHBUTTON 0x03
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRATION 0x04
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_OEM 0x05
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_ALWAYS_RESTORE 0x06
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_RESTORE_PREVIOUS 0x07
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PEF 0x08
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_CYCLE_VIA_PEF 0x09
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_SOFT_RESET 0x0A
+#define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_RTC 0x0B
+
+#define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED 0x0
+#define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_INVALID_LOCKED 0x1
+
+#define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_INVALID_LOCKED) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTIONS_NO_SET_SELECTOR 0x0
+#define IPMI_SYSTEM_BOOT_OPTIONS_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_SYSTEM_BOOT_OPTION_SET_COMPLETE 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_SET_COMMIT_WRITE 0x02
+
+#define IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SET_COMPLETE \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_INVALID 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID 0x01
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID_FOR_NEXT_BOOT 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID_PERSISTENTLY 0x01
+
+/* achu: below is not a typo, IPMI spec orders it 0x09, 0x08, 0x0B, 0x0F */
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE 0x02
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE 0x03
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION 0x04
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD 0x05
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP 0x06
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA 0x07
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA 0x09
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD 0x08
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE 0x0B
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA 0x0F
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_VALID(__boot_device) \
+ (((__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE \
+ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_BIOS_SETTING IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE 0x02
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_VALID(__console_redirection) \
+ (((__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT \
+ || (__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS \
+ || (__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_NO 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_YES 0x01
+
+#define IPMI_SYSTEM_BOOT_OPTION_DISABLE 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_ENABLE 0x01
+
+#define IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTION_ENABLE \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_DISABLE) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI 0x01
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BIOS_BOOT_TYPE_VALID(__boot_type) \
+ (((__boot_type) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE \
+ || (__boot_type) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE 0x02
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VALID(__verbosity) \
+ (((__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT \
+ || (__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET \
+ || (__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNSPECIFIED 0x00
+
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED 0X01
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNDISCOVERED 0X00
+
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNDISCOVERED) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN 0X01
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DO_NOT_SCAN 0X00
+
+#define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DO_NOT_SCAN) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_ACKNOWLEDGE 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE 0x01
+
+#define IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT 0x00
+
+#define IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT \
+ || (__value) == IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_RECOMENDED_AT_END_OF_POST 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_BMC 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_SYSTEM 0x02
+
+#define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_BIOS_MUX_CONTROL_OVERRIDE_VALID(__bios_mux_control) \
+ (((__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_RECOMENDED_AT_END_OF_POST \
+ || (__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_BMC \
+ || (__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_SYSTEM) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MIN 0x00
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MAX 0x31
+
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MIN 0x01
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MAX 0x15
+
+/* To avoid gcc warnings, add +1 in comparison */
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_VALID(__value) \
+ ((((__value) + 1) >= (IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MIN + 1) \
+ && (__value) <= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MAX) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_VALID(__value) \
+ (((__value) >= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MIN \
+ && (__value) <= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MAX) ? 1 : 0)
+
+#define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_INTERNAL_BITMASK 0x10
+
+#define IPMI_SYSTEM_BOOT_OPTION_BLOCK_DATA_LEN_MAX 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_chassis_capabilities_rq;
+extern fiid_template_t tmpl_cmd_get_chassis_capabilities_rs;
+extern fiid_template_t tmpl_cmd_get_chassis_status_rq;
+extern fiid_template_t tmpl_cmd_get_chassis_status_rs;
+extern fiid_template_t tmpl_cmd_chassis_control_rq;
+extern fiid_template_t tmpl_cmd_chassis_control_rs;
+extern fiid_template_t tmpl_cmd_chassis_identify_rq;
+extern fiid_template_t tmpl_cmd_chassis_identify_rs;
+extern fiid_template_t tmpl_cmd_set_front_panel_enables_rq;
+extern fiid_template_t tmpl_cmd_set_front_panel_enables_rs;
+extern fiid_template_t tmpl_cmd_set_power_restore_policy_rq;
+extern fiid_template_t tmpl_cmd_set_power_restore_policy_rs;
+extern fiid_template_t tmpl_cmd_set_power_cycle_interval_rq;
+extern fiid_template_t tmpl_cmd_set_power_cycle_interval_rs;
+extern fiid_template_t tmpl_cmd_get_system_restart_cause_rq;
+extern fiid_template_t tmpl_cmd_get_system_restart_cause_rs;
+
+extern fiid_template_t tmpl_cmd_set_system_boot_options_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_rs;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_selector_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_scan_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_flags_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_info_rq;
+extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq;
+
+extern fiid_template_t tmpl_cmd_get_system_boot_options_rq;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_selector_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_scan_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_info_acknowledge_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_flags_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_info_rs;
+extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_mailbox_rs;
+
+extern fiid_template_t tmpl_cmd_get_power_on_hours_counter_rq;
+extern fiid_template_t tmpl_cmd_get_power_on_hours_counter_rs;
+
+int fill_cmd_get_chassis_capabilities (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_chassis_status (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_chassis_control (uint8_t chassis_control,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_chassis_identify (const uint8_t *identify_interval,
+ const uint8_t *force_identify,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_front_panel_enables (uint8_t disable_power_off_button_for_power_off_only,
+ uint8_t disable_reset_button,
+ uint8_t disable_diagnostic_interrupt_button,
+ uint8_t disable_standby_button_for_entering_standby,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_power_restore_policy (uint8_t power_restore_policy,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_power_cycle_interval (uint8_t interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_system_restart_cause (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options (uint8_t parameter_selector,
+ uint8_t parameter_valid,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_set_in_progress (uint8_t parameter_valid,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_service_partition_selector (uint8_t parameter_valid,
+ uint8_t service_partition_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_service_partition_scan (uint8_t parameter_valid,
+ uint8_t service_partition_discovered,
+ uint8_t service_partition_scan,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (uint8_t parameter_valid,
+ uint8_t dont_clear_on_power_up,
+ uint8_t dont_clear_on_pushbutton_or_soft_reset,
+ uint8_t dont_clear_on_watchdog_timeout,
+ uint8_t dont_clear_on_chassis_control,
+ uint8_t dont_clear_on_PEF,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_boot_info_acknowledge (uint8_t parameter_valid,
+ const uint8_t *bios_or_post_handled_boot_info,
+ const uint8_t *os_loader_handled_boot_info,
+ const uint8_t *os_or_service_partition_handled_boot_info,
+ const uint8_t *sms_handled_boot_info,
+ const uint8_t *oem_handled_boot_info,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_boot_flags (uint8_t parameter_valid,
+ uint8_t bios_boot_type,
+ uint8_t boot_flags_persistent,
+ uint8_t boot_flags_valid,
+ uint8_t lock_out_reset_button,
+ uint8_t screen_blank,
+ uint8_t boot_device,
+ uint8_t lock_keyboard,
+ uint8_t clear_cmos,
+ uint8_t console_redirection,
+ uint8_t lock_out_sleep_button,
+ uint8_t user_password_bypass,
+ uint8_t force_progress_event_traps,
+ uint8_t firmware_bios_verbosity,
+ uint8_t lock_out_via_power_button,
+ uint8_t bios_mux_control_override,
+ uint8_t bios_shared_mode_override,
+ uint8_t device_instance_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_boot_initiator_info (uint8_t parameter_valid,
+ uint8_t boot_source_channel_number,
+ uint32_t session_id,
+ uint32_t boot_info_timestamp,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_boot_options_boot_initiator_mailbox (uint8_t parameter_valid,
+ uint8_t set_selector,
+ const void *block_data,
+ unsigned int block_data_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_system_boot_options (uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_power_on_hours_counter (fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_CHASSIS_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-cmds.h
new file mode 100644
index 00000000..61c664b1
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-cmds.h
@@ -0,0 +1,342 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+/*****************************************************************************\
+ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC.
+ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ * Written by Albert Chu
+ * LLNL-CODE-413270
+ *
+ * This file is part of Ipmi-Dcmi, tools and libraries to support the
+ * data center manageability interface (DCMI). For details, see
+ * http://www.llnl.gov/linux/.
+ *
+ * Ipmi-Dcmi 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 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Ipmi-Dcmi 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 Ipmi-Dcmi. If not, see .
+\*****************************************************************************/
+
+#ifndef IPMI_DCMI_CMDS_H
+#define IPMI_DCMI_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SUPPORTED_DCMI_CAPABILITIES 0x01
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANDATORY_PLATFORM_ATTRIBUTES 0x02
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_OPTIONAL_PLATFORM_ATTRIBUTES 0x03
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANAGEABILITY_ACCESS_ATTRIBUTES 0x04
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_ENHANCED_SYSTEM_POWER_STATISTICS_ATTRIBUTES 0x05
+
+#define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SELECTOR_VALID(__parameter_selector) \
+ ((((__parameter_selector)) >= (IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SUPPORTED_DCMI_CAPABILITIES) && \
+ ((__parameter_selector)) <= (IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_ENHANCED_SYSTEM_POWER_STATISTICS_ATTRIBUTES)) ? 1 : 0)
+
+#define IPMI_DCMI_AVAILABLE 0x1
+#define IPMI_DCMI_NOT_PRESENT 0x0
+
+#define IPMI_DCMI_AVAILABLE 0x1
+#define IPMI_DCMI_AT_LEAST_1_PRESENT 0x1
+#define IPMI_DCMI_NOT_PRESENT 0x0
+
+#define IPMI_DCMI_CHANNEL_NOT_SUPPORTED 0xFF
+
+#define IPMI_DCMI_TIME_DURATION_UNITS_SECONDS 0x00
+#define IPMI_DCMI_TIME_DURATION_UNITS_MINUTES 0x01
+#define IPMI_DCMI_TIME_DURATION_UNITS_HOURS 0x02
+#define IPMI_DCMI_TIME_DURATION_UNITS_DAYS 0x03
+
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_ACTIVATE_DHCP 0x01
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_DISCOVERY_CONFIGURATION 0x02
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_1 0x03
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_2 0x04
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3 0x05
+
+#define IPMI_DCMI_CONFIGURATION_PARAMETER_SELECTOR_VALID(__parameter_selector) \
+ ((((__parameter_selector)) >= (IPMI_DCMI_CONFIGURATION_PARAMETER_ACTIVATE_DHCP) && \
+ ((__parameter_selector)) <= (IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3)) ? 1 : 0)
+
+#define IPMI_DCMI_DHCP_ACTIVATE 0x01
+
+#define IPMI_DCMI_DHCP_INCLUDE_OPTION 0x01
+#define IPMI_DCMI_DHCP_DO_NOT_INCLUDE_OPTION 0x00
+
+#define IPMI_DCMI_DHCP_INCLUDE_OPTION_VALID(__val) \
+ ((((__val)) == IPMI_DCMI_DHCP_INCLUDE_OPTION && \
+ ((__val)) == IPMI_DCMI_DHCP_DO_NOT_INCLUDE_OPTION) ? 1 : 0)
+
+#define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_ENABLE 0x01
+#define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_DISABLE 0x00
+
+#define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_VALID(__val) \
+ ((((__val)) == IPMI_DCMI_DHCP_RANDOM_BACK_OFF_ENABLE && \
+ ((__val)) == IPMI_DCMI_DHCP_RANDOM_BACK_OFF_DISABLE) ? 1 : 0)
+
+#define IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX 16
+#define IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX 16
+
+#define IPMI_DCMI_MAX_ASSET_TAG_LENGTH 63
+
+#define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE0 0xEF
+#define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE1 0xBB
+#define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE2 0xBF
+
+#define IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX 16
+#define IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX 16
+
+/* length includes NUL byte */
+#define IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH 64
+
+#define IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE 0x40
+#define IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE 0x41
+#define IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE 0x42
+
+#define IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE_STR "Inlet Temperature"
+#define IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE_STR "CPU Temperature"
+#define IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE_STR "Baseboard temperature"
+
+#define IPMI_DCMI_ENTITY_ID_VALID(__entity_id) \
+ (((__entity_id) == IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE \
+ || (__entity_id) == IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE \
+ || (__entity_id) == IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE) ? 1 : 0)
+
+#define IPMI_DCMI_ENTITY_INSTANCE_ALL 0x00
+
+#define IPMI_DCMI_POWER_READING_MODE_SYSTEM_POWER_STATISTICS 0x01
+#define IPMI_DCMI_POWER_READING_MODE_POWER_STATISTICS IPMI_DCMI_POWER_READING_MODE_SYSTEM_POWER_STATISTICS
+#define IPMI_DCMI_POWER_READING_MODE_ENHANCED_SYSTEM_POWER_STATISTICS 0x02
+
+/* spec only lists one mode right now, assume there can/will be more in the future */
+#define IPMI_DCMI_POWER_READING_MODE_VALID(__mode) \
+ (((__mode) == IPMI_DCMI_POWER_READING_MODE_POWER_STATISTICS \
+ || (__mode) == IPMI_DCMI_POWER_READING_MODE_ENHANCED_SYSTEM_POWER_STATISTICS) ? 1 : 0)
+
+#define IPMI_DCMI_POWER_READING_STATE_POWER_MEASUREMENT_ACTIVE 0x1
+#define IPMI_DCMI_POWER_READING_STATE_NO_POWER_MEASUREMENT_AVAILABLE 0x0
+
+/* HLiebig: specific value, not a bitmask */
+/* With power limit commands */
+#define IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION 0x00
+#define IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM 0x01
+#define IPMI_DCMI_EXCEPTION_ACTION_OEM_MIN 0x02
+#define IPMI_DCMI_EXCEPTION_ACTION_OEM_MAX 0x10
+#define IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY 0x11
+
+/* With thermal limit commands */
+#define IPMI_DCMI_EXCEPTION_ACTION_BIT_ON 1
+#define IPMI_DCMI_EXCEPTION_ACTION_BIT_OFF 0
+
+#define IPMI_DCMI_EXCEPTION_ACTION_BIT_VALID(__bit) \
+ (((__bit) == IPMI_DCMI_EXCEPTION_ACTION_BIT_ON \
+ || (__bit) == IPMI_DCMI_EXCEPTION_ACTION_BIT_OFF) ? 1 : 0)
+
+/* achu: it's an 8 bit field, why not allow all 8 bitmasks? Beats
+ * me, that's what's in the spec
+ */
+#define IPMI_DCMI_EXCEPTION_ACTIONS_MIN 0x00
+#define IPMI_DCMI_EXCEPTION_ACTIONS_MAX 0x1F
+
+#define IPMI_DCMI_POWER_LIMIT_REQUESTED_MIN 0x0000
+#define IPMI_DCMI_POWER_LIMIT_REQUESTED_MAX 0xFFFF
+
+#define IPMI_DCMI_CORRECTION_TIME_LIMIT_MIN 0x00000000
+#define IPMI_DCMI_CORRECTION_TIME_LIMIT_MAX 0xFFFFFFFF
+
+#define IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MIN 0x0000
+#define IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MAX 0xFFFF
+
+#define IPMI_DCMI_EXCEPTION_ACTION_VALID(__exception_action) \
+ (((__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION \
+ || (__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM \
+ || (__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY \
+ || ((__exception_action) >= IPMI_DCMI_EXCEPTION_ACTION_OEM_MIN && (__exception_action) <= IPMI_DCMI_EXCEPTION_ACTION_OEM_MAX)) ? 1 : 0)
+
+#define IPMI_DCMI_POWER_LIMIT_ACTIVATION_DEACTIVATE_POWER_LIMIT 0x0
+#define IPMI_DCMI_POWER_LIMIT_ACTIVATION_ACTIVATE_POWER_LIMIT 0x1
+
+#define IPMI_DCMI_POWER_LIMIT_ACTIVATION_VALID(__power_limit_activation) \
+ (((__power_limit_activation) == IPMI_DCMI_POWER_LIMIT_ACTIVATION_DEACTIVATE_POWER_LIMIT \
+ || (__power_limit_activation) == IPMI_DCMI_POWER_LIMIT_ACTIVATION_ACTIVATE_POWER_LIMIT) ? 1 : 0)
+
+/*
+ * 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_dcmi_rolling_average_time_period;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_power_reading_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_power_reading_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_power_limit_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_power_limit_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_power_limit_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_power_limit_rs;
+extern fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rq;
+extern fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rs;
+extern fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rq;
+extern fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rs;
+extern fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rq;
+extern fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rs;
+
+int fill_cmd_dcmi_get_dcmi_capability_info (uint8_t parameter_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters (uint8_t parameter_selector,
+ uint8_t set_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (uint8_t set_selector,
+ uint8_t activate,
+ fiid_obj_t obj_cmd_rq);
+
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (uint8_t set_selector,
+ uint8_t option_12,
+ uint8_t option_60_with_option_43,
+ uint8_t random_back_off,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (uint8_t set_selector,
+ uint8_t initial_timeout_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (uint8_t set_selector,
+ uint16_t server_contact_timeout_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (uint8_t set_selector,
+ uint16_t server_contact_retry_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_dcmi_configuration_parameters (uint8_t parameter_selector,
+ uint8_t set_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_asset_tag (uint8_t offset_to_read,
+ uint8_t number_of_bytes_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_asset_tag (uint8_t offset_to_write,
+ uint8_t number_of_bytes_to_write,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_management_controller_identifier_string (uint8_t offset_to_read,
+ uint8_t number_of_bytes_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_management_controller_identifier_string (uint8_t offset_to_write,
+ uint8_t number_of_bytes_to_write,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_dcmi_sensor_info (uint8_t sensor_type,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t entity_instance_start,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_power_reading (uint8_t mode,
+ uint8_t mode_attributes,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_power_limit (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_power_limit (uint8_t exception_actions,
+ uint16_t power_limit_requested,
+ uint32_t correction_time_limit,
+ uint16_t management_application_statistics_sampling_period,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_activate_deactivate_power_limit (uint8_t power_limit_activation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_thermal_limit (uint8_t entity_id,
+ uint8_t entity_instance,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_set_thermal_limit (uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t temperature_limit,
+ uint8_t exception_actions_log_event_to_sel_only,
+ uint8_t exception_actions_hard_power_off_system_and_log_event,
+ uint16_t exception_time,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_dcmi_get_temperature_reading (uint8_t sensor_type,
+ uint8_t entity_id,
+ uint8_t entity_instance,
+ uint8_t entity_instance_start,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_DCMI_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-oem-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-oem-cmds.h
new file mode 100644
index 00000000..bb078ed5
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-dcmi-oem-cmds.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_DCMI_OEM_CMDS_H
+#define IPMI_DCMI_OEM_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_DCMI_OEM_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-device-global-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-device-global-cmds.h
new file mode 100644
index 00000000..8c9e0604
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-device-global-cmds.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_DEVICE_GLOBAL_CMDS_H
+#define IPMI_DEVICE_GLOBAL_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#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 */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-event-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-event-cmds.h
new file mode 100644
index 00000000..07cd1b47
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-event-cmds.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_EVENT_CMDS_H
+#define IPMI_EVENT_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * 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_set_event_receiver_rq;
+extern fiid_template_t tmpl_cmd_set_event_receiver_rs;
+
+extern fiid_template_t tmpl_cmd_get_event_receiver_rq;
+extern fiid_template_t tmpl_cmd_get_event_receiver_rs;
+
+extern fiid_template_t tmpl_cmd_platform_event_rq;
+extern fiid_template_t tmpl_cmd_platform_event_rs;
+
+int fill_cmd_set_event_receiver (uint8_t event_receiver_slave_address,
+ uint8_t event_receiver_lun,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_event_receiver (fiid_obj_t obj_cmd_rq);
+
+/* generator_id is optional */
+int fill_cmd_platform_event (uint8_t *generator_id,
+ uint8_t event_message_format_version,
+ uint8_t sensor_type,
+ uint8_t sensor_number,
+ uint8_t event_type_code,
+ uint8_t event_dir,
+ uint8_t event_data1,
+ uint8_t event_data2,
+ uint8_t event_data3,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_EVENT_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h
new file mode 100644
index 00000000..cd865369
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h
@@ -0,0 +1,197 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_NETFN_LUN_SUPPORT_NO_COMMANDS_SUPPORTED 0x0
+#define IPMI_NETFN_LUN_SUPPORT_COMMANDS_FOLLOW_BASE_IPMI_SPECIFICATION 0x1
+#define IPMI_NETFN_LUN_SUPPORT_COMMANDS_EXIST_ON_LUN 0x2
+
+#define IPMI_NETFN_PAIR_IS_NOT_USED 0x0
+#define IPMI_NETFN_PAIR_IS_USED 0x1
+
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_00H_TO_7FH 0x0
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_80H_TO_FFH 0x1
+
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID(__val) \
+ (((__val) == IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_00H_TO_7FH \
+ || (__val) == IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_80H_TO_FFH) ? 1 : 0)
+
+/* achu: Yes, this one is backwards. I don't know why */
+#define IPMI_COMMAND_AVAILABLE 0x0
+#define IPMI_COMMAND_UNAVAILABLE 0x1
+
+/* achu: Yes, this one is backwards. I don't know why */
+#define IPMI_SUB_FUNCTION_AVAILABLE 0x0
+#define IPMI_SUB_FUNCTION_UNAVAILABLE 0x1
+
+#define IPMI_COMMAND_NOT_CONFIGURABLE 0x0
+#define IPMI_COMMAND_CAN_BE_ENABLED_DISABLED 0x1
+
+#define IPMI_SUB_FUNCTION_NOT_CONFIGURABLE 0x0
+#define IPMI_SUB_FUNCTION_CAN_BE_ENABLED_DISABLED 0x1
+
+#define IPMI_COMMAND_DISABLED_OR_NOT_SUPPORTED 0x0
+#define IPMI_COMMAND_ENABLED 0x1
+
+#define IPMI_SUB_FUNCTION_DISABLED_OR_NOT_SUPPORTED 0x0
+#define IPMI_SUB_FUNCTION_ENABLED 0x1
+
+#define IPMI_SPECIFICATION_TYPE_IPMI 0x0
+#define IPMI_SPECIFICATION_TYPE_IPMB 0x1
+#define IPMI_SPECIFICATION_TYPE_ICMB 0x2
+
+#define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_ENABLE_DISABLE_BITMASK_LEN 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_netfn_support_rq;
+extern fiid_template_t tmpl_cmd_get_netfn_support_rs;
+
+extern fiid_template_t tmpl_cmd_get_command_support_rq;
+extern fiid_template_t tmpl_cmd_get_command_support_rs;
+extern fiid_template_t tmpl_cmd_get_command_sub_function_support_rq;
+extern fiid_template_t tmpl_cmd_get_command_sub_function_support_specification_errata_rs;
+extern fiid_template_t tmpl_cmd_get_command_sub_function_support_extension_errata_rs;
+
+extern fiid_template_t tmpl_cmd_get_configurable_commands_rq;
+extern fiid_template_t tmpl_cmd_get_configurable_commands_rs;
+extern fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rq;
+extern fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rs;
+
+extern fiid_template_t tmpl_cmd_set_command_enables_rq;
+extern fiid_template_t tmpl_cmd_set_command_enables_rs;
+extern fiid_template_t tmpl_cmd_get_command_enables_rq;
+extern fiid_template_t tmpl_cmd_get_command_enables_rs;
+
+extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_rq;
+extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_defining_body_code_rq;
+extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_oem_iana_rq;
+extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_rs;
+
+extern fiid_template_t tmpl_cmd_get_command_sub_function_enables_rq;
+extern fiid_template_t tmpl_cmd_get_command_sub_function_enables_rs;
+
+extern fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rq;
+extern fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rs;
+
+int fill_cmd_get_netfn_support (uint8_t channel_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_command_support (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_command_sub_function_support (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_configurable_commands (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_configurable_command_sub_functions (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_command_enables (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint8_t *enable_disable_bitmask,
+ unsigned int enable_disable_bitmask_len,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_command_enables (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t operation,
+ uint8_t lun,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_command_sub_function_enables (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_command_sub_function_enables_defining_body_code (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint8_t defining_body_code,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_command_sub_function_enables_oem_iana (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t oem_iana,
+ uint32_t sub_function_enables1,
+ uint32_t *sub_function_enables2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_command_sub_function_enables (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t lun,
+ uint8_t command,
+ uint32_t net_fn_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_oem_netfn_iana_support (uint8_t channel_number,
+ uint8_t net_fn,
+ uint8_t list_index,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-fru-inventory-device-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-fru-inventory-device-cmds.h
new file mode 100644
index 00000000..eb650c8e
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-fru-inventory-device-cmds.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+/*****************************************************************************\
+ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.
+ * Copyright (C) 2007 The Regents of the University of California.
+ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
+ * Written by Albert Chu
+ * UCRL-CODE-232183
+ *
+ * This file is part of Ipmi-fru, a tool used for retrieving
+ * motherboard field replaceable unit (FRU) information. For details,
+ * see http://www.llnl.gov/linux/.
+ *
+ * Ipmi-fru 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 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Ipmi-fru 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 Ipmi-fru. If not, see .
+\*****************************************************************************/
+
+#ifndef IPMI_FRU_INVENTORY_DEVICE_CMDS_H
+#define IPMI_FRU_INVENTORY_DEVICE_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_FRU_DEVICE_ID_DEFAULT 0x00 /* FRU for Management Controller - Chap 38 */
+#define IPMI_FRU_DEVICE_ID_RESERVED 0xFF
+#define IPMI_FRU_DEVICE_ID_MIN 0x00
+#define IPMI_FRU_DEVICE_ID_MAX 0xFE
+#define IPMI_FRU_INVENTORY_AREA_SIZE_MAX 65536 /* 16 bit field for length */
+#define IPMI_FRU_DATA_MAX 255
+
+/*
+ * 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_fru_inventory_area_info_rq;
+extern fiid_template_t tmpl_cmd_get_fru_inventory_area_info_rs;
+extern fiid_template_t tmpl_cmd_read_fru_data_rq;
+extern fiid_template_t tmpl_cmd_read_fru_data_rs;
+extern fiid_template_t tmpl_cmd_write_fru_data_rq;
+extern fiid_template_t tmpl_cmd_write_fru_data_rs;
+
+int fill_cmd_get_fru_inventory_area_info (uint8_t fru_device_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_read_fru_data (uint8_t fru_device_id,
+ uint16_t fru_inventory_offset_to_read,
+ uint8_t count_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_write_fru_data (uint8_t fru_device_id,
+ uint16_t fru_inventory_offset_to_write,
+ const void *data_to_write,
+ unsigned int data_to_write_len,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_FRU_INVENTORY_DEVICE_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-lan-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-lan-cmds.h
new file mode 100644
index 00000000..e9121fd0
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-lan-cmds.h
@@ -0,0 +1,399 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_LAN_CMDS_H
+#define IPMI_LAN_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02
+
+#define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMPLETE \
+ || (__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \
+ || (__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_AUTHENTICATION_TYPE_SUPPORTED 0x1
+#define IPMI_AUTHENTICATION_TYPE_UNSUPPORTED 0x0
+
+#define IPMI_AUTHENTICATION_TYPE_ENABLE 0x1
+#define IPMI_AUTHENTICATION_TYPE_DISABLE 0x0
+
+#define IPMI_AUTHENTICATION_TYPE_ENABLE_VALID(__val) \
+ (((__val) == IPMI_AUTHENTICATION_TYPE_ENABLE \
+ || (__val) == IPMI_AUTHENTICATION_TYPE_DISABLE) ? 1 : 0)
+
+#define IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED 0x0
+#define IPMI_IP_ADDRESS_SOURCE_STATIC 0x1
+#define IPMI_IP_ADDRESS_SOURCE_DHCP 0x2
+#define IPMI_IP_ADDRESS_SOURCE_BIOS 0x3
+#define IPMI_IP_ADDRESS_SOURCE_OTHER 0x4
+
+#define IPMI_IP_ADDRESS_SOURCE_VALID(__val) \
+ (((__val) == IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED \
+ || (__val) == IPMI_IP_ADDRESS_SOURCE_STATIC \
+ || (__val) == IPMI_IP_ADDRESS_SOURCE_DHCP \
+ || (__val) == IPMI_IP_ADDRESS_SOURCE_BIOS \
+ || (__val) == IPMI_IP_ADDRESS_SOURCE_OTHER) ? 1 : 0)
+
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE 0x1
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE 0x0
+
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_VALID(__val) \
+ (((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE \
+ || (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE) ? 1 : 0)
+
+#define IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE 0x1
+#define IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE 0x0
+
+#define IPMI_BMC_GENERATED_ARP_RESPONSES_VALID(__val) \
+ (((__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE \
+ || (__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE) ? 1 : 0)
+
+#define IPMI_MAX_COMMUNITY_STRING_LENGTH 18
+
+#define IPMI_DESTINATION_SELECTOR_MIN 0
+#define IPMI_DESTINATION_SELECTOR_MAX 15
+
+/* To avoid gcc warnings, add +1 in comparison */
+#define IPMI_DESTINATION_SELECTOR_VALID(__val) \
+ (((__val + 1) >= (IPMI_DESTINATION_SELECTOR_MIN + 1) \
+ || (__val) <= IPMI_DESTINATION_SELECTOR_MAX) ? 1 : 0)
+
+
+#define IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION 0x0
+#define IPMI_DESTINATION_TYPE_OEM1 0x6
+#define IPMI_DESTINATION_TYPE_OEM2 0x7
+
+#define IPMI_DESTINATION_TYPE_VALID(__val) \
+ (((__val) == IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION \
+ || (__val) == IPMI_DESTINATION_TYPE_OEM1 \
+ || (__val) == IPMI_DESTINATION_TYPE_OEM2) ? 1 : 0)
+
+#define IPMI_ALERT_UNACKNOWLEDGED 0
+#define IPMI_ALERT_ACKNOWLEDGED 1
+
+#define IPMI_ALERT_VALID(__val) \
+ (((__val) == IPMI_ALERT_UNACKNOWLEDGED \
+ || (__val) == IPMI_ALERT_ACKNOWLEDGED) ? 1 : 0)
+
+#define IPMI_ADDRESS_FORMAT_IPV4 0
+
+#define IPMI_GATEWAY_SELECTOR_DEFAULT 0
+#define IPMI_GATEWAY_SELECTOR_BACKUP 1
+
+#define IPMI_GATEWAY_SELECTOR_VALID(__val) \
+ (((__val) == IPMI_GATEWAY_SELECTOR_DEFAULT \
+ || (__val) == IPMI_GATEWAY_SELECTOR_BACKUP) ? 1 : 0)
+
+/* 3 bit number */
+#define IPMI_ALERT_RETRIES_MAX 7
+
+#define IPMI_VLAN_ID_ENABLE 0x1
+#define IPMI_VLAN_ID_DISABLE 0x0
+
+#define IPMI_VLAN_ID_ENABLE_VALID(__val) \
+ (((__val) == IPMI_VLAN_ID_ENABLE \
+ || (__val) == IPMI_VLAN_ID_DISABLE) ? 1 : 0)
+
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND 0x0
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND 0x1
+
+#define IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID(__val) \
+ (((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND \
+ || (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND) ? 1 : 0)
+
+#define IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND 0x0
+#define IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND 0x1
+
+#define IPMI_BMC_GENERATED_ARP_RESPONSE_VALID(__val) \
+ (((__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND \
+ || (__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND) ? 1 : 0)
+
+#define IPMI_USER_DISABLED_EVENT_MESSAGE_ON 0x1
+#define IPMI_USER_DISABLED_EVENT_MESSAGE_OFF 0x0
+
+#define IPMI_USER_DISABLED_EVENT_MESSAGE_VALID(__val) \
+ (((__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_ON \
+ || (__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_OFF) ? 1 : 0)
+
+#define IPMI_GET_LAN_PARAMETER 0x0
+#define IPMI_GET_LAN_PARAMETER_REVISION_ONLY 0x1
+
+#define IPMI_GET_LAN_PARAMETER_VALID(__val) \
+ (((__val) == IPMI_GET_LAN_PARAMETER \
+ || (__val) == IPMI_GET_LAN_PARAMETER_REVISION_ONLY) ? 1 : 0)
+
+#define IPMI_CLEAR_ALL_STATISTICS 0x1
+#define IPMI_DONT_CLEAR_ALL_STATISTICS 0x0
+
+#define IPMI_CLEAR_ALL_STATISTICS_VALID(__val) \
+ (((__val) == IPMI_CLEAR_ALL_STATISTICS \
+ || (__val) == IPMI_DONT_CLEAR_ALL_STATISTICS) ? 1 : 0)
+
+/*
+ * 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_set_lan_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rs;
+
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_mac_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv4_header_parameters_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_primary_rmcp_port_number_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_community_string_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_type_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq;
+extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq;
+
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rs;
+
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_mac_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv4_header_parameters_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_primary_rmcp_port_number_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_community_string_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_type_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs;
+extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs;
+
+extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rq;
+extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rs;
+
+extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rq;
+extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rs;
+
+int fill_cmd_set_lan_configuration_parameters (uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_set_in_progress (uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_authentication_type_enables (uint8_t channel_number,
+ uint8_t callback_level_none,
+ uint8_t callback_level_md2,
+ uint8_t callback_level_md5,
+ uint8_t callback_level_straight_password,
+ uint8_t callback_level_oem_proprietary,
+ uint8_t user_level_none,
+ uint8_t user_level_md2,
+ uint8_t user_level_md5,
+ uint8_t user_level_straight_password,
+ uint8_t user_level_oem_proprietary,
+ uint8_t operator_level_none,
+ uint8_t operator_level_md2,
+ uint8_t operator_level_md5,
+ uint8_t operator_level_straight_password,
+ uint8_t operator_level_oem_proprietary,
+ uint8_t admin_level_none,
+ uint8_t admin_level_md2,
+ uint8_t admin_level_md5,
+ uint8_t admin_level_straight_password,
+ uint8_t admin_level_oem_proprietary,
+ uint8_t oem_level_none,
+ uint8_t oem_level_md2,
+ uint8_t oem_level_md5,
+ uint8_t oem_level_straight_password,
+ uint8_t oem_level_oem_proprietary,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_ip_address (uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_ip_address_source (uint8_t channel_number,
+ uint8_t ip_address_source,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_mac_address (uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_subnet_mask (uint8_t channel_number,
+ uint32_t subnet_mask,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_ipv4_header_parameters (uint8_t channel_number,
+ uint8_t time_to_live,
+ uint8_t flags,
+ uint8_t type_of_service,
+ uint8_t precedence,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (uint8_t channel_number,
+ uint16_t primary_rmcp_port_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (uint8_t channel_number,
+ uint16_t secondary_rmcp_port_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (uint8_t channel_number,
+ uint8_t bmc_generated_gratuitous_arps,
+ uint8_t bmc_generated_arp_responses,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (uint8_t channel_number,
+ uint8_t gratuitous_arp_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_default_gateway_address (uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_default_gateway_mac_address (uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_backup_gateway_address (uint8_t channel_number,
+ uint32_t ip_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (uint8_t channel_number,
+ uint64_t mac_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_community_string (uint8_t channel_number,
+ const char *community_string,
+ unsigned int community_string_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_destination_type (uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t destination_type,
+ uint8_t alert_acknowledge,
+ uint8_t alert_acknowledge_timeout,
+ uint8_t retries,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_destination_addresses (uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t gateway_selector,
+ uint32_t alerting_ip_address,
+ uint64_t alerting_mac_address,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_vlan_id (uint8_t channel_number,
+ uint16_t vlan_id,
+ uint8_t vlan_id_enable,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_vlan_priority (uint8_t channel_number,
+ uint8_t vlan_priority,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (uint8_t channel_number,
+ uint8_t maximum_privilege_for_cipher_suite_1,
+ uint8_t maximum_privilege_for_cipher_suite_2,
+ uint8_t maximum_privilege_for_cipher_suite_3,
+ uint8_t maximum_privilege_for_cipher_suite_4,
+ uint8_t maximum_privilege_for_cipher_suite_5,
+ uint8_t maximum_privilege_for_cipher_suite_6,
+ uint8_t maximum_privilege_for_cipher_suite_7,
+ uint8_t maximum_privilege_for_cipher_suite_8,
+ uint8_t maximum_privilege_for_cipher_suite_9,
+ uint8_t maximum_privilege_for_cipher_suite_10,
+ uint8_t maximum_privilege_for_cipher_suite_11,
+ uint8_t maximum_privilege_for_cipher_suite_12,
+ uint8_t maximum_privilege_for_cipher_suite_13,
+ uint8_t maximum_privilege_for_cipher_suite_14,
+ uint8_t maximum_privilege_for_cipher_suite_15,
+ uint8_t maximum_privilege_for_cipher_suite_16,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_lan_configuration_parameters_bad_password_threshold (uint8_t channel_number,
+ uint8_t user_disabled_event_message,
+ uint8_t bad_password_threshold_number,
+ uint16_t attempt_count_reset_interval,
+ uint16_t user_lockout_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_lan_configuration_parameters (uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_suspend_bmc_arps (uint8_t channel_number,
+ uint8_t gratuitous_arp_suspend,
+ uint8_t arp_response_suspend,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_ip_udp_rmcp_statistics (uint8_t channel_number,
+ uint8_t clear_all_statistics,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_LAN_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-messaging-support-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-messaging-support-cmds.h
new file mode 100644
index 00000000..aae81ffb
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-messaging-support-cmds.h
@@ -0,0 +1,654 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_MESSAGING_SUPPORT_CMDS_H
+#define IPMI_MESSAGING_SUPPORT_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_MAX_USER_NAME_LENGTH 16
+#define IPMI_1_5_MAX_PASSWORD_LENGTH 16
+#define IPMI_2_0_MAX_PASSWORD_LENGTH 20
+#define IPMI_MAX_PASSWORD_LENGTH IPMI_2_0_MAX_PASSWORD_LENGTH
+#define IPMI_CHALLENGE_STRING_LENGTH 16
+#define IPMI_MAX_K_R_LENGTH 20
+#define IPMI_MAX_K_G_LENGTH 20
+
+#define IPMI_BMC_GLOBAL_ENABLES_ENABLED 0x1
+#define IPMI_BMC_GLOBAL_ENALBES_DISABLED 0x0
+
+#define IPMI_BMC_GLOBAL_ENABLES_VALID(__val) \
+ (((__val) == IPMI_BMC_GLOBAL_ENABLES_ENABLED \
+ || (__val) == IPMI_BMC_GLOBAL_ENALBES_DISABLED) ? 1 : 0)
+
+#define IPMI_MESSAGE_FLAGS_CLEAR 0x1
+#define IPMI_MESSAGE_FLAGS_DONT_CLEAR 0x0
+
+#define IPMI_MESSAGE_FLAGS_VALID(__val) \
+ (((__val) == IPMI_MESSAGE_FLAGS_CLEAR \
+ || (__val) == IPMI_MESSAGE_FLAGS_DONT_CLEAR) ? 1 : 0)
+
+#define IPMI_CHANNEL_OPERATION_DISABLE_CHANNEL 0x00
+#define IPMI_CHANNEL_OPERATION_ENABLE_CHANNEL 0x01
+#define IPMI_CHANNEL_OPERATION_GET_CHANNEL_ENABLE_DISABLE_STATE 0x02
+
+#define IPMI_CHANNEL_OPERATION_VALID(__val) \
+ (((__val) == IPMI_CHANNEL_OPERATION_DISABLE_CHANNEL \
+ || (__val) == IPMI_CHANNEL_OPERATION_ENABLE_CHANNEL \
+ || (__val) == IPMI_CHANNEL_OPERATION_GET_CHANNEL_ENABLE_DISABLE_STATE) ? 1 : 0)
+
+#define IPMI_CHANNEL_DISABLED 0x00
+#define IPMI_CHANNEL_ENABLED 0x01
+
+#define IPMI_SEND_MESSAGE_WITH_AUTHENTICATION 0x1
+#define IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED 0x0
+
+#define IPMI_SEND_MESSAGE_AUTHENTICATION_VALID(__val) \
+ (((__val) == IPMI_SEND_MESSAGE_WITH_AUTHENTICATION \
+ || (__val) == IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED) ? 1 : 0)
+
+#define IPMI_SEND_MESSAGE_WITH_ENCRYPTION 0x1
+#define IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED 0x0
+
+#define IPMI_SEND_MESSAGE_ENCRYPTION_VALID(__val) \
+ (((__val) == IPMI_SEND_MESSAGE_WITH_ENCRYPTION \
+ || (__val) == IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED) ? 1 : 0)
+
+#define IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING 0x0
+#define IPMI_SEND_MESSAGE_TRACKING_OPERATION_TRACKING_REQUEST 0x1
+#define IPMI_SEND_MESSAGE_TRACKING_OPERATION_SEND_RAW 0x2
+
+#define IPMI_SEND_MESSAGE_TRACKING_VALID(__val) \
+ (((__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING \
+ || (__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_TRACKING_REQUEST \
+ || (__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_SEND_RAW) ? 1 : 0)
+
+#define IPMI_SYSTEM_INTERFACE_SSIF 0x00
+#define IPMI_SYSTEM_INTERFACE_KCS 0x01
+#define IPMI_SYSTEM_INTERFACE_SMIC 0x02
+
+#define IPMI_SYSTEM_INTERFACE_VALID(__val) \
+ (((__val) == IPMI_SYSTEM_INTERFACE_SSIF \
+ || (__val) == IPMI_SYSTEM_INTERFACE_KCS \
+ || (__val) == IPMI_SYSTEM_INTERFACE_SMIC) ? 1 : 0)
+
+#define IPMI_SSIF_SYSTEM_INTERFACE_VERSION_1 0x0
+
+#define IPMI_SSIF_SYSTEM_INTERFACE_IMPLEMENTS_PEC 0x1
+#define IPMI_SSIF_SYSTEM_INTERFACE_DOES_NOT_SUPPORT_PEC 0x0
+
+#define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_SINGLE_PART_READS_WRITES_SUPPORTED 0x0
+#define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_AND_END_ONLY 0x1
+#define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_MIDDLE_END 0x2
+
+#define IPMI_KCS_SYSTEM_INTERFACE_VERSION_1 0x0
+
+#define IPMI_BUS_TYPE_PUBLIC 0x0
+#define IPMI_BUS_TYPE_PRIVATE 0x1
+
+#define IPMI_BUS_TYPE_VALID(__bus_type) \
+ (((__bus_type) == IPMI_BUS_TYPE_PUBLIC \
+ || (__bus_type) == IPMI_BUS_TYPE_PRIVATE) ? 1 : 0)
+
+#define IPMI_GET_IPMI_V20_EXTENDED_DATA 0x01
+#define IPMI_GET_IPMI_V15_DATA 0x00
+
+#define IPMI_GET_IPMI_DATA_VALID(__val) \
+ (((__val) == IPMI_GET_IPMI_V20_EXTENDED_DATA \
+ || (__val) == IPMI_GET_IPMI_V15_DATA) ? 1 : 0)
+
+#define IPMI_GET_SYSTEM_INFO_PARAMETER 0x0
+#define IPMI_GET_SYSTEM_INFO_PARAMETER_REVISION_ONLY 0x1
+
+#define IPMI_GET_SYSTEM_INFO_PARAMETER_VALID(__val) \
+ (((__val) == IPMI_GET_SYSTEM_INFO_PARAMETER \
+ || (__val) == IPMI_GET_SYSTEM_INFO_PARAMETER_REVISION_ONLY) ? 1 : 0)
+
+#define IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR 0x0
+#define IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_SYSTEM_INFO_PARAMETERS_SET_COMPLETE 0x00
+#define IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS 0x01
+#define IPMI_SYSTEM_INFO_PARAMETERS_SET_COMMIT_WRITE 0x02
+
+#define IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_COMPLETE \
+ || (__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS \
+ || (__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1 0x0
+#define IPMI_SYSTEM_INFO_ENCODING_UTF_8 0x1
+#define IPMI_SYSTEM_INFO_ENCODING_UNICODE 0x2
+
+#define IPMI_SYSTEM_INFO_ENCODING_VALID(__val) \
+ (((__val) == IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1 \
+ || (__val) == IPMI_SYSTEM_INFO_ENCODING_UTF_8 \
+ || (__val) == IPMI_SYSTEM_INFO_ENCODING_UNICODE) ? 1 : 0)
+
+#define IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX 14
+#define IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX 16
+#define IPMI_SYSTEM_INFO_STRING_LEN_MAX 255
+
+#define IPMI_LIST_ALGORITHMS_BY_CIPHER_SUITE 0x1
+#define IPMI_LIST_SUPPORTED_ALGORITHMS 0x0
+
+#define IPMI_LIST_ALGORITHM_TYPE_VALID(__val) \
+ (((__val) == IPMI_LIST_ALGORITHMS_BY_CIPHER_SUITE \
+ || (__val) == IPMI_LIST_SUPPORTED_ALGORITHMS) ? 1 : 0)
+
+#define IPMI_MESSAGING_ACCESS_MODE_DISABLED 0x0
+#define IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY 0x1
+#define IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE 0x2
+#define IPMI_MESSAGING_ACCESS_MODE_SHARED 0x3
+
+#define IPMI_MESSAGING_ACCESS_MODE_VALID(__access_mode) \
+ (((__access_mode) == IPMI_MESSAGING_ACCESS_MODE_DISABLED \
+ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY \
+ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE \
+ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_SHARED) ? 1 : 0)
+
+#define IPMI_USER_LEVEL_AUTHENTICATION_ENABLE 0x0
+#define IPMI_USER_LEVEL_AUTHENTICATION_DISABLE 0x1
+
+#define IPMI_USER_LEVEL_AUTHENTICATION_VALID(__val) \
+ (((__val) == IPMI_USER_LEVEL_AUTHENTICATION_ENABLE \
+ || (__val) == IPMI_USER_LEVEL_AUTHENTICATION_DISABLE) ? 1 : 0)
+
+#define IPMI_PER_MESSAGE_AUTHENTICATION_ENABLE 0x0
+#define IPMI_PER_MESSAGE_AUTHENTICATION_DISABLE 0x1
+
+#define IPMI_PER_MESSAGE_AUTHENTICATION_VALID(__val) \
+ (((__val) == IPMI_PER_MESSAGE_AUTHENTICATION_ENABLE \
+ || (__val) == IPMI_PER_MESSAGE_AUTHENTICATION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_ALERTING_ENABLE 0x0
+#define IPMI_PEF_ALERTING_DISABLE 0x1
+
+#define IPMI_PEF_ALERTING_VALID(__val) \
+ (((__val) == IPMI_PEF_ALERTING_ENABLE \
+ || (__val) == IPMI_PEF_ALERTING_DISABLE) ? 1 : 0)
+
+#define IPMI_CHANNEL_ACCESS_NO_CHANGE 0x0
+#define IPMI_CHANNEL_ACCESS_SET_NON_VOLATILE 0x1
+#define IPMI_CHANNEL_ACCESS_SET_VOLATILE 0x2
+#define IPMI_CHANNEL_ACCESS_RESERVED 0x3
+
+#define IPMI_CHANNEL_ACCESS_VALID(__access_mode) \
+ (((__access_mode) == IPMI_CHANNEL_ACCESS_NO_CHANGE \
+ || (__access_mode) == IPMI_CHANNEL_ACCESS_SET_NON_VOLATILE \
+ || (__access_mode) == IPMI_CHANNEL_ACCESS_SET_VOLATILE) ? 1 : 0)
+
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_NO_CHANGE 0x0
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_NON_VOLATILE 0x1
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VOLATILE 0x2
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_RESERVED 0x3
+
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VALID(__privilege_level_limit) \
+ (((__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_NO_CHANGE \
+ || (__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_SET_NON_VOLATILE \
+ || (__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VOLATILE) ? 1 : 0)
+
+#define IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE 0x1
+#define IPMI_CHANNEL_ACCESS_GET_VOLATILE 0x2
+
+#define IPMI_CHANNEL_ACCESS_GET_VALID(__val) \
+ (((__val) == IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE \
+ || (__val) == IPMI_CHANNEL_ACCESS_GET_VOLATILE) ? 1 : 0)
+
+#define IPMI_USER_RESTRICTED_TO_CALLBACK_ENABLE 0x1
+#define IPMI_USER_RESTRICTED_TO_CALLBACK_DISABLE 0x0
+
+#define IPMI_USER_RESTRICTED_TO_CALLBACK_VALID(__val) \
+ (((__val) == IPMI_USER_RESTRICTED_TO_CALLBACK_ENABLE \
+ || (__val) == IPMI_USER_RESTRICTED_TO_CALLBACK_DISABLE) ? 1 : 0)
+
+#define IPMI_PRIVILEGE_LEVEL_LIMIT_VALID(__privilege_level) \
+ (((__privilege_level) == IPMI_PRIVILEGE_LEVEL_CALLBACK \
+ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_USER \
+ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OPERATOR \
+ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_ADMIN \
+ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OEM \
+ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_NO_ACCESS) ? 1 : 0)
+
+#define IPMI_USER_LINK_AUTHENTICATION_ENABLE 0x1
+#define IPMI_USER_LINK_AUTHENTICATION_DISABLE 0x0
+
+#define IPMI_USER_LINK_AUTHENTICATION_VALID(__val) \
+ (((__val) == IPMI_USER_LINK_AUTHENTICATION_ENABLE \
+ || (__val) == IPMI_USER_LINK_AUTHENTICATION_DISABLE) ? 1 : 0)
+
+#define IPMI_USER_IPMI_MESSAGING_ENABLE 0x1
+#define IPMI_USER_IPMI_MESSAGING_DISABLE 0x0
+
+#define IPMI_USER_IPMI_MESSAGING_VALID(__val) \
+ (((__val) == IPMI_USER_IPMI_MESSAGING_ENABLE \
+ || (__val) == IPMI_USER_IPMI_MESSAGING_DISABLE) ? 1 : 0)
+
+#define IPMI_CHANGE_BITS_YES 0x1
+#define IPMI_CHANGE_BITS_NO 0x0
+
+#define IPMI_CHANGE_BITS_VALID(__val) \
+ (((__val) == IPMI_CHANGE_BITS_YES \
+ || (__val) == IPMI_CHANGE_BITS_NO) ? 1 : 0)
+
+#define IPMI_SESSION_SUPPORT_SESSION_LESS 0x00
+#define IPMI_SESSION_SUPPORT_SINGLE_SESSION 0x01
+#define IPMI_SESSION_SUPPORT_MULTI_SESSION 0x02
+#define IPMI_SESSION_SUPPORT_SESSION_BASED 0x03
+
+#define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_READ_KEY 0x0
+#define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY 0x1
+#define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_LOCK_KEY 0x2
+
+#define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_VALID(__val) \
+ (((__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_READ_KEY \
+ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY \
+ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_LOCK_KEY) ? 1 : 0)
+
+#define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R 0x0
+#define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G 0x1
+
+#define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_VALID(__val) \
+ (((__val) == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R \
+ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G) ? 1 : 0)
+
+#define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_NOT_LOCKABLE 0x0
+#define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_LOCKED 0x1
+#define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_UNLOCKED 0x2
+
+#define IPMI_PASSWORD_OPERATION_DISABLE_USER 0x0
+#define IPMI_PASSWORD_OPERATION_ENABLE_USER 0x1
+#define IPMI_PASSWORD_OPERATION_SET_PASSWORD 0x2
+#define IPMI_PASSWORD_OPERATION_TEST_PASSWORD 0x3
+
+#define IPMI_PASSWORD_OPERATION_VALID(__operation) \
+ (((__operation) == IPMI_PASSWORD_OPERATION_DISABLE_USER \
+ || (__operation) == IPMI_PASSWORD_OPERATION_ENABLE_USER \
+ || (__operation) == IPMI_PASSWORD_OPERATION_SET_PASSWORD \
+ || (__operation) == IPMI_PASSWORD_OPERATION_TEST_PASSWORD) ? 1 : 0)
+
+#define IPMI_PASSWORD_SIZE_16_BYTES 0x0
+#define IPMI_PASSWORD_SIZE_20_BYTES 0x1
+
+#define IPMI_PASSWORD_SIZE_VALID(__password_size) \
+ (((__password_size) == IPMI_PASSWORD_SIZE_16_BYTES \
+ || (__password_size) == IPMI_PASSWORD_SIZE_20_BYTES) ? 1 : 0)
+
+#define IPMI_USER_ID_ENABLE_STATUS_UNSPECIFIED 0x0
+#define IPMI_USER_ID_ENABLE_STATUS_ENABLED 0x1
+#define IPMI_USER_ID_ENABLE_STATUS_DISABLED 0x2
+
+/*
+ * 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_set_bmc_global_enables_rq;
+extern fiid_template_t tmpl_cmd_set_bmc_global_enables_rs;
+extern fiid_template_t tmpl_cmd_get_bmc_global_enables_rq;
+extern fiid_template_t tmpl_cmd_get_bmc_global_enables_rs;
+
+extern fiid_template_t tmpl_cmd_clear_message_flags_rq;
+extern fiid_template_t tmpl_cmd_clear_message_flags_rs;
+extern fiid_template_t tmpl_cmd_get_message_flags_rq;
+extern fiid_template_t tmpl_cmd_get_message_flags_rs;
+extern fiid_template_t tmpl_cmd_enable_message_channel_receive_rq;
+extern fiid_template_t tmpl_cmd_enable_message_channel_receive_rs;
+extern fiid_template_t tmpl_cmd_get_message_rq;
+extern fiid_template_t tmpl_cmd_get_message_rs;
+extern fiid_template_t tmpl_cmd_send_message_rq;
+extern fiid_template_t tmpl_cmd_send_message_rs;
+extern fiid_template_t tmpl_cmd_read_event_message_buffer_rq;
+extern fiid_template_t tmpl_cmd_read_event_message_buffer_rs;
+
+extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_rq;
+extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_rs;
+extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_ssif_rs;
+extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_kcs_rs;
+extern fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rq;
+extern fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rs;
+extern fiid_template_t tmpl_cmd_master_write_read_rq;
+extern fiid_template_t tmpl_cmd_master_write_read_rs;
+
+extern fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rq;
+extern fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rs;
+
+extern fiid_template_t tmpl_cmd_get_system_guid_rq;
+extern fiid_template_t tmpl_cmd_get_system_guid_rs;
+extern fiid_template_t tmpl_cmd_get_device_guid_format_rs;
+
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_rs;
+
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq;
+extern fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq;
+
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_rq;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_rs;
+
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set_rs;
+extern fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_rs;
+
+extern fiid_template_t tmpl_cmd_get_channel_cipher_suites_rq;
+extern fiid_template_t tmpl_cmd_get_channel_cipher_suites_rs;
+
+extern fiid_template_t tmpl_cmd_get_session_challenge_rq;
+extern fiid_template_t tmpl_cmd_get_session_challenge_rs;
+extern fiid_template_t tmpl_cmd_activate_session_rq;
+extern fiid_template_t tmpl_cmd_activate_session_rs;
+extern fiid_template_t tmpl_cmd_set_session_privilege_level_rq;
+extern fiid_template_t tmpl_cmd_set_session_privilege_level_rs;
+extern fiid_template_t tmpl_cmd_close_session_rq;
+extern fiid_template_t tmpl_cmd_close_session_rs;
+
+extern fiid_template_t tmpl_cmd_set_channel_access_rq;
+extern fiid_template_t tmpl_cmd_set_channel_access_rs;
+extern fiid_template_t tmpl_cmd_get_channel_access_rq;
+extern fiid_template_t tmpl_cmd_get_channel_access_rs;
+extern fiid_template_t tmpl_cmd_get_channel_info_rq;
+extern fiid_template_t tmpl_cmd_get_channel_info_rs;
+
+extern fiid_template_t tmpl_cmd_set_channel_security_keys_rq;
+extern fiid_template_t tmpl_cmd_set_channel_security_keys_rs;
+extern fiid_template_t tmpl_cmd_set_user_access_rq;
+extern fiid_template_t tmpl_cmd_set_user_access_rs;
+extern fiid_template_t tmpl_cmd_get_user_access_rq;
+extern fiid_template_t tmpl_cmd_get_user_access_rs;
+
+extern fiid_template_t tmpl_cmd_set_user_name_rq;
+extern fiid_template_t tmpl_cmd_set_user_name_rs;
+
+extern fiid_template_t tmpl_cmd_get_user_name_rq;
+extern fiid_template_t tmpl_cmd_get_user_name_rs;
+
+extern fiid_template_t tmpl_cmd_set_user_password_rq;
+extern fiid_template_t tmpl_cmd_set_user_password_rs;
+
+int fill_cmd_set_bmc_global_enables (uint8_t receive_message_queue_interrupt,
+ uint8_t event_message_buffer_full_interrupt,
+ uint8_t event_message_buffer,
+ uint8_t system_event_logging,
+ uint8_t oem_0,
+ uint8_t oem_1,
+ uint8_t oem_2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_bmc_global_enables (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_clear_message_flags (uint8_t receive_message_queue,
+ uint8_t event_message_buffer,
+ uint8_t watchdog_pre_timeout_interrupt_flag,
+ uint8_t oem_0,
+ uint8_t oem_1,
+ uint8_t oem_2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_message_flags (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_enable_message_channel_receive (uint8_t channel_number,
+ uint8_t channel_operation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_message (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_send_message (uint8_t channel_number,
+ uint8_t message_authentication,
+ uint8_t message_encryption,
+ uint8_t tracking_operation,
+ const void *message_data,
+ unsigned int message_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_read_event_message_buffer (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_system_interface_capabilities (uint8_t system_interface,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_bt_interface_capabilities (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_master_write_read (uint8_t bus_type,
+ uint8_t bus_id,
+ uint8_t channel_number,
+ uint8_t slave_address,
+ uint8_t read_count,
+ const void *data,
+ unsigned int data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_authentication_capabilities (uint8_t channel_number,
+ uint8_t maximum_privilege_level,
+ uint8_t get_ipmi_v20_extended_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_system_guid (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters (uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_set_in_progress (uint8_t state,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_system_firmware_version_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_system_firmware_version (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_system_name_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_system_name (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_primary_operating_system_name_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_primary_operating_system_name (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_operating_system_name_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_operating_system_name (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_present_os_version_number_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_present_os_version_number (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_bmc_url_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_bmc_url (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (uint8_t set_selector,
+ uint8_t encoding,
+ uint8_t string_length,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_system_info_parameters_base_os_hypervisor_url (uint8_t set_selector,
+ const void *string_block,
+ unsigned int string_block_length,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_system_info_parameters (uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_cipher_suites (uint8_t channel_number,
+ uint8_t payload_type,
+ uint8_t list_index,
+ uint8_t list_algorithm_type,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_session_challenge (uint8_t authentication_type,
+ const char *user_name,
+ unsigned int user_name_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_activate_session (uint8_t authentication_type,
+ uint8_t maximum_privilege_level,
+ const void *challenge_string,
+ unsigned int challenge_string_len,
+ uint32_t initial_outbound_sequence_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_session_privilege_level (uint8_t privilege_level,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_close_session (uint32_t session_id,
+ uint8_t *session_handle,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_channel_access (uint8_t channel_number,
+ uint8_t ipmi_messaging_access_mode,
+ uint8_t user_level_authentication,
+ uint8_t per_message_authentication,
+ uint8_t pef_alerting,
+ uint8_t channel_access_set,
+ uint8_t channel_privilege_level_limit,
+ uint8_t channel_privilege_level_limit_set,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_access (uint8_t channel_number,
+ uint8_t channel_access_get,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_info (uint8_t channel_number, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_channel_security_keys (uint8_t channel_number,
+ uint8_t operation,
+ uint8_t key_id,
+ const void *key_value,
+ unsigned int key_value_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_user_access (uint8_t channel_number,
+ uint8_t user_ipmi_messaging,
+ uint8_t user_link_authentication,
+ uint8_t user_restricted_to_callback,
+ uint8_t change_bits_in_byte,
+ uint8_t user_id,
+ uint8_t user_privilege_level_limit,
+ uint8_t user_session_limit,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_user_access (uint8_t channel_number,
+ uint8_t user_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_user_name (uint8_t user_id,
+ const char *user_name,
+ unsigned int user_name_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_user_name (uint8_t user_id, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_user_password (uint8_t user_id,
+ uint8_t password_size,
+ uint8_t operation,
+ const char *password,
+ unsigned int password_len,
+ fiid_obj_t obj_cmd_rq);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_MESSAGING_SUPPORT_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h
new file mode 100644
index 00000000..fd360cbf
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h
@@ -0,0 +1,537 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H
+#define IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * Intel Node Manager
+ *
+ * For Intel Chips, not just Intel Motherboards. Confirmed for:
+ *
+ * Intel S5500WB/Penguin Computing Relion 700
+ * Intel S2600JF/Appro 512X
+ * Intel S2600KP
+ * Intel S2600WT2
+ * Intel S2600WTT
+ * Inventec 5441/Dell Xanadu II
+ * Inventec 5442/Dell Xanadu III
+ * Quanta S99Q/Dell FS12-TY
+ * Quanta QSSC-S4R/Appro GB812X-CN
+ */
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MIN 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MAX 0xF
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM 0x02
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_RESERVED 0x03
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM 0x04
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_DISABLE_NODE_MANAGER_POLICY_CONTROL 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_ENABLE_NODE_MANAGER_POLICY_CONTROL 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_DISABLE_NODE_MANAGER_POLICIES 0x02
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_ENABLE_NODE_MANAGER_POLITICES 0x03
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_DISABLE_NODE_MANAGER_POLICIES 0x04
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_ENABLE_NODE_MANAGER_POLITICES 0x05
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_DISABLE_NODE_MANAGER_POLICY_CONTROL \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_ENABLE_NODE_MANAGER_POLICY_CONTROL \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_DISABLE_NODE_MANAGER_POLICIES \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_ENABLE_NODE_MANAGER_POLITICES \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_DISABLE_NODE_MANAGER_POLICIES \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_ENABLE_NODE_MANAGER_POLITICES) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED) ? 1 : 0)
+
+/* Celsius */
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER 0x1
+/* 1/10 seconds units */
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT 0x2
+/* 1/10 seconds units */
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER 0x3
+/* Only to domain 0 = Entire Platform */
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY 0x4
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_POLICY_POINTED_BY_POLICY_ID_SHALL_BE_REMOVED 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_POLICY_POINTED_BY_POLICY_ID_SHALL_BE_REMOVED \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY) ? 1 : 0)
+
+/* achu: not in spec, assume it to be true */
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_PER_DOMAIN_NODE_MANAGER_POLICY_CONTROL_ENABLED 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_PER_DOMAIN_NODE_MANAGER_POLICY_CONTROL_DISABLED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_GLOBAL_NODE_MANAGER_POLICY_CONTROL_ENABLED 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_GLOBAL_NODE_MANAGER_POLICY_CONTROL_DISABLED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CREATED_AND_MANAGED_BY_OTHER_MANAGEMENT 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_NOT_CREATED_AND_MANAGED_BY_OTHER_MANAGEMENT 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE 0x02
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_POWER_OPTIMIZED_MODE 0
+#define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_PERFORMANCE_OPTIMIZED_MODE 1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_POWER_OPTIMIZED_MODE \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_PERFORMANCE_OPTIMIZED_MODE) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_MAX 3
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MIN 0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MAX 239
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID(__val) \
+ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MIN + 1) \
+ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MAX) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MIN 0
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MAX 240
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID(__val) \
+ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MIN + 1) \
+ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MAX) ? 1 : 0)
+
+/* achu: not in spec, assume it to be true */
+#define IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX 5
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS 0x1B
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_RESPONSE_TIME_STATISTICS 0x1C
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS 0x1D
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS 0x1E
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS 0x1F
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_RESPONSE_TIME_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS 0x02
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS 0x03
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS 0x04
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS 0x05
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS 0x06
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS 0x11
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS 0x12
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS 0x13
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS 0x1B
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS 0x1C
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS 0x1D
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS 0x1E
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS 0x1F
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_GLOBAL_ADMINISTRATIVE_STATE_ENABLED 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_GLOBAL_ADMINISTRATIVE_STATE_OTHERWISE 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_OPERATIONAL_STATE_ACTIVELY_MONITORING_DEFINED_TRIGGER 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_OPERATIONAL_STATE_SUSPENDED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_MEASUREMENTS_STATE_IN_PROGRESS 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_MEASUREMENTS_STATE_SUSPENDED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ACTIVATION_STATE_TRIGGERED_AND_ACTIVELY_LIMITING_TARGET 0x1
+#define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ACTIVATION_STATE_NOT_TRIGGERED 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_TYPE_PLATFORM_POWER_LIMITING 0 /* Legacy, no longer in 2.0 spec */
+#define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_TYPE_CPU_POWER_LIMITING 1 /* Legacy, no longer in 2.0 spec */
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_WALL_INPUT_POWER_PSU_INPUT_POWER 0
+#define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_DC_POWER_PSU_OUTPUT_POWER_OR_BLADED_SYSTEM 1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_0 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_5 0x02
+#define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 0x03
+#define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5 0x04
+#define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0 0x05
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_1_0 0x01
+#define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_2_0 0x02
+#define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_3_0 0x03
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER) ? 1 : 0)
+
+/* legacy names */
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_REGISTER_ALERT_RECEIVER IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_UNREGISTER_ALERT_RECEIVER IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_VALID(__val) \
+ IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID((__val))
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_USE_VOLATILE_ALERT_STRING 0x00
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MIN 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MAX 0x7F
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_VALID(__val) \
+ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MIN + 1) \
+ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MAX) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR 0x1
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_VALID(__val) \
+ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_VALID 0x0
+#define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_INVALID 0x1
+
+/* legacy names */
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_CONFIGURATION_VALID IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_VALID
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_CONFIGURATION_INVALID IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_INVALID
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_SELECTOR_OPERATOR_USE_VOLATILE_DESTINATION_INFO 0x0
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MIN 0
+#define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MAX 7
+#define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS 0xFF
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID(__val) \
+ ((((__val) >= IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MIN \
+ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MAX) \
+ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED 0x00
+#define IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION 0xFF
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_SET_ACTIVE_CORES_CONFIGURATION_VALID(__val) \
+ (((__val) != IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED \
+ && ((__val) == IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION \
+ || (__val) > 0)) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_GET_ACTIVE_CORES_CONFIGURATION_VALID(__val) \
+ (((__val) != IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED) ? 1 : 0)
+
+#define IPMI_OEM_INTEL_NODE_MANAGER_TURBO_RATIO_LIMIT_RESTORE_DEFAULT_SETTINGS 0x00
+
+/*
+ * 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_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq;
+extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs;
+
+int fill_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (uint8_t policy_enable_disable,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_policy (uint8_t domain_id,
+ uint8_t policy_enabled,
+ uint8_t policy_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_configuration_action,
+ uint8_t aggressive_cpu_power_correction,
+ uint8_t policy_storage_option,
+ uint8_t policy_exception_actions_send_alert,
+ uint8_t policy_exception_actions_shutdown_system,
+ uint8_t policy_power_domain,
+ uint16_t policy_target_limit,
+ uint32_t correction_time_limit,
+ uint16_t policy_trigger_limit,
+ uint16_t statistics_reporting_period,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (uint8_t domain_id,
+ uint8_t policy_enabled,
+ uint8_t policy_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_configuration_action,
+ uint8_t aggressive_cpu_power_correction,
+ uint8_t policy_storage_option,
+ uint8_t policy_exception_actions_send_alert,
+ uint8_t policy_exception_actions_shutdown_system,
+ uint8_t policy_power_domain,
+ uint8_t platform_booting_mode,
+ uint8_t cores_disabled,
+ uint32_t correction_time_limit,
+ uint16_t policy_trigger_limit,
+ uint16_t statistics_reporting_period,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_policy (uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (uint8_t domain_id,
+ uint8_t policy_id,
+ uint16_t *alert_threshold1,
+ uint16_t *alert_threshold2,
+ uint16_t *alert_threshold3,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (uint8_t domain_id,
+ uint8_t policy_id,
+ uint8_t *policy1_suspend_start_time,
+ uint8_t *policy1_suspend_stop_time,
+ uint8_t *policy1_suspend_period_recurrence_monday,
+ uint8_t *policy1_suspend_period_recurrence_tuesday,
+ uint8_t *policy1_suspend_period_recurrence_wednesday,
+ uint8_t *policy1_suspend_period_recurrence_thursday,
+ uint8_t *policy1_suspend_period_recurrence_friday,
+ uint8_t *policy1_suspend_period_recurrence_saturday,
+ uint8_t *policy1_suspend_period_recurrence_sunday,
+ uint8_t *policy2_suspend_start_time,
+ uint8_t *policy2_suspend_stop_time,
+ uint8_t *policy2_suspend_period_recurrence_monday,
+ uint8_t *policy2_suspend_period_recurrence_tuesday,
+ uint8_t *policy2_suspend_period_recurrence_wednesday,
+ uint8_t *policy2_suspend_period_recurrence_thursday,
+ uint8_t *policy2_suspend_period_recurrence_friday,
+ uint8_t *policy2_suspend_period_recurrence_saturday,
+ uint8_t *policy2_suspend_period_recurrence_sunday,
+ uint8_t *policy3_suspend_start_time,
+ uint8_t *policy3_suspend_stop_time,
+ uint8_t *policy3_suspend_period_recurrence_monday,
+ uint8_t *policy3_suspend_period_recurrence_tuesday,
+ uint8_t *policy3_suspend_period_recurrence_wednesday,
+ uint8_t *policy3_suspend_period_recurrence_thursday,
+ uint8_t *policy3_suspend_period_recurrence_friday,
+ uint8_t *policy3_suspend_period_recurrence_saturday,
+ uint8_t *policy3_suspend_period_recurrence_sunday,
+ uint8_t *policy4_suspend_start_time,
+ uint8_t *policy4_suspend_stop_time,
+ uint8_t *policy4_suspend_period_recurrence_monday,
+ uint8_t *policy4_suspend_period_recurrence_tuesday,
+ uint8_t *policy4_suspend_period_recurrence_wednesday,
+ uint8_t *policy4_suspend_period_recurrence_thursday,
+ uint8_t *policy4_suspend_period_recurrence_friday,
+ uint8_t *policy4_suspend_period_recurrence_saturday,
+ uint8_t *policy4_suspend_period_recurrence_sunday,
+ uint8_t *policy5_suspend_start_time,
+ uint8_t *policy5_suspend_stop_time,
+ uint8_t *policy5_suspend_period_recurrence_monday,
+ uint8_t *policy5_suspend_period_recurrence_tuesday,
+ uint8_t *policy5_suspend_period_recurrence_wednesday,
+ uint8_t *policy5_suspend_period_recurrence_thursday,
+ uint8_t *policy5_suspend_period_recurrence_friday,
+ uint8_t *policy5_suspend_period_recurrence_saturday,
+ uint8_t *policy5_suspend_period_recurrence_sunday,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_reset_node_manager_statistics (uint8_t mode,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_statistics (uint8_t mode,
+ uint8_t domain_id,
+ uint8_t policy_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_capabilities (uint8_t domain_id,
+ uint8_t policy_trigger_type,
+ uint8_t policy_type,
+ uint8_t policy_power_domain,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_version (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (uint8_t domain_id,
+ uint16_t minimum_power_draw,
+ uint16_t maximum_power_draw,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination (uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t destination_information,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t slave_address,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (uint8_t channel_number,
+ uint8_t alert_receiver_deactivation,
+ uint8_t destination_selector,
+ uint8_t alert_string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_node_manager_alert_destination (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (uint8_t cpu_socket_number,
+ uint8_t active_cores_configuration,
+ uint8_t turbo_ratio_limit,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (uint8_t cpu_socket_number,
+ uint8_t active_cores_configuration,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_oem_intel_node_manager_get_limiting_policy_id (uint8_t domain_id,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-pef-and-alerting-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-pef-and-alerting-cmds.h
new file mode 100644
index 00000000..fe49424e
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-pef-and-alerting-cmds.h
@@ -0,0 +1,494 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_PEF_AND_ALERTING_CMDS_H
+#define IPMI_PEF_AND_ALERTING_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02
+
+#define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMPLETE \
+ || (__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \
+ || (__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_PEF_POSTPONE_TIMER_DISABLE 0x00
+#define IPMI_PEF_POSTPONE_TIMER_TEMPORARY_DISABLE 0xFE
+#define IPMI_PEF_POSTPONE_TIMER_GET_PRESENT_COUNTDOWN_VALUE 0xFF
+
+#define IPMI_PEF_ENABLE 0x1
+#define IPMI_PEF_DISABLE 0x0
+
+#define IPMI_PEF_VALID(__val) \
+ (((__val) == IPMI_PEF_ENABLE \
+ || (__val) == IPMI_PEF_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_ENABLE 0x1
+#define IPMI_PEF_DISABLE 0x0
+
+#define IPMI_PEF_VALID(__val) \
+ (((__val) == IPMI_PEF_ENABLE \
+ || (__val) == IPMI_PEF_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_EVENT_MESSAGES_ENABLE 0x1
+#define IPMI_PEF_EVENT_MESSAGES_DISABLE 0x0
+
+#define IPMI_PEF_EVENT_MESSAGES_VALID(__val) \
+ (((__val) == IPMI_PEF_EVENT_MESSAGES_ENABLE \
+ || (__val) == IPMI_PEF_EVENT_MESSAGES_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_STARTUP_DELAY_ENABLE 0x1
+#define IPMI_PEF_STARTUP_DELAY_DISABLE 0x0
+
+#define IPMI_PEF_STARTUP_DELAY_VALID(__val) \
+ (((__val) == IPMI_PEF_STARTUP_DELAY_ENABLE \
+ || (__val) == IPMI_PEF_STARTUP_DELAY_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_ALERT_STARTUP_DELAY_ENABLE 0x1
+#define IPMI_PEF_ALERT_STARTUP_DELAY_DISABLE 0x0
+
+#define IPMI_PEF_ALERT_STARTUP_DELAY_VALID(__val) \
+ (((__val) == IPMI_PEF_ALERT_STARTUP_DELAY_ENABLE \
+ || (__val) == IPMI_PEF_ALERT_STARTUP_DELAY_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_ALERT_ACTION_ENABLE 0x1
+#define IPMI_PEF_ALERT_ACTION_DISABLE 0x0
+
+#define IPMI_PEF_ALERT_ACTION_VALID(__val) \
+ (((__val) == IPMI_PEF_ALERT_ACTION_ENABLE \
+ || (__val) == IPMI_PEF_ALERT_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_POWER_DOWN_ACTION_ENABLE 0x1
+#define IPMI_PEF_POWER_DOWN_ACTION_DISABLE 0x0
+
+#define IPMI_PEF_POWER_DOWN_ACTION_VALID(__val) \
+ (((__val) == IPMI_PEF_POWER_DOWN_ACTION_ENABLE \
+ || (__val) == IPMI_PEF_POWER_DOWN_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_RESET_ACTION_ENABLE 0x1
+#define IPMI_PEF_RESET_ACTION_DISABLE 0x0
+
+#define IPMI_PEF_RESET_ACTION_VALID(__val) \
+ (((__val) == IPMI_PEF_RESET_ACTION_ENABLE \
+ || (__val) == IPMI_PEF_RESET_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_POWER_CYCLE_ACTION_ENABLE 0x1
+#define IPMI_PEF_POWER_CYCLE_ACTION_DISABLE 0x0
+
+#define IPMI_PEF_POWER_CYCLE_ACTION_VALID(__val) \
+ (((__val) == IPMI_PEF_POWER_CYCLE_ACTION_ENABLE \
+ || (__val) == IPMI_PEF_POWER_CYCLE_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_OEM_ACTION_ENABLE 0x1
+#define IPMI_PEF_OEM_ACTION_DISABLE 0x0
+
+#define IPMI_PEF_OEM_ACTION_VALID(__val) \
+ (((__val) == IPMI_PEF_OEM_ACTION_ENABLE \
+ || (__val) == IPMI_PEF_OEM_ACTION_DISABLE) ? 1 : 0)
+
+#define IPMI_PEF_DIAGNOSTIC_INTERRUPT_ENABLE 0x1
+#define IPMI_PEF_DIAGNOSTIC_INTERRUPT_DISABLE 0x0
+
+#define IPMI_PEF_DIAGNOSTIC_INTERRUPT_VALID(__val) \
+ (((__val) == IPMI_PEF_DIAGNOSTIC_INTERRUPT_ENABLE \
+ || (__val) == IPMI_PEF_DIAGNOSTIC_INTERRUPT_DISABLE) ? 1 : 0)
+
+#define IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER 0x2
+#define IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER 0x0
+
+#define IPMI_FILTER_CONFIGURATION_FILTER_TYPE_VALID(__val) \
+ (((__val) == IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER \
+ || (__val) == IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER) ? 1 : 0)
+
+#define IPMI_FILTER_CONFIGURATION_FILTER_ENABLE 0x1
+#define IPMI_FILTER_CONFIGURATION_FILTER_DISABLE 0x0
+
+#define IPMI_FILTER_CONFIGURATION_FILTER_VALID(__val) \
+ (((__val) == IPMI_FILTER_CONFIGURATION_FILTER_ENABLE \
+ || (__val) == IPMI_FILTER_CONFIGURATION_FILTER_DISABLE) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_ALERT 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_ALERT 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_ALERT_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_ALERT \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_ALERT) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_POWER_OFF 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_POWER_OFF 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_POWER_OFF_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_POWER_OFF \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_POWER_OFF) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_RESET 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_RESET 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_RESET_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_RESET \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_RESET) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_POWER_CYCLE 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_POWER_CYCLE 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_POWER_CYCLE_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_POWER_CYCLE \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_POWER_CYCLE) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_OEM_ACTION 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_OEM 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_OEM_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_OEM_ACTION \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_OEM) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_DIAGNOSTIC_INTERRUPT 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_DIAGNOSTIC_INTERRUPT) ? 1 : 0)
+
+#define IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION 0x1
+#define IPMI_EVENT_FILTER_ACTION_NO_GROUP_CONTROL_OPERATION 0x0
+
+#define IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION_VALID(__val) \
+ (((__val) == IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION \
+ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_GROUP_CONTROL_OPERATION) ? 1 : 0)
+
+#define IPMI_EVENT_SEVERITY_UNSPECIFIED 0x00
+#define IPMI_EVENT_SEVERITY_MONITOR 0x01
+#define IPMI_EVENT_SEVERITY_INFORMATION 0x02
+#define IPMI_EVENT_SEVERITY_OK 0x04
+#define IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION 0x08
+#define IPMI_EVENT_SEVERITY_CRITICAL_CONDITION 0x10
+#define IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION 0x20
+
+#define IPMI_EVENT_SEVERITY_VALID(__val) \
+ (((__val) == IPMI_EVENT_SEVERITY_UNSPECIFIED \
+ || (__val) == IPMI_EVENT_SEVERITY_MONITOR \
+ || (__val) == IPMI_EVENT_SEVERITY_INFORMATION \
+ || (__val) == IPMI_EVENT_SEVERITY_OK \
+ || (__val) == IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION \
+ || (__val) == IPMI_EVENT_SEVERITY_CRITICAL_CONDITION \
+ || (__val) == IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION) ? 1 : 0)
+
+#define IPMI_EVENT_SENSOR_TYPE_RESERVED IPMI_SENSOR_TYPE_RESERVED
+#define IPMI_EVENT_SENSOR_TYPE_TEMPERATURE IPMI_SENSOR_TYPE_TEMPERATURE
+#define IPMI_EVENT_SENSOR_TYPE_VOLTAGE IPMI_SENSOR_TYPE_VOLTAGE
+#define IPMI_EVENT_SENSOR_TYPE_CURRENT IPMI_SENSOR_TYPE_CURRENT
+#define IPMI_EVENT_SENSOR_TYPE_FAN IPMI_SENSOR_TYPE_FAN
+#define IPMI_EVENT_SENSOR_TYPE_PHYSICAL_SECURITY IPMI_SENSOR_TYPE_PHYSICAL_SECURITY
+#define IPMI_EVENT_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT
+#define IPMI_EVENT_SENSOR_TYPE_PROCESSOR IPMI_SENSOR_TYPE_PROCESSOR
+#define IPMI_EVENT_SENSOR_TYPE_POWER_SUPPLY IPMI_SENSOR_TYPE_POWER_SUPPLY
+#define IPMI_EVENT_SENSOR_TYPE_POWER_UNIT IPMI_SENSOR_TYPE_POWER_UNIT
+#define IPMI_EVENT_SENSOR_TYPE_COOLING_DEVICE IPMI_SENSOR_TYPE_COOLING_DEVICE
+#define IPMI_EVENT_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR
+#define IPMI_EVENT_SENSOR_TYPE_MEMORY IPMI_SENSOR_TYPE_MEMORY
+#define IPMI_EVENT_SENSOR_TYPE_DRIVE_SLOT IPMI_SENSOR_TYPE_DRIVE_SLOT
+#define IPMI_EVENT_SENSOR_TYPE_POST_MEMORY_RESIZE IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE
+#define IPMI_EVENT_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS
+#define IPMI_EVENT_SENSOR_TYPE_EVENT_LOGGING_DISABLED IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED
+#define IPMI_EVENT_SENSOR_TYPE_WATCHDOG1 IPMI_SENSOR_TYPE_WATCHDOG1
+#define IPMI_EVENT_SENSOR_TYPE_SYSTEM_EVENT IPMI_SENSOR_TYPE_SYSTEM_EVENT
+#define IPMI_EVENT_SENSOR_TYPE_CRITICAL_INTERRUPT IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT
+#define IPMI_EVENT_SENSOR_TYPE_BUTTON_SWITCH IPMI_SENSOR_TYPE_BUTTON_SWITCH
+#define IPMI_EVENT_SENSOR_TYPE_MODULE_BOARD IPMI_SENSOR_TYPE_MODULE_BOARD
+#define IPMI_EVENT_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR
+#define IPMI_EVENT_SENSOR_TYPE_ADD_IN_CARD IPMI_SENSOR_TYPE_ADD_IN_CARD
+#define IPMI_EVENT_SENSOR_TYPE_CHASSIS IPMI_SENSOR_TYPE_CHASSIS
+#define IPMI_EVENT_SENSOR_TYPE_CHIP_SET IPMI_SENSOR_TYPE_CHIP_SET
+#define IPMI_EVENT_SENSOR_TYPE_OTHER_FRU IPMI_SENSOR_TYPE_OTHER_FRU
+#define IPMI_EVENT_SENSOR_TYPE_CABLE_INTERCONNECT IPMI_SENSOR_TYPE_CABLE_INTERCONNECT
+#define IPMI_EVENT_SENSOR_TYPE_TERMINATOR IPMI_SENSOR_TYPE_TERMINATOR
+#define IPMI_EVENT_SENSOR_TYPE_SYSTEM_BOOT_INITIATED IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED
+#define IPMI_EVENT_SENSOR_TYPE_BOOT_ERROR IPMI_SENSOR_TYPE_BOOT_ERROR
+#define IPMI_EVENT_SENSOR_TYPE_OS_BOOT IPMI_SENSOR_TYPE_OS_BOOT
+#define IPMI_EVENT_SENSOR_TYPE_OS_CRITICAL_STOP IPMI_SENSOR_TYPE_OS_CRITICAL_STOP
+#define IPMI_EVENT_SENSOR_TYPE_SLOT_CONNECTOR IPMI_SENSOR_TYPE_SLOT_CONNECTOR
+#define IPMI_EVENT_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE
+#define IPMI_EVENT_SENSOR_TYPE_WATCHDOG2 IPMI_SENSOR_TYPE_WATCHDOG2
+#define IPMI_EVENT_SENSOR_TYPE_PLATFORM_ALERT IPMI_SENSOR_TYPE_PLATFORM_ALERT
+#define IPMI_EVENT_SENSOR_TYPE_ENTITY_PRESENCE IPMI_SENSOR_TYPE_ENTITY_PRESENCE
+#define IPMI_EVENT_SENSOR_TYPE_MONITOR_ASIC_IC IPMI_SENSOR_TYPE_MONITOR_ASIC_IC
+#define IPMI_EVENT_SENSOR_TYPE_LAN IPMI_SENSOR_TYPE_LAN
+#define IPMI_EVENT_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH
+#define IPMI_EVENT_SENSOR_TYPE_BATTERY IPMI_SENSOR_TYPE_BATTERY
+#define IPMI_EVENT_SENSOR_TYPE_SESSION_AUDIT IPMI_SENSOR_TYPE_SESSION_AUDIT
+#define IPMI_EVENT_SENSOR_TYPE_VERSION_CHANGE IPMI_SENSOR_TYPE_VERSION_CHANGE
+#define IPMI_EVENT_SENSOR_TYPE_FRU_STATE IPMI_SENSOR_TYPE_FRU_STATE
+#define IPMI_EVENT_SENSOR_TYPE_ANY 0xff
+
+#define IPMI_STRING_SELECTOR_MIN 0x00
+#define IPMI_STRING_SELECTOR_MAX 0x7F
+#define IPMI_STRING_SELECTOR_VOLATILE 0x0
+
+/* To avoid gcc warnings, add +1 in comparison */
+#define IPMI_STRING_SELECTOR_VALID(__val) \
+ (((__val+1) >= (IPMI_STRING_SELECTOR_MIN + 1) \
+ && (__val) <= IPMI_STRING_SELECTOR_MAX) ? 1 : 0)
+
+#define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_SOFTWARE 0x0
+#define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_BMC 0x1
+
+#define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_VALID(__val) \
+ (((__val) == IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_SOFTWARE \
+ || (__val) == IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_BMC) ? 1 : 0)
+
+#define IPMI_ALERT_IMMEDIATE_OPERATION_INITIATE_ALERT 0x0
+#define IPMI_ALERT_IMMEDIATE_OPERATION_GET_ALERT_IMMEDIATE_STATUS 0x1
+#define IPMI_ALERT_IMMEDIATE_OPERATION_CLEAR_ALERT_IMMEDIATE_STATUS 0x2
+#define IPMI_ALERT_IMMEDIATE_OPERATION_RESERVED 0x3
+
+#define IPMI_ALERT_IMMEDIATE_OPERATION_VALID(__val) \
+ (((__val) == IPMI_ALERT_IMMEDIATE_OPERATION_INITIATE_ALERT \
+ || (__val) == IPMI_ALERT_IMMEDIATE_OPERATION_GET_ALERT_IMMEDIATE_STATUS \
+ || (__val) == IPMI_ALERT_IMMEDIATE_OPERATION_CLEAR_ALERT_IMMEDIATE_STATUS) ? 1 : 0)
+
+#define IPMI_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR 0x1
+#define IPMI_DO_NOT_SEND_AN_ALERT_STRING 0x0
+
+#define IPMI_SEND_ALERT_STRING_VALID(__val) \
+ (((__val) == IPMI_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR \
+ || (__val) == IPMI_DO_NOT_SEND_AN_ALERT_STRING) ? 1 : 0)
+
+#define IPMI_GET_PEF_PARAMETER 0x0
+#define IPMI_GET_PEF_PARAMETER_REVISION_ONLY 0x1
+
+#define IPMI_GET_PEF_PARAMETER_VALID(__val) \
+ (((__val) == IPMI_GET_PEF_PARAMETER \
+ || (__val) == IPMI_GET_PEF_PARAMETER_REVISION_ONLY) ? 1 : 0)
+
+#define IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE 16
+#define IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE_VALID(__val) \
+ (((__val) <= IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE) ? 1 : 0)
+
+#define IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION 0x0
+#define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY 0x1
+#define IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES 0x2
+#define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL 0x3
+#define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE 0x4
+
+#define IPMI_ALERT_POLICY_TABLE_POLICY_TYPE_VALID(__val) \
+ (((__val) == IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION \
+ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY \
+ || (__val) == IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES \
+ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL \
+ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE) ? 1 : 0)
+
+#define IPMI_ALERT_POLICY_DISABLED 0x0
+#define IPMI_ALERT_POLICY_ENABLED 0x1
+#define IPMI_ALERT_POLICY_ENABLED_DISABLED_VALID(__val) \
+ (((__val) == IPMI_ALERT_POLICY_DISABLED \
+ || (__val) == IPMI_ALERT_POLICY_ENABLED) ? 1 : 0)
+
+#define IPMI_EVENT_SPECIFIC_ALERT_STRING_NO 0x0
+#define IPMI_EVENT_SPECIFIC_ALERT_STRING_YES 0x1
+#define IPMI_EVENT_SPECIFIC_ALERT_STRING_VALID(__val) \
+ (((__val) == IPMI_EVENT_SPECIFIC_ALERT_STRING_NO \
+ || (__val) == IPMI_EVENT_SPECIFIC_ALERT_STRING_YES) ? 1 : 0)
+
+/*
+ * 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_pef_capabilities_rq;
+extern fiid_template_t tmpl_cmd_get_pef_capabilities_rs;
+
+extern fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rq;
+extern fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rs;
+
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_control_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq;
+extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq;
+
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_control_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_data1_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs;
+extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs;
+
+extern fiid_template_t tmpl_cmd_set_last_processed_event_id_rq;
+extern fiid_template_t tmpl_cmd_set_last_processed_event_id_rs;
+extern fiid_template_t tmpl_cmd_get_last_processed_event_id_rq;
+extern fiid_template_t tmpl_cmd_get_last_processed_event_id_rs;
+
+extern fiid_template_t tmpl_cmd_alert_immediate_rq;
+extern fiid_template_t tmpl_cmd_alert_immediate_rs;
+
+extern fiid_template_t tmpl_cmd_pet_acknowledge_rq;
+extern fiid_template_t tmpl_cmd_pet_acknowledge_rs;
+
+int fill_cmd_get_pef_capabilities (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_arm_pef_postpone_timer (uint8_t pef_postpone_timeout,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters (uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_set_in_progress (uint8_t state,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_pef_control (uint8_t pef,
+ uint8_t pef_event_messages,
+ uint8_t pef_startup_delay,
+ uint8_t pef_alert_startup_delay,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_pef_action_global_control (uint8_t alert_action,
+ uint8_t power_down_action,
+ uint8_t reset_action,
+ uint8_t power_cycle_action,
+ uint8_t oem_action,
+ uint8_t diagnostic_interrupt,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_pef_startup_delay (uint8_t pef_startup_delay,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (uint8_t pef_alert_startup_delay,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_event_filter_table (uint8_t filter_number,
+ uint8_t filter_configuration_type,
+ uint8_t filter_configuration_enable,
+ uint8_t event_filter_action_alert,
+ uint8_t event_filter_action_power_off,
+ uint8_t event_filter_action_reset,
+ uint8_t event_filter_action_power_cycle,
+ uint8_t event_filter_action_oem,
+ uint8_t event_filter_action_diagnostic_interrupt,
+ uint8_t event_filter_action_group_control_operation,
+ uint8_t alert_policy_number_policy_number,
+ uint8_t alert_policy_number_group_control_selector,
+ uint8_t event_severity,
+ uint8_t generator_id_byte1,
+ uint8_t generator_id_byte2,
+ uint8_t sensor_type,
+ uint8_t sensor_number,
+ uint8_t event_trigger,
+ uint16_t event_data1_offset_mask,
+ uint8_t event_data1_AND_mask,
+ uint8_t event_data1_compare1,
+ uint8_t event_data1_compare2,
+ uint8_t event_data2_AND_mask,
+ uint8_t event_data2_compare1,
+ uint8_t event_data2_compare2,
+ uint8_t event_data3_AND_mask,
+ uint8_t event_data3_compare1,
+ uint8_t event_data3_compare2,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_event_filter_table_data1 (uint8_t filter_number,
+ uint8_t filter_configuration_type,
+ uint8_t filter_configuration_enable,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_alert_string_keys (uint8_t string_selector,
+ uint8_t filter_number,
+ uint8_t set_number_for_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_alert_strings (uint8_t string_selector,
+ uint8_t block_selector,
+ const uint8_t *string_data,
+ unsigned int string_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_pef_configuration_parameters_alert_policy_table (uint8_t alert_policy_entry_number,
+ uint8_t policy_type,
+ uint8_t policy_enabled,
+ uint8_t policy_number,
+ uint8_t destination_selector,
+ uint8_t channel_number,
+ uint8_t alert_string_set_selector,
+ uint8_t event_specific_alert_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_pef_configuration_parameters (uint8_t parameter_selector,
+ uint8_t get_parameter,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_last_processed_event_id (uint8_t set_record_id_for_last_record,
+ uint16_t record_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_last_processed_event_id (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_alert_immediate (uint8_t channel_number,
+ uint8_t destination_selector,
+ uint8_t operation,
+ uint8_t string_selector,
+ uint8_t send_alert_string,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_pet_acknowledge (uint16_t sequence_number,
+ uint32_t local_timestamp,
+ uint8_t event_source_type,
+ uint8_t sensor_device,
+ uint8_t sensor_number,
+ uint32_t event_data,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_PEF_AND_ALERTING_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h
new file mode 100644
index 00000000..dc74b447
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H
+#define IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/* achu: 4 bit field is 1 based
+ *
+ * note that Get Payload Activation Status returns instance status for
+ * 16 instances, which is not possible.
+ */
+#define IPMI_PAYLOAD_INSTANCE_MIN 1
+#define IPMI_PAYLOAD_INSTANCE_MAX 15
+
+#define IPMI_PAYLOAD_INSTANCE_VALID(__val) \
+ (((__val) >= IPMI_PAYLOAD_INSTANCE_MIN \
+ || (__val) <= IPMI_PAYLOAD_INSTANCE_MAX) ? 1 : 0)
+
+#define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_ASSERTED 0x0
+#define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_DEASSERTED 0x1
+
+#define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_VALID(__val) \
+ (((__val) == IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_ASSERTED \
+ || (__val) == IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_DEASSERTED) ? 1 : 0)
+
+#define IPMI_SERIAL_MODEM_ALERTS_FAIL_WHILE_SOL_ACTIVE 0x0
+#define IPMI_SERIAL_MODEM_ALERTS_DEFERRED_WHILE_SOL_ACTIVE 0x1
+#define IPMI_SERIAL_MODEM_ALERTS_SUCCEED_WHILE_SOL_ACTIVE 0x2
+#define IPMI_SERIAL_MODEM_ALERTS_RESERVED 0x3
+
+#define IPMI_SERIAL_MODEM_ALERTS_VALID(__val) \
+ (((__val) == IPMI_SERIAL_MODEM_ALERTS_FAIL_WHILE_SOL_ACTIVE \
+ || (__val) == IPMI_SERIAL_MODEM_ALERTS_DEFERRED_WHILE_SOL_ACTIVE \
+ || (__val) == IPMI_SERIAL_MODEM_ALERTS_SUCCEED_WHILE_SOL_ACTIVE) ? 1 : 0)
+
+#define IPMI_TEST_MODE_ACTIVATED 0x1
+#define IPMI_TEST_MODE_DEACTIVATED 0x0
+
+#define IPMI_TEST_MODE_VALID(__val) \
+ (((__val) == IPMI_TEST_MODE_ACTIVATED \
+ || (__val) == IPMI_TEST_MODE_DEACTIVATED) ? 1 : 0)
+
+#define IPMI_ACTIVATE_PAYLOAD_WITH_AUTHENTICATION 0x1
+#define IPMI_ACTIVATE_PAYLOAD_WITHOUT_AUTHENTICATION 0x0
+
+#define IPMI_AUTHENTICATION_ACTIVATION_VALID(__val) \
+ (((__val) == IPMI_ACTIVATE_PAYLOAD_WITH_AUTHENTICATION \
+ || (__val) == IPMI_ACTIVATE_PAYLOAD_WITHOUT_AUTHENTICATION) ? 1 : 0)
+
+#define IPMI_ACTIVATE_PAYLOAD_WITH_ENCRYPTION 0x1
+#define IPMI_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION 0x0
+
+#define IPMI_ENCRYPTION_ACTIVATION_VALID(__val) \
+ (((__val) == IPMI_ACTIVATE_PAYLOAD_WITH_ENCRYPTION \
+ || (__val) == IPMI_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION) ? 1 : 0)
+
+#define IPMI_TEST_MODE_NOT_SUPPORTED 0x0
+#define IPMI_TEST_MODE_ENABLED 0x1
+
+#define IPMI_SUSPEND_ENCRYPTION 0x0
+#define IPMI_RESUME_ENCRYPTION 0x1
+#define IPMI_REGENERATE_INITIALIZATION_VECTOR 0x2
+
+#define IPMI_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_VALID(__val) \
+ (((__val) == IPMI_SUSPEND_ENCRYPTION \
+ || (__val) == IPMI_RESUME_ENCRYPTION \
+ || (__val) == IPMI_REGENERATE_INITIALIZATION_VECTOR) ? 1 : 0)
+
+#define IPMI_SET_USER_PAYLOAD_OPERATION_ENABLE 0x00
+#define IPMI_SET_USER_PAYLOAD_OPERATION_DISABLE 0x01
+
+#define IPMI_SET_USER_PAYLOAD_OPERATION_VALID(__val) \
+ (((__val) == IPMI_SET_USER_PAYLOAD_OPERATION_ENABLE \
+ || (__val) == IPMI_SET_USER_PAYLOAD_OPERATION_DISABLE) ? 1 : 0)
+
+/* achu: See IPMI Spec Set User Payload Access command. Enable may be
+ * 0 or 1, and Disable may be 0 or 1 as well.
+ */
+#define IPMI_PAYLOAD_ACCESS_VALID(__val) \
+ (((__val) == 0 \
+ || (__val) == 1) ? 1 : 0)
+
+/*
+ * 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_activate_payload_rq;
+extern fiid_template_t tmpl_cmd_activate_payload_sol_rq;
+extern fiid_template_t tmpl_cmd_activate_payload_rs;
+extern fiid_template_t tmpl_cmd_activate_payload_sol_rs;
+extern fiid_template_t tmpl_cmd_deactivate_payload_rq;
+extern fiid_template_t tmpl_cmd_deactivate_payload_rs;
+extern fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rq;
+extern fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rq;
+extern fiid_template_t tmpl_cmd_get_payload_activation_status_rq;
+extern fiid_template_t tmpl_cmd_get_payload_activation_status_rs;
+extern fiid_template_t tmpl_cmd_get_payload_instance_info_rq;
+extern fiid_template_t tmpl_cmd_get_payload_instance_info_rs;
+extern fiid_template_t tmpl_cmd_set_user_payload_access_rq;
+extern fiid_template_t tmpl_cmd_set_user_payload_access_rs;
+extern fiid_template_t tmpl_cmd_get_user_payload_access_rq;
+extern fiid_template_t tmpl_cmd_get_user_payload_access_rs;
+extern fiid_template_t tmpl_cmd_get_channel_payload_support_rq;
+extern fiid_template_t tmpl_cmd_get_channel_payload_support_rs;
+extern fiid_template_t tmpl_cmd_get_channel_payload_version_rq;
+extern fiid_template_t tmpl_cmd_get_channel_payload_version_rs;
+extern fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rq;
+extern fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rs;
+
+int fill_cmd_activate_payload (uint8_t payload_type,
+ uint8_t payload_instance,
+ const void *auxiliary_request_data,
+ unsigned int auxiliary_request_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_activate_payload_sol (uint8_t payload_type,
+ uint8_t payload_instance,
+ uint8_t sol_startup_handshake,
+ uint8_t shared_serial_alert_behavior,
+ uint8_t test_mode,
+ uint8_t authentication_activation,
+ uint8_t encryption_activation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_deactivate_payload (uint8_t payload_type,
+ uint8_t payload_instance,
+ uint32_t payload_auxiliary_data,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_suspend_resume_payload_encryption (uint8_t payload_type,
+ uint8_t payload_instance,
+ uint8_t operation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_payload_activation_status (uint8_t payload_type,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_payload_instance_info (uint8_t payload_type,
+ uint8_t payload_instance,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_user_payload_access (uint8_t channel_number,
+ uint8_t user_id,
+ uint8_t operation,
+ uint8_t standard_payload_1,
+ uint8_t standard_payload_2,
+ uint8_t standard_payload_3,
+ uint8_t standard_payload_4,
+ uint8_t standard_payload_5,
+ uint8_t standard_payload_6,
+ uint8_t standard_payload_7,
+ uint8_t oem_payload_0,
+ uint8_t oem_payload_1,
+ uint8_t oem_payload_2,
+ uint8_t oem_payload_3,
+ uint8_t oem_payload_4,
+ uint8_t oem_payload_5,
+ uint8_t oem_payload_6,
+ uint8_t oem_payload_7,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_user_payload_access (uint8_t channel_number,
+ uint8_t user_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_payload_support (uint8_t channel_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_payload_version (uint8_t channel_number,
+ uint8_t payload_type,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_channel_oem_payload_info (uint8_t channel_number,
+ uint8_t payload_type,
+ uint32_t oem_iana,
+ uint16_t oem_payload_id,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sdr-repository-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sdr-repository-cmds.h
new file mode 100644
index 00000000..de022595
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sdr-repository-cmds.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SDR_REPOSITORY_CMDS_H
+#define IPMI_SDR_REPOSITORY_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_UNSPECIFIED 0x0
+#define IPMI_SDR_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x1
+#define IPMI_SDR_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x2
+#define IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x3
+
+#define IPMI_SDR_IPMB_SLAVE_ADDRESS 0x0
+#define IPMI_SDR_SYSTEM_SOFTWARE_ID 0x1
+
+#define IPMI_SDR_RECORD_ID_FIRST 0x0000
+#define IPMI_SDR_RECORD_ID_LAST 0xFFFF
+
+#define IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ 0xFF
+
+/*
+ * 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_sdr_repository_info_rq;
+extern fiid_template_t tmpl_cmd_get_sdr_repository_info_rs;
+
+extern fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rq;
+extern fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rs;
+
+extern fiid_template_t tmpl_cmd_reserve_sdr_repository_rq;
+extern fiid_template_t tmpl_cmd_reserve_sdr_repository_rs;
+
+extern fiid_template_t tmpl_cmd_get_sdr_rq;
+extern fiid_template_t tmpl_cmd_get_sdr_rs;
+
+extern fiid_template_t tmpl_cmd_get_sdr_repository_time_rq;
+extern fiid_template_t tmpl_cmd_get_sdr_repository_time_rs;
+
+extern fiid_template_t tmpl_cmd_set_sdr_repository_time_rq;
+extern fiid_template_t tmpl_cmd_set_sdr_repository_time_rs;
+
+int fill_cmd_get_repository_info (fiid_obj_t obj_cmd_rq);
+int fill_cmd_get_repository_allocation_info (fiid_obj_t obj_cmd_rq);
+int fill_cmd_reserve_sdr_repository (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sdr (uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sdr_repository_time (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sdr_repository_time (uint32_t time, fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SDR_REPOSITORY_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sel-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sel-cmds.h
new file mode 100644
index 00000000..bc542045
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sel-cmds.h
@@ -0,0 +1,150 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SEL_CMDS_H
+#define IPMI_SEL_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY 0x0000
+#define IPMI_SEL_GET_RECORD_ID_LAST_ENTRY 0xFFFF
+
+#define IPMI_SEL_CLEAR_OPERATION_INITIATE_ERASE 0xAA
+#define IPMI_SEL_CLEAR_OPERATION_GET_ERASURE_STATUS 0x0
+
+#define IPMI_SEL_CLEAR_OPERATION_VALID(__val) \
+ (((__val) == IPMI_SEL_CLEAR_OPERATION_INITIATE_ERASE \
+ || (__val) == IPMI_SEL_CLEAR_OPERATION_GET_ERASURE_STATUS) ? 1 : 0)
+
+#define IPMI_SEL_CLEAR_ERASURE_IN_PROGRESS 0x0
+#define IPMI_SEL_CLEAR_ERASE_COMPLETED 0x1
+
+#define IPMI_SEL_READ_ENTIRE_RECORD_BYTES_TO_READ 0xFF
+
+#define IPMI_SEL_TIME_UTC_OFFSET_MIN -1440
+#define IPMI_SEL_TIME_UTC_OFFSET_MAX 1440
+
+#define IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED 0x07FF
+
+#define IPMI_SEL_TIME_UTC_OFFSET_VALID(__val) \
+ ((((__val) >= IPMI_SEL_TIME_UTC_OFFSET_MIN \
+ && (__val) <= IPMI_SEL_TIME_UTC_OFFSET_MAX) \
+ || (__val) == IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED) ? 1 : 0)
+
+#define IPMI_AUXILIARY_LOG_TYPE_MCA 0x00
+#define IPMI_AUXILIARY_LOG_TYPE_OEM1 0x01
+#define IPMI_AUXILIARY_LOG_TYPE_OEM2 0x02
+
+#define IPMI_AUXILIARY_LOG_TYPE_VALID(__val) \
+ (((__val) == IPMI_AUXILIARY_LOG_TYPE_MCA \
+ || (__val) == IPMI_AUXILIARY_LOG_TYPE_OEM1 \
+ || (__val) == IPMI_AUXILIARY_LOG_TYPE_OEM2) ? 1 : 0)
+
+/*
+ * 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_sel_info_rq;
+extern fiid_template_t tmpl_cmd_get_sel_info_rs;
+
+extern fiid_template_t tmpl_cmd_get_sel_allocation_info_rq;
+extern fiid_template_t tmpl_cmd_get_sel_allocation_info_rs;
+
+extern fiid_template_t tmpl_cmd_reserve_sel_rq;
+extern fiid_template_t tmpl_cmd_reserve_sel_rs;
+
+extern fiid_template_t tmpl_cmd_get_sel_entry_rq;
+extern fiid_template_t tmpl_cmd_get_sel_entry_rs;
+
+extern fiid_template_t tmpl_cmd_delete_sel_entry_rq;
+extern fiid_template_t tmpl_cmd_delete_sel_entry_rs;
+
+extern fiid_template_t tmpl_cmd_clear_sel_rq;
+extern fiid_template_t tmpl_cmd_clear_sel_rs;
+
+extern fiid_template_t tmpl_cmd_get_sel_time_rq;
+extern fiid_template_t tmpl_cmd_get_sel_time_rs;
+
+extern fiid_template_t tmpl_cmd_set_sel_time_rq;
+extern fiid_template_t tmpl_cmd_set_sel_time_rs;
+
+extern fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rq;
+extern fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rs;
+
+extern fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rq;
+extern fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rs;
+
+extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_rq;
+extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_rs;
+extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_mca_rs;
+extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_oem_rs;
+
+extern fiid_template_t tmpl_cmd_set_auxiliary_log_status_rq;
+extern fiid_template_t tmpl_cmd_set_auxiliary_log_status_rs;
+
+int fill_cmd_get_sel_info (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sel_allocation_info (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_reserve_sel (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sel_entry (uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_delete_sel_entry (uint16_t reservation_id,
+ uint16_t record_id,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_clear_sel (uint16_t reservation_id,
+ uint8_t operation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sel_time (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sel_time (uint32_t time, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sel_time_utc_offset (fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sel_time_utc_offset (int16_t offset, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_auxiliary_log_status (uint8_t log_type,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_auxiliary_log_status (uint8_t log_type,
+ const void *log_data,
+ unsigned int log_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SEL_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sensor-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sensor-cmds.h
new file mode 100644
index 00000000..52ddf287
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sensor-cmds.h
@@ -0,0 +1,321 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SENSOR_CMDS_H
+#define IPMI_SENSOR_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SENSOR_GET_SENSOR_COUNT 0x00
+#define IPMI_SENSOR_GET_SDR_COUNT 0x01
+
+#define IPMI_SENSOR_GET_SDR_INFO_OPERATION_VALID(__val) \
+ (((__val) == IPMI_SENSOR_GET_SENSOR_COUNT \
+ || (__val) == IPMI_SENSOR_GET_SDR_COUNT) ? 1 : 0)
+
+#define IPMI_SENSOR_STATIC_SENSOR_POPULATION 0x0
+#define IPMI_SENSOR_DYNAMIC_SENSOR_POPULATION 0x1
+
+/* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */
+#define IPMI_SENSOR_HYSTERESIS_MASK 0xFF
+
+#define IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES 0x0
+#define IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES 0x1
+#define IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES 0x2
+
+#define IPMI_SENSOR_EVENT_MESSAGE_ACTION_VALID(__val) \
+ (((__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES \
+ || (__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES \
+ || (__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES) ? 1 : 0)
+
+#define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_ENABLE 0x1
+#define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE 0x0
+
+#define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_VALID(__val) \
+ (((__val) == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_ENABLE \
+ || (__val) == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) ? 1 : 0)
+
+#define IPMI_SENSOR_ALL_EVENT_MESSAGES_ENABLE 0x1
+#define IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE 0x0
+
+#define IPMI_SENSOR_ALL_EVENT_MESSAGES_VALID(__val) \
+ (((__val) == IPMI_SENSOR_ALL_EVENT_MESSAGES_ENABLE \
+ || (__val) == IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE) ? 1 : 0)
+
+#define IPMI_SENSOR_EVENT_FLAG_ENABLE 0x1
+#define IPMI_SENSOR_EVENT_FLAG_DISABLE 0x0
+
+#define IPMI_SENSOR_EVENT_FLAG_VALID(__val) \
+ (((__val) == IPMI_SENSOR_EVENT_FLAG_ENABLE \
+ || (__val) == IPMI_SENSOR_EVENT_FLAG_DISABLE) ? 1 : 0)
+
+/* achu: Yes, this one is backwards. I don't know why */
+#define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_ENABLED 0x0
+#define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_DISABLED 0x1
+
+#define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_VALID(__val) \
+ (((__val) == IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_ENABLED \
+ || (__val) == IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_DISABLED) ? 1 : 0)
+
+/* achu: Yes, this one is backwards. I don't know why */
+#define IPMI_SENSOR_READING_STATE_UNAVAILABLE 0x1
+#define IPMI_SENSOR_READING_STATE_AVAILABLE 0x0
+
+#define IPMI_SENSOR_THRESHOLD_SET 0x1
+#define IPMI_SENSOR_THRESHOLD_NOT_SET 0x0
+
+#define IPMI_SENSOR_READING_OPERATION_WRITE_GIVEN_VALUE_TO_SENSOR_READING_BYTE 0x01
+#define IPMI_SENSOR_READING_OPERATION_DONT_CHANGE_SENSOR_READING_BYTE 0x00
+
+#define IPMI_SENSOR_READING_OPERATION_VALID(__val) \
+ (((__val) == IPMI_SENSOR_READING_OPERATION_WRITE_GIVEN_VALUE_TO_SENSOR_READING_BYTE \
+ || (__val) == IPMI_SENSOR_READING_OPERATION_DONT_CHANGE_SENSOR_READING_BYTE) ? 1 : 0)
+
+#define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS 0x03
+#define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS 0x02
+#define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS 0x01
+#define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS 0x00
+
+#define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_VALID(__val) \
+ (((__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS \
+ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS \
+ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS \
+ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS) ? 1 : 0)
+
+#define IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_EXCLUDING_EVENT_OFFSET 0x02
+#define IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_INCLUDING_EVENT_OFFSET 0x01
+#define IPMI_EVENT_DATA_BYTES_OPERATION_DONT_WRITE_EVENT_DATA_BYTES 0x00
+
+#define IPMI_EVENT_DATA_BYTES_OPERATION_VALID(__val) \
+ (((__val) == IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_EXCLUDING_EVENT_OFFSET \
+ || (__val) == IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_INCLUDING_EVENT_OFFSET \
+ || (__val) == IPMI_EVENT_DATA_BYTES_OPERATION_DONT_WRITE_EVENT_DATA_BYTES) ? 1 : 0)
+
+/*
+ * 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_sdr_info_rq;
+extern fiid_template_t tmpl_cmd_get_device_sdr_info_rs;
+
+extern fiid_template_t tmpl_cmd_get_device_sdr_rq;
+extern fiid_template_t tmpl_cmd_get_device_sdr_rs;
+
+extern fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rq;
+extern fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_reading_factors_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_reading_factors_rs;
+
+extern fiid_template_t tmpl_cmd_set_sensor_hysteresis_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_hysteresis_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_hysteresis_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_hysteresis_rs;
+
+extern fiid_template_t tmpl_cmd_set_sensor_thresholds_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_thresholds_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_thresholds_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_thresholds_rs;
+
+extern fiid_template_t tmpl_cmd_set_sensor_event_enable_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_event_enable_threshold_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_event_enable_discrete_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_event_enable_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_event_enable_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_event_enable_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_event_enable_threshold_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_event_enable_discrete_rs;
+
+extern fiid_template_t tmpl_cmd_re_arm_sensor_events_rq;
+extern fiid_template_t tmpl_cmd_re_arm_sensor_events_threshold_rq;
+extern fiid_template_t tmpl_cmd_re_arm_sensor_events_discrete_rq;
+extern fiid_template_t tmpl_cmd_re_arm_sensor_events_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_event_status_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_event_status_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_event_status_threshold_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_event_status_discerete_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_reading_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_reading_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_reading_threshold_rs;
+extern fiid_template_t tmpl_cmd_get_sensor_reading_discrete_rs;
+
+extern fiid_template_t tmpl_cmd_set_sensor_type_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_type_rs;
+
+extern fiid_template_t tmpl_cmd_get_sensor_type_rq;
+extern fiid_template_t tmpl_cmd_get_sensor_type_rs;
+
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_event_fields_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_event_fields_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_event_fields_rq;
+extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rs;
+
+int fill_cmd_get_device_sdr_info (uint8_t operation,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_device_sdr (uint16_t reservation_id,
+ uint16_t record_id,
+ uint8_t offset_into_record,
+ uint8_t bytes_to_read,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_reserve_device_sdr_repository (fiid_obj_t obj_cmd_rq);
+
+/* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */
+int fill_cmd_set_sensor_hysteresis (uint8_t sensor_number,
+ uint8_t hysteresis_mask,
+ uint8_t positive_going_threshold_hysteresis_value,
+ uint8_t negative_going_threshold_hysteresis_value,
+ fiid_obj_t obj_cmd_rq);
+
+/* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */
+int fill_cmd_get_sensor_hysteresis (uint8_t sensor_number,
+ uint8_t hysteresis_mask,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sensor_thresholds (uint8_t sensor_number,
+ const uint8_t *lower_non_critical_threshold,
+ const uint8_t *lower_critical_threshold,
+ const uint8_t *lower_non_recoverable_threshold,
+ const uint8_t *upper_non_critical_threshold,
+ const uint8_t *upper_critical_threshold,
+ const uint8_t *upper_non_recoverable_threshold,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sensor_thresholds (uint8_t sensor_number, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sensor_event_enable (uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint16_t assertion_event_bitmask,
+ uint16_t deassertion_event_bitmask,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sensor_event_enable_threshold (uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint8_t assertion_event_lower_non_critical_going_low,
+ uint8_t assertion_event_lower_non_critical_going_high,
+ uint8_t assertion_event_lower_critical_going_low,
+ uint8_t assertion_event_lower_critical_going_high,
+ uint8_t assertion_event_lower_non_recoverable_going_low,
+ uint8_t assertion_event_lower_non_recoverable_going_high,
+ uint8_t assertion_event_upper_non_critical_going_low,
+ uint8_t assertion_event_upper_non_critical_going_high,
+ uint8_t assertion_event_upper_critical_going_low,
+ uint8_t assertion_event_upper_critical_going_high,
+ uint8_t assertion_event_upper_non_recoverable_going_low,
+ uint8_t assertion_event_upper_non_recoverable_going_high,
+ uint8_t deassertion_event_lower_non_critical_going_low,
+ uint8_t deassertion_event_lower_non_critical_going_high,
+ uint8_t deassertion_event_lower_critical_going_low,
+ uint8_t deassertion_event_lower_critical_going_high,
+ uint8_t deassertion_event_lower_non_recoverable_going_low,
+ uint8_t deassertion_event_lower_non_recoverable_going_high,
+ uint8_t deassertion_event_upper_non_critical_going_low,
+ uint8_t deassertion_event_upper_non_critical_going_high,
+ uint8_t deassertion_event_upper_critical_going_low,
+ uint8_t deassertion_event_upper_critical_going_high,
+ uint8_t deassertion_event_upper_non_recoverable_going_low,
+ uint8_t deassertion_event_upper_non_recoverable_going_high,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sensor_event_enable_discrete (uint8_t sensor_number,
+ uint8_t event_message_action,
+ uint8_t scanning_on_this_sensor,
+ uint8_t all_event_messages,
+ uint8_t assertion_event_state_bit_0,
+ uint8_t assertion_event_state_bit_1,
+ uint8_t assertion_event_state_bit_2,
+ uint8_t assertion_event_state_bit_3,
+ uint8_t assertion_event_state_bit_4,
+ uint8_t assertion_event_state_bit_5,
+ uint8_t assertion_event_state_bit_6,
+ uint8_t assertion_event_state_bit_7,
+ uint8_t assertion_event_state_bit_8,
+ uint8_t assertion_event_state_bit_9,
+ uint8_t assertion_event_state_bit_10,
+ uint8_t assertion_event_state_bit_11,
+ uint8_t assertion_event_state_bit_12,
+ uint8_t assertion_event_state_bit_13,
+ uint8_t assertion_event_state_bit_14,
+ uint8_t deassertion_event_state_bit_0,
+ uint8_t deassertion_event_state_bit_1,
+ uint8_t deassertion_event_state_bit_2,
+ uint8_t deassertion_event_state_bit_3,
+ uint8_t deassertion_event_state_bit_4,
+ uint8_t deassertion_event_state_bit_5,
+ uint8_t deassertion_event_state_bit_6,
+ uint8_t deassertion_event_state_bit_7,
+ uint8_t deassertion_event_state_bit_8,
+ uint8_t deassertion_event_state_bit_9,
+ uint8_t deassertion_event_state_bit_10,
+ uint8_t deassertion_event_state_bit_11,
+ uint8_t deassertion_event_state_bit_12,
+ uint8_t deassertion_event_state_bit_13,
+ uint8_t deassertion_event_state_bit_14,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sensor_event_enable (uint8_t sensor_number, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_re_arm_sensor_events (uint8_t sensor_number,
+ uint8_t re_arm_all_event_status_from_this_sensor,
+ uint16_t *re_arm_assertion_event,
+ uint16_t *re_arm_deassertion_event,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sensor_reading (uint8_t sensor_number, fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sensor_reading_and_event_status (uint8_t sensor_number,
+ uint8_t sensor_reading_operation,
+ uint8_t deassertion_bits_operation,
+ uint8_t assertion_bits_operation,
+ uint8_t event_data_bytes_operation,
+ uint8_t sensor_reading,
+ uint16_t assertion_event_bitmask,
+ uint16_t deassertion_event_bitmask,
+ uint8_t event_data1,
+ uint8_t event_data2,
+ uint8_t event_data3,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SENSOR_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-serial-modem-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-serial-modem-cmds.h
new file mode 100644
index 00000000..fec0e0ef
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-serial-modem-cmds.h
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SERIAL_MODEM_CMDS_H
+#define IPMI_SERIAL_MODEM_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR 0x0
+#define IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00
+#define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01
+#define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02
+
+#define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMPLETE \
+ || (__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \
+ || (__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_BASIC_MODE_ENABLE 0x1
+#define IPMI_BASIC_MODE_DISABLE 0x0
+
+#define IPMI_BASIC_MODE_VALID(__val) \
+ (((__val) == IPMI_BASIC_MODE_ENABLE \
+ || (__val) == IPMI_BASIC_MODE_DISABLE) ? 1 : 0)
+
+#define IPMI_PPP_MODE_ENABLE 0x1
+#define IPMI_PPP_MODE_DISABLE 0x0
+
+#define IPMI_PPP_MODE_VALID(__val) \
+ (((__val) == IPMI_PPP_MODE_ENABLE \
+ || (__val) == IPMI_PPP_MODE_DISABLE) ? 1 : 0)
+
+#define IPMI_TERMINAL_MODE_ENABLE 0x1
+#define IPMI_TERMINAL_MODE_DISABLE 0x0
+
+#define IPMI_TERMINAL_MODE_VALID(__val) \
+ (((__val) == IPMI_TERMINAL_MODE_ENABLE \
+ || (__val) == IPMI_TERMINAL_MODE_DISABLE) ? 1 : 0)
+
+#define IPMI_CONNECT_MODE_DIRECT 0x1
+#define IPMI_CONNECT_MODE_MODEM 0x0
+
+#define IPMI_CONNECT_MODE_VALID(__val) \
+ (((__val) == IPMI_CONNECT_MODE_DIRECT \
+ || (__val) == IPMI_CONNECT_MODE_MODEM) ? 1 : 0)
+
+#define IPMI_DTR_HANGUP_ENABLE 0x1
+#define IPMI_DTR_HANGUP_DISABLE 0x0
+
+#define IPMI_DTR_HANGUP_VALID(__val) \
+ (((__val) == IPMI_DTR_HANGUP_ENABLE \
+ || (__val) == IPMI_DTR_HANGUP_DISABLE) ? 1 : 0)
+
+#define IPMI_FLOW_CONTROL_NO_FLOW_CONTROL 0x0
+#define IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL 0x1
+#define IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL 0x2
+#define IPMI_FLOW_CONTROL_RESERVED 0x3
+
+#define IPMI_FLOW_CONTROL_VALID(__val) \
+ (((__val) == IPMI_FLOW_CONTROL_NO_FLOW_CONTROL \
+ || (__val) == IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL \
+ || (__val) == IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL) ? 1 : 0)
+
+#define IPMI_BIT_RATE_9600_BPS 0x6
+#define IPMI_BIT_RATE_19200_BPS 0x7
+#define IPMI_BIT_RATE_38400_BPS 0x8
+#define IPMI_BIT_RATE_57600_BPS 0x9
+#define IPMI_BIT_RATE_115200_BPS 0xA
+
+#define IPMI_BIT_RATE_VALID(__val) \
+ (((__val) == IPMI_BIT_RATE_9600_BPS \
+ || (__val) == IPMI_BIT_RATE_19200_BPS \
+ || (__val) == IPMI_BIT_RATE_38400_BPS \
+ || (__val) == IPMI_BIT_RATE_57600_BPS \
+ || (__val) == IPMI_BIT_RATE_115200_BPS) ? 1 : 0)
+
+#define IPMI_GET_SERIAL_MODEM_PARAMETER 0x0
+#define IPMI_GET_SERIAL_MODEM_PARAMETER_REVISION_ONLY 0x1
+
+#define IPMI_GET_SERIAL_MODEM_PARAMETER_VALID(__flag) \
+ (((__flag) == IPMI_GET_SERIAL_MODEM_PARAMETER \
+ || (__flag) == IPMI_GET_SERIAL_MODEM_PARAMETER_REVISION_ONLY) ? 1 : 0)
+
+/*
+ * 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_set_serial_modem_configuration_rq;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_rs;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_connection_mode_rq;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq;
+extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq;
+
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_rq;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_rs;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_connection_mode_rs;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs;
+extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs;
+
+int fill_cmd_set_serial_modem_configuration (uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_serial_modem_configuration_set_in_progress (uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_serial_modem_configuration_connection_mode (uint8_t channel_number,
+ uint8_t basic_mode,
+ uint8_t ppp_mode,
+ uint8_t terminal_mode,
+ uint8_t connect_mode,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (uint8_t channel_number,
+ uint8_t dtr_hangup,
+ uint8_t flow_control,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_serial_modem_configuration_page_blackout_interval (uint8_t channel_number,
+ uint8_t page_blackout_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_serial_modem_configuration_call_retry_interval (uint8_t channel_number,
+ uint8_t call_retry_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_serial_modem_configuration (uint8_t channel_number,
+ uint8_t parameter_type,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_cmd_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SERIAL_MODEM_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sol-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sol-cmds.h
new file mode 100644
index 00000000..ae599cec
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/ipmi-sol-cmds.h
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SOL_CMDS_H
+#define IPMI_SOL_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0
+
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02
+
+#define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \
+ (((__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMPLETE \
+ || (__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \
+ || (__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0)
+
+#define IPMI_SOL_SOL_DISABLE 0x0
+#define IPMI_SOL_SOL_ENABLE 0x1
+
+#define IPMI_SOL_SOL_ENABLE_VALID(__val) \
+ (((__val) == IPMI_SOL_SOL_DISABLE \
+ || (__val) == IPMI_SOL_SOL_ENABLE) ? 1 : 0)
+
+#define IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION 0x1
+#define IPMI_SOL_AUTHENTICATION_CONTROLLED_BY_REMOTE_SOFTWARE 0x0
+
+#define IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION_VALID(__val) \
+ (((__val) == IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION \
+ || (__val) == IPMI_SOL_AUTHENTICATION_CONTROLLED_BY_REMOTE_SOFTWARE) ? 1 : 0)
+
+#define IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION 0x1
+#define IPMI_SOL_ENCRYPTION_CONTROLLED_BY_REMOTE_SOFTWARE 0x0
+
+#define IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION_VALID(__val) \
+ (((__val) == IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION \
+ || (__val) == IPMI_SOL_ENCRYPTION_CONTROLLED_BY_REMOTE_SOFTWARE) ? 1 : 0)
+
+#define IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE 0x0
+#define IPMI_SOL_BIT_RATE_96_KBPS 0x6
+#define IPMI_SOL_BIT_RATE_192_KBPS 0x7
+#define IPMI_SOL_BIT_RATE_384_KBPS 0x8
+#define IPMI_SOL_BIT_RATE_576_KBPS 0x9
+#define IPMI_SOL_BIT_RATE_1152_KBPS 0xA
+
+#define IPMI_SOL_BIT_RATE_VALID(__val) \
+ (((__val) == IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE \
+ || (__val) == IPMI_SOL_BIT_RATE_96_KBPS \
+ || (__val) == IPMI_SOL_BIT_RATE_192_KBPS \
+ || (__val) == IPMI_SOL_BIT_RATE_384_KBPS \
+ || (__val) == IPMI_SOL_BIT_RATE_576_KBPS \
+ || (__val) == IPMI_SOL_BIT_RATE_1152_KBPS) ? 1 : 0)
+
+#define IPMI_GET_SOL_PARAMETER 0x0
+#define IPMI_GET_SOL_PARAMETER_REVISION_ONLY 0x1
+
+#define IPMI_GET_SOL_PARAMETER_VALID(__val) \
+ (((__val) == IPMI_GET_SOL_PARAMETER \
+ || (__val) == IPMI_GET_SOL_PARAMETER_REVISION_ONLY) ? 1 : 0)
+
+/*
+ * 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_set_sol_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq;
+extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq;
+
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rq;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_set_in_progress_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs;
+extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs;
+
+int fill_cmd_set_sol_configuration_parameters (uint8_t channel_number,
+ uint8_t parameter_selector,
+ const void *configuration_parameter_data,
+ unsigned int configuration_parameter_data_len,
+ fiid_obj_t obj_data_rq);
+
+int fill_cmd_set_sol_configuration_parameters_set_in_progress (uint8_t channel_number,
+ uint8_t state,
+ fiid_obj_t obj_data_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_enable (uint8_t channel_number,
+ uint8_t sol_enable,
+ fiid_obj_t obj_data_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_authentication (uint8_t channel_number,
+ uint8_t sol_privilege_level,
+ uint8_t force_sol_payload_authentication,
+ uint8_t force_sol_payload_encryption,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (uint8_t channel_number,
+ uint8_t character_accumulate_interval,
+ uint8_t character_send_threshold,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_retry (uint8_t channel_number,
+ uint8_t retry_count,
+ uint8_t retry_interval,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (uint8_t channel_number,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (uint8_t channel_number,
+ uint8_t bit_rate,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_set_sol_configuration_parameters_sol_payload_port_number (uint8_t channel_number,
+ uint16_t port_number,
+ fiid_obj_t obj_cmd_rq);
+
+int fill_cmd_get_sol_configuration_parameters (uint8_t channel_number,
+ uint8_t get_parameter,
+ uint8_t parameter_selector,
+ uint8_t set_selector,
+ uint8_t block_selector,
+ fiid_obj_t obj_data_rq);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SOL_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/cmds/rmcp-cmds.h b/source/freeipmi/usr/include/freeipmi/cmds/rmcp-cmds.h
new file mode 100644
index 00000000..9800f338
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/cmds/rmcp-cmds.h
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+
+#ifndef RMCP_CMDS_H
+#define RMCP_CMDS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+/*
+ * 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_asf_presence_ping;
+extern fiid_template_t tmpl_cmd_asf_presence_pong;
+
+/* MESSAGE_TAG:
+ achu: Consecutive ping messages should use different message tags,
+ ranging from 0x00 to 0xFE. This is because the RMCP consumers may
+ optionally discard duplicate messages. */
+
+int fill_cmd_asf_presence_ping (uint8_t message_tag, fiid_obj_t obj_cmd);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* RMCP_CMDS_H */
diff --git a/source/freeipmi/usr/include/freeipmi/debug/ipmi-debug.h b/source/freeipmi/usr/include/freeipmi/debug/ipmi-debug.h
new file mode 100644
index 00000000..d184f468
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/debug/ipmi-debug.h
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_DEBUG_H
+#define IPMI_DEBUG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+extern fiid_template_t tmpl_unexpected_data;
+
+int ipmi_obj_dump (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ fiid_obj_t obj);
+
+int ipmi_obj_dump_ipmb (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ fiid_obj_t obj,
+ fiid_template_t tmpl_ipmb_msg_hdr,
+ fiid_template_t tmpl_ipmb_cmd);
+
+int ipmi_dump_rmcp_packet (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_cmd);
+
+int ipmi_dump_kcs_packet (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_cmd);
+
+int ipmi_dump_kcs_packet_ipmb (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_cmd,
+ fiid_template_t tmpl_ipmb_msg_hdr,
+ fiid_template_t tmpl_ipmb_cmd);
+
+int ipmi_dump_ssif_packet (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_cmd);
+
+int ipmi_dump_lan_packet (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_lan_msg_hdr,
+ fiid_template_t tmpl_cmd);
+
+int ipmi_dump_lan_packet_ipmb (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_lan_msg_hdr,
+ fiid_template_t tmpl_cmd,
+ fiid_template_t tmpl_ipmb_msg_hdr,
+ fiid_template_t tmpl_ipmb_cmd);
+
+int ipmi_dump_rmcpplus_packet (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ uint8_t authentication_algorithm,
+ uint8_t integrity_algorithm,
+ uint8_t confidentiality_algorithm,
+ const void *integrity_key,
+ unsigned int integrity_key_len,
+ const void *confidentiality_key,
+ unsigned int confidentiality_key_len,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_lan_msg_hdr,
+ fiid_template_t tmpl_cmd);
+
+int ipmi_dump_rmcpplus_packet_ipmb (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ uint8_t authentication_algorithm,
+ uint8_t integrity_algorithm,
+ uint8_t confidentiality_algorithm,
+ const void *integrity_key,
+ unsigned int integrity_key_len,
+ const void *confidentiality_key,
+ unsigned int confidentiality_key_len,
+ const void *pkt,
+ unsigned int pkt_len,
+ fiid_template_t tmpl_lan_msg_hdr,
+ fiid_template_t tmpl_cmd,
+ fiid_template_t tmpl_ipmb_msg_hdr,
+ fiid_template_t tmpl_ipmb_cmd);
+
+int ipmi_dump_sdr_record (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *sdr_record,
+ unsigned int sdr_record_len);
+
+int ipmi_dump_hex (int fd,
+ const char *prefix,
+ const char *hdr,
+ const char *trlr,
+ const void *buf,
+ unsigned int buf_len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_DEBUG_H */
diff --git a/source/freeipmi/usr/include/freeipmi/driver/ipmi-inteldcmi-driver.h b/source/freeipmi/usr/include/freeipmi/driver/ipmi-inteldcmi-driver.h
new file mode 100644
index 00000000..ada667d8
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/driver/ipmi-inteldcmi-driver.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_INTELDCMI_DRIVER_H
+#define IPMI_INTELDCMI_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_INTELDCMI_DRIVER_DEVICE_DEFAULT "/dev/dcmi"
+
+#define IPMI_INTELDCMI_ERR_SUCCESS 0
+#define IPMI_INTELDCMI_ERR_NULL 1
+#define IPMI_INTELDCMI_ERR_INVALID 2
+#define IPMI_INTELDCMI_ERR_PARAMETERS 3
+#define IPMI_INTELDCMI_ERR_PERMISSION 4
+#define IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND 5
+#define IPMI_INTELDCMI_ERR_IO_NOT_INITIALIZED 6
+#define IPMI_INTELDCMI_ERR_OUT_OF_MEMORY 7
+#define IPMI_INTELDCMI_ERR_DRIVER_TIMEOUT 8
+#define IPMI_INTELDCMI_ERR_IPMI_ERROR 9
+#define IPMI_INTELDCMI_ERR_SYSTEM_ERROR 10
+#define IPMI_INTELDCMI_ERR_INTERNAL_ERROR 11
+#define IPMI_INTELDCMI_ERR_ERRNUMRANGE 12
+
+#define IPMI_INTELDCMI_FLAGS_DEFAULT 0x00000000
+
+typedef struct ipmi_inteldcmi_ctx *ipmi_inteldcmi_ctx_t;
+
+ipmi_inteldcmi_ctx_t ipmi_inteldcmi_ctx_create (void);
+void ipmi_inteldcmi_ctx_destroy (ipmi_inteldcmi_ctx_t ctx);
+int ipmi_inteldcmi_ctx_errnum (ipmi_inteldcmi_ctx_t ctx);
+char *ipmi_inteldcmi_ctx_strerror (int errnum);
+char *ipmi_inteldcmi_ctx_errormsg (ipmi_inteldcmi_ctx_t ctx);
+
+int ipmi_inteldcmi_ctx_get_driver_device (ipmi_inteldcmi_ctx_t ctx, char **driver_device);
+int ipmi_inteldcmi_ctx_get_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int *flags);
+
+int ipmi_inteldcmi_ctx_set_driver_device (ipmi_inteldcmi_ctx_t ctx, const char *driver_device);
+int ipmi_inteldcmi_ctx_set_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int flags);
+
+int ipmi_inteldcmi_ctx_io_init (ipmi_inteldcmi_ctx_t ctx);
+
+int ipmi_inteldcmi_cmd (ipmi_inteldcmi_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_inteldcmi_cmd_ipmb (ipmi_inteldcmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t rs_addr,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_INTELDCMI_DRIVER_H */
diff --git a/source/freeipmi/usr/include/freeipmi/driver/ipmi-kcs-driver.h b/source/freeipmi/usr/include/freeipmi/driver/ipmi-kcs-driver.h
new file mode 100644
index 00000000..2d62977b
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/driver/ipmi-kcs-driver.h
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_KCS_DRIVER_H
+#define IPMI_KCS_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_KCS_SMS_IO_BASE_DEFAULT 0x0CA2
+
+#define IPMI_KCS_ERR_SUCCESS 0
+#define IPMI_KCS_ERR_NULL 1
+#define IPMI_KCS_ERR_INVALID 2
+#define IPMI_KCS_ERR_PARAMETERS 3
+#define IPMI_KCS_ERR_PERMISSION 4
+#define IPMI_KCS_ERR_IO_NOT_INITIALIZED 5
+#define IPMI_KCS_ERR_OVERFLOW 6
+#define IPMI_KCS_ERR_BUSY 7
+#define IPMI_KCS_ERR_OUT_OF_MEMORY 8
+#define IPMI_KCS_ERR_DEVICE_NOT_FOUND 9
+#define IPMI_KCS_ERR_DRIVER_TIMEOUT 10
+#define IPMI_KCS_ERR_IPMI_ERROR 11
+#define IPMI_KCS_ERR_SYSTEM_ERROR 12
+#define IPMI_KCS_ERR_INTERNAL_ERROR 13
+#define IPMI_KCS_ERR_ERRNUMRANGE 14
+
+/* NONBLOCKING - if busy, IPMI_KCS_ERR_BUSY will be returned.
+ *
+ * SPIN_POLL - when polling, internally spin instead of putting
+ * process to sleep. If polling intervals are small, may improve
+ * inband performance by removing context switches and OS timer
+ * granularity.
+ */
+#define IPMI_KCS_FLAGS_DEFAULT 0x00000000
+#define IPMI_KCS_FLAGS_NONBLOCKING 0x00000001
+#define IPMI_KCS_FLAGS_SPIN_POLL 0x00000002
+
+typedef struct ipmi_kcs_ctx *ipmi_kcs_ctx_t;
+
+ipmi_kcs_ctx_t ipmi_kcs_ctx_create (void);
+void ipmi_kcs_ctx_destroy (ipmi_kcs_ctx_t ctx);
+int ipmi_kcs_ctx_errnum (ipmi_kcs_ctx_t ctx);
+char *ipmi_kcs_ctx_strerror (int errnum);
+char *ipmi_kcs_ctx_errormsg (ipmi_kcs_ctx_t ctx);
+
+int ipmi_kcs_ctx_get_driver_address (ipmi_kcs_ctx_t ctx, uint16_t *bmc_iobase_address);
+int ipmi_kcs_ctx_get_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t *register_spacing);
+int ipmi_kcs_ctx_get_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t *poll_interval);
+int ipmi_kcs_ctx_get_flags (ipmi_kcs_ctx_t ctx, unsigned int *flags);
+
+int ipmi_kcs_ctx_set_driver_address (ipmi_kcs_ctx_t ctx, uint16_t bmc_iobase_address);
+int ipmi_kcs_ctx_set_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t register_spacing);
+int ipmi_kcs_ctx_set_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t poll_interval);
+int ipmi_kcs_ctx_set_flags (ipmi_kcs_ctx_t ctx, unsigned int flags);
+
+int ipmi_kcs_ctx_io_init (ipmi_kcs_ctx_t ctx);
+
+/* returns length written on success, -1 on error */
+int ipmi_kcs_write (ipmi_kcs_ctx_t ctx,
+ const void *buf,
+ unsigned int buf_len);
+
+/* returns length read on success, -1 on error */
+int ipmi_kcs_read (ipmi_kcs_ctx_t ctx,
+ void *buf,
+ unsigned int buf_len);
+
+int ipmi_kcs_cmd (ipmi_kcs_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_KCS_DRIVER_H */
diff --git a/source/freeipmi/usr/include/freeipmi/driver/ipmi-openipmi-driver.h b/source/freeipmi/usr/include/freeipmi/driver/ipmi-openipmi-driver.h
new file mode 100644
index 00000000..925113ac
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/driver/ipmi-openipmi-driver.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_OPENIPMI_DRIVER_H
+#define IPMI_OPENIPMI_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_OPENIPMI_DRIVER_DEVICE_DEFAULT "/dev/ipmi0"
+
+#define IPMI_OPENIPMI_ERR_SUCCESS 0
+#define IPMI_OPENIPMI_ERR_NULL 1
+#define IPMI_OPENIPMI_ERR_INVALID 2
+#define IPMI_OPENIPMI_ERR_PARAMETERS 3
+#define IPMI_OPENIPMI_ERR_PERMISSION 4
+#define IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND 5
+#define IPMI_OPENIPMI_ERR_IO_NOT_INITIALIZED 6
+#define IPMI_OPENIPMI_ERR_OUT_OF_MEMORY 7
+#define IPMI_OPENIPMI_ERR_DRIVER_TIMEOUT 8
+#define IPMI_OPENIPMI_ERR_IPMI_ERROR 9
+#define IPMI_OPENIPMI_ERR_SYSTEM_ERROR 10
+#define IPMI_OPENIPMI_ERR_INTERNAL_ERROR 11
+#define IPMI_OPENIPMI_ERR_ERRNUMRANGE 12
+
+#define IPMI_OPENIPMI_FLAGS_DEFAULT 0x00000000
+
+typedef struct ipmi_openipmi_ctx *ipmi_openipmi_ctx_t;
+
+ipmi_openipmi_ctx_t ipmi_openipmi_ctx_create (void);
+void ipmi_openipmi_ctx_destroy (ipmi_openipmi_ctx_t ctx);
+int ipmi_openipmi_ctx_errnum (ipmi_openipmi_ctx_t ctx);
+char *ipmi_openipmi_ctx_strerror (int errnum);
+char *ipmi_openipmi_ctx_errormsg (ipmi_openipmi_ctx_t ctx);
+
+int ipmi_openipmi_ctx_get_driver_device (ipmi_openipmi_ctx_t ctx, char **driver_device);
+int ipmi_openipmi_ctx_get_flags (ipmi_openipmi_ctx_t ctx, unsigned int *flags);
+
+int ipmi_openipmi_ctx_set_driver_device (ipmi_openipmi_ctx_t ctx, const char *driver_device);
+int ipmi_openipmi_ctx_set_flags (ipmi_openipmi_ctx_t ctx, unsigned int flags);
+
+int ipmi_openipmi_ctx_io_init (ipmi_openipmi_ctx_t ctx);
+
+int ipmi_openipmi_cmd (ipmi_openipmi_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+int ipmi_openipmi_cmd_ipmb (ipmi_openipmi_ctx_t ctx,
+ uint8_t channel_number,
+ uint8_t rs_addr,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_OPENIPMI_DRIVER_H */
diff --git a/source/freeipmi/usr/include/freeipmi/driver/ipmi-ssif-driver.h b/source/freeipmi/usr/include/freeipmi/driver/ipmi-ssif-driver.h
new file mode 100644
index 00000000..47e1659a
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/driver/ipmi-ssif-driver.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SSIF_DRIVER_H
+#define IPMI_SSIF_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_DEFAULT_I2C_DEVICE "/dev/i2c-0"
+#define IPMI_DEFAULT_SSIF_IPMB_ADDR 0x42
+
+#define IPMI_SSIF_ERR_SUCCESS 0
+#define IPMI_SSIF_ERR_NULL 1
+#define IPMI_SSIF_ERR_INVALID 2
+#define IPMI_SSIF_ERR_PARAMETERS 3
+#define IPMI_SSIF_ERR_PERMISSION 4
+#define IPMI_SSIF_ERR_IO_NOT_INITIALIZED 5
+#define IPMI_SSIF_ERR_OVERFLOW 6
+#define IPMI_SSIF_ERR_BUSY 7
+#define IPMI_SSIF_ERR_OUT_OF_MEMORY 8
+#define IPMI_SSIF_ERR_DEVICE_NOT_FOUND 9
+#define IPMI_SSIF_ERR_DRIVER_TIMEOUT 10
+#define IPMI_SSIF_ERR_IPMI_ERROR 11
+#define IPMI_SSIF_ERR_SYSTEM_ERROR 12
+#define IPMI_SSIF_ERR_INTERNAL_ERROR 13
+#define IPMI_SSIF_ERR_ERRNUMRANGE 14
+
+#define IPMI_SSIF_FLAGS_DEFAULT 0x00000000
+#define IPMI_SSIF_FLAGS_NONBLOCKING 0x00000001
+
+typedef struct ipmi_ssif_ctx *ipmi_ssif_ctx_t;
+
+/* Notes:
+ *
+ * IPMBAddress - slave address of the BMC on the SMBus (usually 0x42)
+ *
+ */
+ipmi_ssif_ctx_t ipmi_ssif_ctx_create (void);
+void ipmi_ssif_ctx_destroy (ipmi_ssif_ctx_t ctx);
+int ipmi_ssif_ctx_errnum (ipmi_ssif_ctx_t ctx);
+char *ipmi_ssif_ctx_strerror (int errnum);
+char *ipmi_ssif_ctx_errormsg (ipmi_ssif_ctx_t ctx);
+
+int ipmi_ssif_ctx_get_driver_device (ipmi_ssif_ctx_t ctx, char **driver_device);
+int ipmi_ssif_ctx_get_driver_address (ipmi_ssif_ctx_t ctx, uint8_t *driver_address);
+int ipmi_ssif_ctx_get_flags (ipmi_ssif_ctx_t ctx, unsigned int *flags);
+
+int ipmi_ssif_ctx_set_driver_device (ipmi_ssif_ctx_t ctx, const char *driver_device);
+int ipmi_ssif_ctx_set_driver_address (ipmi_ssif_ctx_t ctx, uint8_t driver_address);
+int ipmi_ssif_ctx_set_flags (ipmi_ssif_ctx_t ctx, unsigned int flags);
+
+int ipmi_ssif_ctx_io_init (ipmi_ssif_ctx_t ctx);
+
+/* returns length written on success, -1 on error */
+int ipmi_ssif_write (ipmi_ssif_ctx_t ctx,
+ const void *buf,
+ unsigned int buf_len);
+
+/* returns length read on success, -1 on error */
+int ipmi_ssif_read (ipmi_ssif_ctx_t ctx,
+ void *buf,
+ unsigned int buf_len);
+
+int ipmi_ssif_cmd (ipmi_ssif_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SSIF_DRIVER_H */
diff --git a/source/freeipmi/usr/include/freeipmi/driver/ipmi-sunbmc-driver.h b/source/freeipmi/usr/include/freeipmi/driver/ipmi-sunbmc-driver.h
new file mode 100644
index 00000000..d8ed4cc7
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/driver/ipmi-sunbmc-driver.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef IPMI_SUNBMC_DRIVER_H
+#define IPMI_SUNBMC_DRIVER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+
+#define IPMI_SUNBMC_DRIVER_DEVICE_DEFAULT "/dev/bmc"
+
+#define IPMI_SUNBMC_ERR_SUCCESS 0
+#define IPMI_SUNBMC_ERR_NULL 1
+#define IPMI_SUNBMC_ERR_INVALID 2
+#define IPMI_SUNBMC_ERR_PARAMETERS 3
+#define IPMI_SUNBMC_ERR_PERMISSION 4
+#define IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND 5
+#define IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED 6
+#define IPMI_SUNBMC_ERR_IO_NOT_INITIALIZED 7
+#define IPMI_SUNBMC_ERR_OUT_OF_MEMORY 8
+#define IPMI_SUNBMC_ERR_DRIVER_TIMEOUT 9
+#define IPMI_SUNBMC_ERR_IPMI_ERROR 10
+#define IPMI_SUNBMC_ERR_SYSTEM_ERROR 11
+#define IPMI_SUNBMC_ERR_INTERNAL_ERROR 12
+#define IPMI_SUNBMC_ERR_ERRNUMRANGE 13
+
+#define IPMI_SUNBMC_FLAGS_DEFAULT 0x00000000
+
+typedef struct ipmi_sunbmc_ctx *ipmi_sunbmc_ctx_t;
+
+ipmi_sunbmc_ctx_t ipmi_sunbmc_ctx_create (void);
+void ipmi_sunbmc_ctx_destroy (ipmi_sunbmc_ctx_t ctx);
+int ipmi_sunbmc_ctx_errnum (ipmi_sunbmc_ctx_t ctx);
+char *ipmi_sunbmc_ctx_strerror (int errnum);
+char *ipmi_sunbmc_ctx_errormsg (ipmi_sunbmc_ctx_t ctx);
+
+int ipmi_sunbmc_ctx_get_driver_device (ipmi_sunbmc_ctx_t ctx, char **driver_device);
+int ipmi_sunbmc_ctx_get_flags (ipmi_sunbmc_ctx_t ctx, unsigned int *flags);
+
+int ipmi_sunbmc_ctx_set_driver_device (ipmi_sunbmc_ctx_t ctx, const char *driver_device);
+int ipmi_sunbmc_ctx_set_flags (ipmi_sunbmc_ctx_t ctx, unsigned int flags);
+
+int ipmi_sunbmc_ctx_io_init (ipmi_sunbmc_ctx_t ctx);
+
+int ipmi_sunbmc_cmd (ipmi_sunbmc_ctx_t ctx,
+ uint8_t lun,
+ uint8_t net_fn,
+ fiid_obj_t obj_cmd_rq,
+ fiid_obj_t obj_cmd_rs);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* IPMI_SUNBMC_DRIVER_H */
diff --git a/source/freeipmi/usr/include/freeipmi/fiid/fiid.h b/source/freeipmi/usr/include/freeipmi/fiid/fiid.h
new file mode 100644
index 00000000..2ddea8b0
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/fiid/fiid.h
@@ -0,0 +1,751 @@
+/*
+ * Copyright (C) 2003-2015 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef FIID_H
+#define FIID_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/*
+ * FIID Error Codes
+ */
+
+enum fiid_err
+ {
+ FIID_ERR_SUCCESS = 0,
+ FIID_ERR_OBJ_NULL = 1,
+ FIID_ERR_OBJ_INVALID = 2,
+ FIID_ERR_ITERATOR_NULL = 3,
+ FIID_ERR_ITERATOR_INVALID = 4,
+ FIID_ERR_PARAMETERS = 5,
+ FIID_ERR_TEMPLATE_INVALID = 6,
+ FIID_ERR_FIELD_NOT_FOUND = 7,
+ FIID_ERR_KEY_INVALID = 8,
+ FIID_ERR_FLAGS_INVALID = 9,
+ FIID_ERR_TEMPLATE_NOT_BYTE_ALIGNED = 10,
+ FIID_ERR_FIELD_NOT_BYTE_ALIGNED = 11,
+ FIID_ERR_BLOCK_NOT_BYTE_ALIGNED = 12,
+ FIID_ERR_OVERFLOW = 13,
+ FIID_ERR_MAX_FIELD_LEN_MISMATCH = 14,
+ FIID_ERR_KEY_FIELD_MISMATCH = 15,
+ FIID_ERR_FLAGS_FIELD_MISMATCH = 16,
+ FIID_ERR_TEMPLATE_LENGTH_MISMATCH = 17,
+ FIID_ERR_DATA_NOT_BYTE_ALIGNED = 18,
+ FIID_ERR_REQUIRED_FIELD_MISSING = 19,
+ FIID_ERR_FIXED_LENGTH_FIELD_INVALID = 20,
+ FIID_ERR_DATA_NOT_AVAILABLE = 21,
+ FIID_ERR_NOT_IDENTICAL = 22,
+ FIID_ERR_OUT_OF_MEMORY = 23,
+ FIID_ERR_INTERNAL_ERROR = 24,
+ FIID_ERR_ERRNUMRANGE = 25
+ };
+
+typedef enum fiid_err fiid_err_t;
+
+/*
+ * FIID Field Maximum Key Length
+ */
+
+#define FIID_FIELD_MAX_KEY_LEN 256
+
+/*
+ * FIID Field Flags
+ *
+ * FIID Field Requirement Flags
+ *
+ * REQUIRED
+ *
+ * The field in the template is required. For requests, if not set, a
+ * packet cannot be created. For responses, if not set, a packet is
+ * invalid.
+ *
+ * OPTIONAL
+ *
+ * The field in the template is not required. For requests, if not
+ * set, a packet can still be created. For responses, if not set, a
+ * packet is still valid.
+ *
+ * In a template field, either the REQUIRED or OPTIONAL flag must be
+ * specified.
+ *
+ * FIID Field Length Flags
+ *
+ * LENGTH_FIXED
+ *
+ * The number of bits that must be set in the field is fixed. It
+ * cannot be any other length.
+ *
+ * LENGTH_VARIABLE
+ *
+ * The number of bits that must be set in the field is variable in
+ * length.
+ *
+ * In a template field, either the LENGTH_FIXED or LENGTH_VARIABLE
+ * flag must be specified.
+ *
+ * FIID Field Misc Flags
+ *
+ * MAKES_PACKET_SUFFICIENT
+ *
+ * Used to indicate a sufficient set of fields, that if set, may allow
+ * a packet to be "sufficiently valid", despite other "required"
+ * fields not being set. Typically used in response packets to
+ * indicate the few fields necessary to be set for a payload to be
+ * accepted.
+ */
+
+#define FIID_FIELD_REQUIRED 0x00000001
+#define FIID_FIELD_OPTIONAL 0x00000002
+#define FIID_FIELD_REQUIRED_MASK 0x0000000F
+
+#define FIID_FIELD_REQUIRED_FLAG(__flags) \
+ ((__flags) & FIID_FIELD_REQUIRED_MASK)
+
+#define FIID_FIELD_REQUIRED_FLAG_VALID(__flags) \
+ ((FIID_FIELD_REQUIRED_FLAG (__flags) == FIID_FIELD_REQUIRED \
+ || FIID_FIELD_REQUIRED_FLAG (__flags) == FIID_FIELD_OPTIONAL) ? 1 : 0)
+
+#define FIID_FIELD_LENGTH_FIXED 0x00000010
+#define FIID_FIELD_LENGTH_VARIABLE 0x00000020
+#define FIID_FIELD_LENGTH_MASK 0x000000F0
+
+#define FIID_FIELD_LENGTH_FLAG(__flags) \
+ ((__flags) & FIID_FIELD_LENGTH_MASK)
+
+#define FIID_FIELD_LENGTH_FLAG_VALID(__flags) \
+ ((FIID_FIELD_LENGTH_FLAG (__flags) == FIID_FIELD_LENGTH_FIXED \
+ || FIID_FIELD_LENGTH_FLAG (__flags) == FIID_FIELD_LENGTH_VARIABLE) ? 1 : 0)
+
+#define FIID_FIELD_MAKES_PACKET_SUFFICIENT 0x00010000
+
+/*
+ * fiid_field_t
+ *
+ * Defines a FIID field:
+ *
+ * max_field_len - maximum length of a field in bits
+ * key - field name
+ * flags - indicating field requirements
+ *
+ * An array of field's makes up a FIID template.
+ */
+typedef struct fiid_field
+{
+ unsigned int max_field_len;
+ char key[FIID_FIELD_MAX_KEY_LEN];
+ unsigned int flags;
+} fiid_field_t;
+
+/*
+ * FIID Template
+ *
+ * An array of fiid_field_t's make up a fiid template. The array should be
+ * terminated with a field with a maximum field length of 0.
+ *
+ * The FIID template should be a multiple of 8 (i.e. byte aligned) otherwise
+ * most of the FIID API will return errors.
+ */
+typedef fiid_field_t fiid_template_t[];
+
+typedef struct fiid_obj *fiid_obj_t;
+
+typedef struct fiid_iterator *fiid_iterator_t;
+
+/*****************************
+* FIID Template API *
+*****************************/
+
+/*
+ * fiid_template_field_lookup
+ *
+ * Returns 1 if the field is found in the template, 0 if not, -1 on
+ * error.
+ */
+int fiid_template_field_lookup (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * FIID_TEMPLATE_FIELD_LOOKUP
+ *
+ * Returns 1 if the field is found in the template, -1 on error.
+ * Identical to fiid_template_field_lookup() except a return of 0 is
+ * not possible. If the field is not found, -1 is returned and
+ * errno EINVAL is the error code set.
+ */
+int FIID_TEMPLATE_FIELD_LOOKUP (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_len
+ *
+ * Returns the total length (in bits) of the all the fields in the
+ * template, -1 on error.
+ */
+int fiid_template_len (fiid_template_t tmpl);
+
+/*
+ * fiid_template_len_bytes
+ *
+ * Returns the total length (in bytes) of the all the fields in the
+ * template, -1 on error. Will return an error if template bit length
+ * is not a multiple of 8.
+ */
+int fiid_template_len_bytes (fiid_template_t tmpl);
+
+/*
+ * fiid_template_field_start
+ *
+ * Returns the offset (in bits) of the beginning of the field within
+ * this template, -1 on error.
+ */
+int fiid_template_field_start (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_field_start_bytes
+ *
+ * Returns the offset (in bytes) of the beginning of the field within
+ * this template, -1 on error. Will return an error if field bit
+ * offset is not a multiple of 8.
+ */
+int fiid_template_field_start_bytes (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_field_end
+ *
+ * Returns the offset (in bits) of the ending of the field within this
+ * template, -1 on error.
+ */
+int fiid_template_field_end (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_field_end_bytes
+ *
+ * Returns the offset (in bytes) of the ending of the field within
+ * this template, -1 on error. Will return an error if field bit
+ * offset is not a multiple of 8.
+ */
+int fiid_template_field_end_bytes (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_field_len
+ *
+ * Returns the maximum length (in bits) of the specified field, -1 on
+ * error.
+ */
+int fiid_template_field_len (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_field_len_bytes
+ *
+ * Returns the maximum length (in bytes) of the specified field, -1 on
+ * error. Will return an error if the field maximum bit length is not
+ * a multiple of 8.
+ */
+int fiid_template_field_len_bytes (fiid_template_t tmpl,
+ const char *field);
+
+/*
+ * fiid_template_block_len
+ *
+ * Returns the maximum length (in bits) of the block of fields
+ * beginning at 'field_start' and ending at 'field_end'. Returns -1
+ * on error.
+ */
+int fiid_template_block_len (fiid_template_t tmpl,
+ const char *field_start,
+ const char *field_end);
+
+/*
+ * fiid_template_block_len_bytes
+ *
+ * Returns the maximum length (in bytes) of the block of fields
+ * beginning at 'field_start' and ending at 'field_end'. Returns -1
+ * on error. Will return an error if the calculated bit length is not
+ * a multiple of 8.
+ */
+int fiid_template_block_len_bytes (fiid_template_t tmpl,
+ const char *field_start,
+ const char *field_end);
+
+/*
+ * fiid_template_compare
+ *
+ * Returns 1 if the two specified templates are identical, 0 if not,
+ * -1 on error.
+ */
+int fiid_template_compare (fiid_template_t tmpl1,
+ fiid_template_t tmpl2);
+
+/*
+ * FIID_TEMPLATE_COMPARE
+ *
+ * Returns 1 if the two specified templates are identical, -1 on
+ * error. Identical to fiid_template_compare() except a return of 0
+ * is not possible. If templates are not identical, -1 is returned and
+ * errno EINVAL is the error code set.
+ */
+int FIID_TEMPLATE_COMPARE (fiid_template_t tmpl1,
+ fiid_template_t tmpl2);
+
+/*
+ * fiid_template_free
+ *
+ * Free's a template created by fiid_obj_template.
+ */
+void fiid_template_free (fiid_field_t *tmpl_dynamic);
+
+/*****************************
+* FIID Object API *
+*****************************/
+
+/*
+ * fiid_strerror
+ *
+ * Return statically allocated string describing the specified error.
+ */
+char *fiid_strerror (fiid_err_t errnum);
+
+/*
+ * fiid_obj_create
+ *
+ * Return a fiid object based on the specified template. Returns NULL
+ * on error.
+ */
+fiid_obj_t fiid_obj_create (fiid_template_t tmpl);
+
+/*
+ * fiid_obj_destroy
+ *
+ * Destroy and free memory from a fiid object.
+ */
+void fiid_obj_destroy (fiid_obj_t obj);
+
+/*
+ * fiid_obj_dup
+ *
+ * Create and return a duplicate object from the one specified.
+ * Returns NULL on error.
+ */
+fiid_obj_t fiid_obj_dup (fiid_obj_t src_obj);
+
+/*
+ * fiid_obj_copy
+ *
+ * Create and return a duplicate object from the one specified, but
+ * base the new object on the alternate template specified. Template
+ * length of the original and alternate template must be the same.
+ * Returns NULL on error.
+ */
+fiid_obj_t fiid_obj_copy (fiid_obj_t src_obj, fiid_template_t alt_tmpl);
+
+/*
+ * fiid_obj_valid
+ *
+ * Returns 1 if the object passed in is a valid fiid object, 0 if not.
+ */
+int fiid_obj_valid (fiid_obj_t obj);
+
+/*
+ * fiid_obj_packet_valid
+ *
+ * Returns 1 if the object contains all the data for a valid packet,
+ * 0 if not, -1 on error. A valid packet is based on the field flags
+ * specified in the original fiid template. For example, this
+ * function will check if all required fields have been set with the
+ * correct number of bytes. It will also check that data set within
+ * the object is byte aligned. The FIID_FIELD_MAKES_PACKET_SUFFICIENT
+ * is not considered in this function.
+ */
+int fiid_obj_packet_valid (fiid_obj_t obj);
+
+/*
+ * FIID_OBJ_PACKET_VALID
+ *
+ * Returns 1 if the object contains all the data for a valid packet,
+ * -1 on error. Identical to fiid_obj_packet_valid() except a return
+ * of 0 is not possible. The FIID_FIELD_MAKES_PACKET_SUFFICIENT is
+ * not considered in this function.
+ */
+int FIID_OBJ_PACKET_VALID (fiid_obj_t obj);
+
+/*
+ * fiid_obj_packet_sufficient
+ *
+ * Returns 1 if the object contains all the data for a sufficient
+ * packet, 0 if not, -1 on error. Identical to
+ * fiid_obj_packet_valid() except FIID_FIELD_MAKES_PACKET_SUFFICIENT
+ * is considered. If a packet does not meet the conditions to pass
+ * fiid_obj_packet_valid(), sufficient fields are subsequently
+ * checked.
+ */
+int fiid_obj_packet_sufficient (fiid_obj_t obj);
+
+/*
+ * FIID_OBJ_PACKET_SUFFICIENT
+ *
+ * Returns 1 if the object contains a all the data for a valid packet,
+ * -1 on error. Identical to fiid_obj_packet_sufficient() except a return
+ * of 0 is not possible.
+ */
+int FIID_OBJ_PACKET_SUFFICIENT (fiid_obj_t obj);
+
+/*
+ * fiid_obj_template
+ *
+ * Create a template based on what is stored internally within the
+ * object. Returns NULL on error. Free the resulting template using
+ * fiid_template_free().
+ */
+fiid_field_t *fiid_obj_template (fiid_obj_t obj);
+
+/*
+ * fiid_obj_template_compare
+ *
+ * Returns 1 if the template specified is the one used to create the
+ * object, 0 if not, -1 one error.
+ */
+int fiid_obj_template_compare (fiid_obj_t obj, fiid_template_t tmpl);
+
+/*
+ * FIID_OBJ_TEMPLATE_COMPARE
+ *
+ * Returns 1 if the template specified is the one used to create the
+ * object, -1 one error. Identical to fiid_obj_template_compare()
+ * except a return of 0 is not possible. If object template and input
+ * template are not identical, -1 is returned and
+ * FIID_ERR_NOT_IDENTICAL is the error code set.
+ */
+int FIID_OBJ_TEMPLATE_COMPARE (fiid_obj_t obj, fiid_template_t tmpl);
+
+/*
+ * fiid_obj_errnum
+ *
+ * Returns the error code for the most recently occurring error.
+ */
+fiid_err_t fiid_obj_errnum (fiid_obj_t obj);
+
+/*
+ * fiid_obj_errormsg
+ *
+ * Returns the error string for the most recently occurring error.
+ */
+char *fiid_obj_errormsg (fiid_obj_t obj);
+
+/*
+ * fiid_obj_len
+ *
+ * Returns the total length (in bits) of data stored within the
+ * object, -1 on error.
+ */
+int fiid_obj_len (fiid_obj_t obj);
+
+/*
+ * fiid_obj_len_bytes
+ *
+ * Returns the total length (in bytes) of data stored within the
+ * object, -1 on error. Will return an error if the total bit length
+ * of data is not a multiple of 8.
+ */
+int fiid_obj_len_bytes (fiid_obj_t obj);
+
+/*
+ * fiid_obj_field_len
+ *
+ * Returns the length (in bits) of data stored within the
+ * specified field, -1 on error.
+ */
+int fiid_obj_field_len (fiid_obj_t obj, const char *field);
+
+/*
+ * fiid_obj_field_len_bytes
+ *
+ * Returns the length (in bytes) of data stored within the specified
+ * field, -1 on error. Will return an error if the bit length of data
+ * is not a multiple of 8.
+ */
+int fiid_obj_field_len_bytes (fiid_obj_t obj, const char *field);
+
+/*
+ * fiid_obj_block_len
+ *
+ * Returns the length (in bits) of data stored within the block of
+ * fields beginning at 'field_start' and ending at 'field_end'.
+ * Returns -1 on error.
+ */
+int fiid_obj_block_len (fiid_obj_t obj,
+ const char *field_start,
+ const char *field_end);
+
+/*
+ * fiid_obj_block_len_bytes
+ *
+ * Returns the length (in bytes) of data stored within the block of
+ * fields beginning at 'field_start' and ending at 'field_end'.
+ * Returns -1 on error. Will return an error if the calculated bit
+ * length is not a multiple of 8.
+ */
+int fiid_obj_block_len_bytes (fiid_obj_t obj,
+ const char *field_start,
+ const char *field_end);
+
+/*
+ * fiid_obj_clear
+ *
+ * Clear all data stored in the object. Return 0 on success, -1 on
+ * error.
+ */
+int fiid_obj_clear (fiid_obj_t obj);
+
+/*
+ * fiid_obj_clear_field
+ *
+ * Clear all data stored in a specified field in the object. Return 0
+ * on success, -1 on error.
+ */
+int fiid_obj_clear_field (fiid_obj_t obj, const char *field);
+
+/*
+ * fiid_obj_field_lookup
+ *
+ * Returns 1 if the field is found in the object, 0 if not, -1 on
+ * error.
+ */
+int fiid_obj_field_lookup (fiid_obj_t obj, const char *field);
+
+/*
+ * FIID_OBJ_FIELD_LOOKUP
+ *
+ * Returns 1 if the field is found in the object, -1 on error.
+ * Identical to fiid_obj_field_lookup() except a return of 0 is not
+ * possible. If the field is not found, -1 is returned and
+ * FIID_ERR_FIELD_NOT_FOUND is the error code set.
+ */
+int FIID_OBJ_FIELD_LOOKUP (fiid_obj_t obj, const char *field);
+
+/*
+ * fiid_obj_set
+ *
+ * Set data in the object for the specified field. Returns 0 on
+ * success, -1 on error.
+ */
+int fiid_obj_set (fiid_obj_t obj, const char *field, uint64_t val);
+
+/*
+ * fiid_obj_get
+ *
+ * Get data stored in the object for the specified field. Returns 1
+ * if data was available and returned, 0 if no data was available, -1
+ * on error.
+ */
+int fiid_obj_get (fiid_obj_t obj, const char *field, uint64_t *val);
+
+/*
+ * FIID_OBJ_GET
+ *
+ * Get data stored in the object for the specified field. Returns 1
+ * if data was available and returned, -1 on error. Identical to
+ * fiid_obj_get() except a return of 0 is not possible. If no data is
+ * available, -1 is returned and FIID_ERR_DATA_NOT_AVAILABLE is the
+ * error code set.
+ */
+int FIID_OBJ_GET (fiid_obj_t obj, const char *field, uint64_t *val);
+
+/*
+ * fiid_obj_set_data
+ *
+ * Set an array of data in the object for the specified field.
+ * Returns length of data set on success, -1 on error. The field
+ * specified must begin on a byte boundary and have a maximum bit
+ * length that is a multiple of 8. Will truncate the data written
+ * if the field maximum length is smaller than the data given.
+ */
+int fiid_obj_set_data (fiid_obj_t obj,
+ const char *field,
+ const void *data,
+ unsigned int data_len);
+
+/*
+ * fiid_obj_get_data
+ *
+ * Get an array of data in the object for the specified field.
+ * Returns length of data read on success, -1 on error. The field
+ * specified must begin on a byte boundary and have a data bit length
+ * that is a multiple of 8.
+ */
+int fiid_obj_get_data (fiid_obj_t obj,
+ const char *field,
+ void *data,
+ unsigned int data_len);
+
+/*
+ * fiid_obj_set_all
+ *
+ * Set all fields in the object with the specified array of data.
+ * Returns length of data set on success, -1 on error. The given data
+ * must fall on a byte boundary of the object. Will truncate the data
+ * written if the total object maximum length is smaller than the data
+ * given. Will write as much as possible if data is not large enough
+ * to fill the entire object.
+ */
+int fiid_obj_set_all (fiid_obj_t obj, const void *data, unsigned int data_len);
+
+/*
+ * fiid_obj_get_all
+ *
+ * Get an array of all data in the object. Returns length of data
+ * read on success, -1 on error.
+ */
+int fiid_obj_get_all (fiid_obj_t obj, void *data, unsigned int data_len);
+
+/*
+ * fiid_obj_set_block
+ *
+ * Set a block of fields in the object, beginning with 'field_start'
+ * and ending with 'field_end'. Returns length of data set on
+ * success, -1 on error. The fields given must fall on a byte
+ * boundary of the object. Will truncate the data written if the
+ * total block maximum length is smaller than the data given. Will
+ * write as much as possible if data is not large enough to fill the
+ * entire block.
+ */
+int fiid_obj_set_block (fiid_obj_t obj,
+ const char *field_start,
+ const char *field_end,
+ const void *data,
+ unsigned int data_len);
+
+/*
+ * fiid_obj_get_block
+ *
+ * Get a block of data in the object, beginning with 'field_start' and
+ * ending with 'field_end'. Returns length of data read on success,
+ * -1 on error. Data being read must fall on a byte boundary.
+ */
+int fiid_obj_get_block (fiid_obj_t obj,
+ const char *field_start,
+ const char *field_end,
+ void *data,
+ unsigned int data_len);
+
+/*****************************
+* FIID Iterator API *
+*****************************/
+
+/*
+ * fiid_iterator_create
+ *
+ * Create a fiid iterator to iteratate through each field in an
+ * object. Returns iterator on success, NULL on error.
+ */
+fiid_iterator_t fiid_iterator_create (fiid_obj_t obj);
+
+/*
+ * fiid_iterator_destroy
+ *
+ * Destroy and free memory from a fiid iterator.
+ */
+void fiid_iterator_destroy (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_errnum
+ *
+ * Returns the error code for the most recently occurring error.
+ */
+fiid_err_t fiid_iterator_errnum (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_errormsg
+ *
+ * Returns the error string for the most recently occurring error.
+ */
+char *fiid_iterator_errormsg (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_reset
+ *
+ * Reset the iterator back to the beginning. Returns 0 on success, -1
+ * on error.
+ */
+int fiid_iterator_reset (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_next
+ *
+ * Move the iterator to the next field. Returns 0 on success, -1 on
+ * error.
+ */
+int fiid_iterator_next (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_end
+ *
+ * Returns 1 if you are at the end of the iterator, 0 if not, -1
+ * error.
+ */
+int fiid_iterator_end (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_field_len
+ *
+ * Returns the number of bits set for the current field. Returns -1
+ * on error.
+ */
+int fiid_iterator_field_len (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_key
+ *
+ * Returns the key name for the current field. Returns NULL on error.
+ */
+char *fiid_iterator_key (fiid_iterator_t iter);
+
+/*
+ * fiid_iterator_get
+ *
+ * Get data stored in the object for the current field. Returns 1
+ * if data was available and returned, 0 if no data was available, -1
+ * on error.
+ */
+int fiid_iterator_get (fiid_iterator_t iter, uint64_t *val);
+
+/*
+ * fiid_iterator_get_data
+ *
+ * Get an array of data in the object for the current field. Returns
+ * length of data read on success, -1 on error. The current field
+ * must begin on a byte boundary and have a data bit length that is a
+ * multiple of 8.
+ */
+int fiid_iterator_get_data (fiid_iterator_t iter,
+ void *data,
+ unsigned int data_len);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* FIID_H */
diff --git a/source/freeipmi/usr/include/freeipmi/freeipmi.h b/source/freeipmi/usr/include/freeipmi/freeipmi.h
new file mode 100644
index 00000000..c8a04028
--- /dev/null
+++ b/source/freeipmi/usr/include/freeipmi/freeipmi.h
@@ -0,0 +1,243 @@
+/*
+ * Copyright (C) 2003-2012 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 3 of the License, 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, see .
+ *
+ */
+
+#ifndef FREEIPMI_H
+#define FREEIPMI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include