summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.in2
-rw-r--r--include/ipmitool/Makefile.am2
-rw-r--r--include/ipmitool/Makefile.in4
-rw-r--r--include/ipmitool/helper.h3
-rw-r--r--include/ipmitool/ipmi.h3
-rw-r--r--include/ipmitool/ipmi_channel.h180
-rw-r--r--include/ipmitool/ipmi_dcmi.h141
-rw-r--r--include/ipmitool/ipmi_intf.h39
-rw-r--r--include/ipmitool/ipmi_lanp.h67
-rw-r--r--include/ipmitool/ipmi_mc.h3
-rw-r--r--include/ipmitool/ipmi_sel.h18
-rw-r--r--include/ipmitool/ipmi_user.h84
-rw-r--r--include/ipmitool/ipmi_vita.h49
13 files changed, 342 insertions, 253 deletions
diff --git a/include/Makefile.in b/include/Makefile.in
index 3b5ab4c..023ae85 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -251,6 +251,8 @@ INTF_OPEN = @INTF_OPEN@
INTF_OPEN_LIB = @INTF_OPEN_LIB@
INTF_SERIAL = @INTF_SERIAL@
INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
LD = @LD@
LDFLAGS = @LDFLAGS@
diff --git a/include/ipmitool/Makefile.am b/include/ipmitool/Makefile.am
index 925881e..5a9062c 100644
--- a/include/ipmitool/Makefile.am
+++ b/include/ipmitool/Makefile.am
@@ -38,5 +38,5 @@ noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
- ipmi_delloem.h ipmi_dcmi.h
+ ipmi_delloem.h ipmi_dcmi.h ipmi_vita.h
diff --git a/include/ipmitool/Makefile.in b/include/ipmitool/Makefile.in
index a45e1bf..cf46c1f 100644
--- a/include/ipmitool/Makefile.in
+++ b/include/ipmitool/Makefile.in
@@ -212,6 +212,8 @@ INTF_OPEN = @INTF_OPEN@
INTF_OPEN_LIB = @INTF_OPEN_LIB@
INTF_SERIAL = @INTF_SERIAL@
INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
LD = @LD@
LDFLAGS = @LDFLAGS@
@@ -315,7 +317,7 @@ noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
- ipmi_delloem.h ipmi_dcmi.h
+ ipmi_delloem.h ipmi_dcmi.h ipmi_vita.h
all: all-am
diff --git a/include/ipmitool/helper.h b/include/ipmitool/helper.h
index b6ee7fa..b7ad628 100644
--- a/include/ipmitool/helper.h
+++ b/include/ipmitool/helper.h
@@ -83,9 +83,12 @@ int str2ushort(const char * str, uint16_t * ushrt_ptr);
int str2char(const char * str, int8_t * chr_ptr);
int str2uchar(const char * str, uint8_t * uchr_ptr);
+int eval_ccode(const int ccode);
+
int is_fru_id(const char *argv_ptr, uint8_t *fru_id_ptr);
int is_ipmi_channel_num(const char *argv_ptr, uint8_t *channel_ptr);
int is_ipmi_user_id(const char *argv_ptr, uint8_t *ipmi_uid_ptr);
+int is_ipmi_user_priv_limit(const char *argv_ptr, uint8_t *ipmi_priv_limit_ptr);
uint16_t str2val(const char * str, const struct valstr * vs);
void print_valstr(const struct valstr * vs, const char * title, int loglevel);
diff --git a/include/ipmitool/ipmi.h b/include/ipmitool/ipmi.h
index 1fd3e2a..beda0ad 100644
--- a/include/ipmitool/ipmi.h
+++ b/include/ipmitool/ipmi.h
@@ -260,6 +260,7 @@ typedef enum IPMI_OEM {
IPMI_OEM_HITACHI_116 = 116,
IPMI_OEM_NEC = 119,
IPMI_OEM_TOSHIBA = 186,
+ IPMI_OEM_ERICSSON = 193,
IPMI_OEM_INTEL = 343,
IPMI_OEM_TATUNG = 373,
IPMI_OEM_HITACHI_399 = 399,
@@ -269,7 +270,9 @@ typedef enum IPMI_OEM {
IPMI_OEM_BROADCOM = 4413,
IPMI_OEM_MAGNUM = 5593,
IPMI_OEM_TYAN = 6653,
+ IPMI_OEM_QUANTA = 7244,
IPMI_OEM_NEWISYS = 9237,
+ IPMI_OEM_ADVANTECH = 10297,
IPMI_OEM_FUJITSU_SIEMENS = 10368,
IPMI_OEM_AVOCENT = 10418,
IPMI_OEM_PEPPERCON = 10437,
diff --git a/include/ipmitool/ipmi_channel.h b/include/ipmitool/ipmi_channel.h
index 7cbb9ad..89e4738 100644
--- a/include/ipmitool/ipmi_channel.h
+++ b/include/ipmitool/ipmi_channel.h
@@ -40,6 +40,7 @@
#define IPMI_GET_CHANNEL_AUTH_CAP 0x38
+#define IPMI_SET_CHANNEL_ACCESS 0x40
#define IPMI_GET_CHANNEL_ACCESS 0x41
#define IPMI_GET_CHANNEL_INFO 0x42
#define IPMI_SET_USER_ACCESS 0x43
@@ -49,6 +50,32 @@
#define IPMI_SET_USER_PASSWORD 0x47
#define IPMI_GET_CHANNEL_CIPHER_SUITES 0x54
+/* These are for channel_info_t.session_support */
+#define IPMI_CHANNEL_SESSION_LESS 0x00
+#define IPMI_CHANNEL_SESSION_SINGLE 0x40
+#define IPMI_CHANNEL_SESSION_MULTI 0x80
+#define IPMI_CHANNEL_SESSION_BASED 0xC0
+
+/* (22.24) Get Channel Info */
+struct channel_info_t {
+ uint8_t channel;
+ uint8_t medium;
+ uint8_t protocol;
+ uint8_t session_support;
+ uint8_t active_sessions;
+ uint8_t vendor_id[3];
+ uint8_t aux_info[2];
+};
+
+/* (22.23) Get Channel Access */
+struct channel_access_t {
+ uint8_t access_mode;
+ uint8_t alerting;
+ uint8_t channel;
+ uint8_t per_message_auth;
+ uint8_t privilege_limit;
+ uint8_t user_level_auth;
+};
/*
* The Get Authentication Capabilities response structure
@@ -101,153 +128,12 @@ struct get_channel_auth_cap_rsp {
#pragma pack(0)
#endif
-
-
-/*
- * The Get Channel Info response structure
- * From table 22-29 of the IPMI v2.0 spec
- */
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(1)
-#endif
-struct get_channel_info_rsp {
-#if WORDS_BIGENDIAN
- uint8_t __reserved1 : 4;
- uint8_t channel_number : 4; /* channel number */
-#else
- uint8_t channel_number : 4; /* channel number */
- uint8_t __reserved1 : 4;
-#endif
-#if WORDS_BIGENDIAN
- uint8_t __reserved2 : 1;
- uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
-#else
- uint8_t channel_medium : 7; /* Channel medium type per table 6-3 */
- uint8_t __reserved2 : 1;
-#endif
-#if WORDS_BIGENDIAN
- uint8_t __reserved3 : 3;
- uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
-#else
- uint8_t channel_protocol : 5; /* Channel protocol per table 6-2 */
- uint8_t __reserved3 : 3;
-#endif
-#if WORDS_BIGENDIAN
- uint8_t session_support : 2; /* Description of session support */
- uint8_t active_sessions : 6; /* Count of active sessions */
-#else
- uint8_t active_sessions : 6; /* Count of active sessions */
- uint8_t session_support : 2; /* Description of session support */
-#endif
- uint8_t vendor_id[3]; /* For OEM that specified the protocol */
- uint8_t aux_info[2]; /* Not used*/
-} ATTRIBUTE_PACKING;
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(0)
-#endif
-
-
-
-/*
- * The Get Channel Access response structure
- * From table 22-28 of the IPMI v2.0 spec
- */
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(1)
-#endif
-struct get_channel_access_rsp {
-#if WORDS_BIGENDIAN
- uint8_t __reserved1 : 2;
- uint8_t alerting : 1;
- uint8_t per_message_auth : 1;
- uint8_t user_level_auth : 1;
- uint8_t access_mode : 3;
-#else
- uint8_t access_mode : 3;
- uint8_t user_level_auth : 1;
- uint8_t per_message_auth : 1;
- uint8_t alerting : 1;
- uint8_t __reserved1 : 2;
-#endif
-#if WORDS_BIGENDIAN
- uint8_t __reserved2 : 4;
- uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
-#else
- uint8_t channel_priv_limit : 4; /* Channel privilege level limit */
- uint8_t __reserved2 : 4;
-#endif
-} ATTRIBUTE_PACKING;
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(0)
-#endif
-
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(1)
-#endif
-struct get_user_access_rsp {
-#if WORDS_BIGENDIAN
- uint8_t __reserved1 : 2;
- uint8_t max_user_ids : 6;
- uint8_t __reserved2 : 2;
- uint8_t enabled_user_ids : 6;
- uint8_t __reserved3 : 2;
- uint8_t fixed_user_ids : 6;
- uint8_t __reserved4 : 1;
- uint8_t callin_callback : 1;
- uint8_t link_auth : 1;
- uint8_t ipmi_messaging : 1;
- uint8_t privilege_limit : 4;
-#else
- uint8_t max_user_ids : 6;
- uint8_t __reserved1 : 2;
- uint8_t enabled_user_ids : 6;
- uint8_t __reserved2 : 2;
- uint8_t fixed_user_ids : 6;
- uint8_t __reserved3 : 2;
- uint8_t privilege_limit : 4;
- uint8_t ipmi_messaging : 1;
- uint8_t link_auth : 1;
- uint8_t callin_callback : 1;
- uint8_t __reserved4 : 1;
-#endif
-} ATTRIBUTE_PACKING;
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(0)
-#endif
-
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(1)
-#endif
-struct set_user_access_data {
-#if WORDS_BIGENDIAN
- uint8_t change_bits : 1;
- uint8_t callin_callback : 1;
- uint8_t link_auth : 1;
- uint8_t ipmi_messaging : 1;
- uint8_t channel : 4;
- uint8_t __reserved1 : 2;
- uint8_t user_id : 6;
- uint8_t __reserved2 : 4;
- uint8_t privilege_limit : 4;
- uint8_t __reserved3 : 4;
- uint8_t session_limit : 4;
-#else
- uint8_t channel : 4;
- uint8_t ipmi_messaging : 1;
- uint8_t link_auth : 1;
- uint8_t callin_callback : 1;
- uint8_t change_bits : 1;
- uint8_t user_id : 6;
- uint8_t __reserved1 : 2;
- uint8_t privilege_limit : 4;
- uint8_t __reserved2 : 4;
- uint8_t session_limit : 4;
- uint8_t __reserved3 : 4;
-#endif
-} ATTRIBUTE_PACKING;
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(0)
-#endif
+int _ipmi_get_channel_access(struct ipmi_intf *intf,
+ struct channel_access_t *channel_access,
+ uint8_t get_volatile_settings);
+int _ipmi_set_channel_access(struct ipmi_intf *intf,
+ struct channel_access_t channel_access, uint8_t access_option,
+ uint8_t privilege_option);
uint8_t ipmi_get_channel_medium(struct ipmi_intf * intf, uint8_t channel);
uint8_t ipmi_current_channel_medium(struct ipmi_intf * intf);
diff --git a/include/ipmitool/ipmi_dcmi.h b/include/ipmitool/ipmi_dcmi.h
index ce90857..15a959f 100644
--- a/include/ipmitool/ipmi_dcmi.h
+++ b/include/ipmitool/ipmi_dcmi.h
@@ -52,6 +52,53 @@
#define GOOD_PWR_GLIMIT_CCODE(ccode) ((ccode = ((ccode == 0x80) ? 0 : ccode)))
#define GOOD_ASSET_TAG_CCODE(ccode) ((ccode = (((ccode == 0x80) || (ccode == 0x81) || (ccode == 0x82) || (ccode == 0x83)) ? 0 : ccode)))
+/* External Node Manager Configuration and Control Commands per spec 2.0 */
+
+#define IPMI_NM_POLICY_CTL 0xC0
+#define IPMI_NM_SET_POLICY 0xC1
+#define IPMI_NM_GET_POLICY 0xC2
+#define IPMI_NM_SET_ALERT_TH 0xC3
+#define IPMI_NM_GET_ALERT_TH 0xC4
+#define IPMI_NM_SET_SUSPEND 0xC5
+#define IPMI_NM_GET_SUSPEND 0xC6
+#define IPMI_NM_RESET_STATS 0xC7
+#define IPMI_NM_GET_STATS 0xC8
+#define IPMI_NM_GET_CAP 0xC9
+#define IPMI_NM_GET_VERSION 0xCA
+#define IPMI_NM_SET_POWER 0xCB
+#define IPMI_NM_SET_ALERT_DS 0xCE
+#define IPMI_NM_GET_ALERT_DS 0xCF
+#define IPMI_NM_LIMITING 0xF2
+
+/* Node Manager Policy Control Flags */
+#define IPMI_NM_GLOBAL_ENABLE 0x01
+#define IPMI_NM_DOMAIN_ENABLE 0x02
+#define IPMI_NM_PER_POLICY_ENABLE 0x04
+
+/* Node Manager Set Policy Enable */
+#define IPMI_NM_POLICY_ENABLE 0x10
+
+/* Node Manager Policy Trigger Codes */
+#define IPMI_NM_NO_POLICY_TRIG 0x00
+#define IPMI_NM_TEMP_TRIGGER 0x01
+#define IPMI_NM_NO_READ_TRIG 0x02
+#define IPMI_NM_RESET_TRIGGER 0x03
+#define IPMI_NM_BOOT_TRIGGER 0x04
+
+/* Policy Exception Actions flags */
+#define IPMI_NM_POLICY_ALERT 0x01
+#define IPMI_NM_POLICY_SHUT 0x02
+
+/* Power Correction codes for Policy action */
+#define IPMI_NM_PWR_AUTO_CORR 0x00
+#define IPMI_NM_PWR_SOFT_CORR 0x01
+#define IPMI_NM_PWR_AGGR_CORR 0x02
+
+/* Set Threshold message size */
+#define IPMI_NM_SET_THRESH_LEN 12
+
+/* Number of Suspend Periods */
+#define IPMI_NM_SUSPEND_PERIOD_MAX 5
struct dcmi_cmd {
uint16_t val;
@@ -126,4 +173,98 @@ struct thermal_limit {
int ipmi_dcmi_main(struct ipmi_intf * intf, int argc, char ** argv);
+/* Node Manager discover command */
+struct nm_discover {
+ uint8_t intel_id[3]; /* Always returns 000157 */
+ uint8_t nm_version;
+ uint8_t ipmi_version;
+ uint8_t patch_version;
+ uint8_t major_rev;
+ uint8_t minor_rev;
+} __attribute__ ((packed));
+
+/* Node Manager get capabilites command */
+struct nm_capability {
+ uint8_t intel_id[3];
+ uint8_t max_settings;
+ uint16_t max_value; /* max power/thermal/time after reset */
+ uint16_t min_value; /* min "" */
+ uint32_t min_corr; /* min correction time inmillesecs */
+ uint32_t max_corr;
+ uint16_t min_stats;
+ uint16_t max_stats;
+ uint8_t scope;
+} __attribute__ ((packed));
+
+/* Node Manager get statistics command */
+struct nm_statistics {
+ uint8_t intel_id[3];
+ uint16_t curr_value;
+ uint16_t min_value;
+ uint16_t max_value;
+ uint16_t ave_value;
+ uint32_t time_stamp;
+ uint32_t stat_period;
+ uint8_t id_state;
+} __attribute__ ((packed));
+
+/* Node Manager set policy */
+struct nm_policy {
+ uint8_t intel_id[3];
+ uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
+ uint8_t policy_id;
+ uint8_t policy_type; /* 0:3 trigger type 4 = action 5:6 correction */
+ uint8_t policy_exception; /* exception actions */
+ uint16_t policy_limits;
+ uint32_t corr_time;
+ uint16_t trigger_limit;
+ uint16_t stats_period;
+} __attribute__ ((packed));
+
+/* Node Maager get policy */
+struct nm_get_policy {
+ uint8_t intel_id[3];
+ uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
+ uint8_t policy_type; /* 0:3 trigger type 4 = action 5:6 correction */
+ uint8_t policy_exception; /* exception actions */
+ uint16_t policy_limits;
+ uint32_t corr_time;
+ uint16_t trigger_limit;
+ uint16_t stats_period;
+} __attribute__ ((packed));
+
+/* Node Manager set alert destination */
+struct nm_set_alert {
+ uint8_t intel_id[3];
+ uint8_t chan; /* 0:3 BMC chan, 4:6 reserved, bit 7=0 register alert reciever =1 invalidate */
+ uint8_t dest; /* lan destination */
+ uint8_t string; /* alert string selector */
+} __attribute__ ((packed));
+
+/* Node Manager set alert threshold */
+struct nm_thresh {
+ uint8_t intel_id[3];
+ uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
+ uint8_t policy_id;
+ uint8_t count;
+ uint16_t thresholds[3];
+} __attribute__ ((packed));
+
+/* Node Manager suspend period struct */
+struct nm_period {
+ uint8_t start;
+ uint8_t stop;
+ uint8_t repeat;
+} __attribute__ ((packed));
+
+/* Node Manager set suspend period */
+struct nm_suspend {
+ uint8_t intel_id[3];
+ uint8_t domain; /* 0:3 are domain, 4 = Policy enabled */
+ uint8_t policy_id;
+ uint8_t count;
+ struct nm_period period[IPMI_NM_SUSPEND_PERIOD_MAX];
+} __attribute__ ((packed));
+
+int ipmi_nm_main(struct ipmi_intf * intf, int argc, char ** argv);
#endif /*IPMI_DCMI_H*/
diff --git a/include/ipmitool/ipmi_intf.h b/include/ipmitool/ipmi_intf.h
index f9f6592..67f6019 100644
--- a/include/ipmitool/ipmi_intf.h
+++ b/include/ipmitool/ipmi_intf.h
@@ -62,36 +62,43 @@ enum LANPLUS_SESSION_STATE {
#define IPMI_SIK_BUFFER_SIZE 20
#define IPMI_KG_BUFFER_SIZE 21 /* key plus null byte */
-struct ipmi_session {
- char *hostname; /* Numeric IP adress or DNS name - see RFC 1034/RFC 1035 */
+struct ipmi_session_params {
+ char * hostname;
uint8_t username[17];
- uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
- uint8_t challenge[16];
- uint8_t authtype;
+ uint8_t authcode_set[IPMI_AUTHCODE_BUFFER_SIZE + 1];
uint8_t authtype_set;
-#define IPMI_AUTHSTATUS_PER_MSG_DISABLED 0x10
-#define IPMI_AUTHSTATUS_PER_USER_DISABLED 0x08
-#define IPMI_AUTHSTATUS_NONNULL_USERS_ENABLED 0x04
-#define IPMI_AUTHSTATUS_NULL_USERS_ENABLED 0x02
-#define IPMI_AUTHSTATUS_ANONYMOUS_USERS_ENABLED 0x01
- uint8_t authstatus;
- uint8_t authextra;
uint8_t privlvl;
uint8_t cipher_suite_id;
char sol_escape_char;
int password;
int port;
- int active;
int retry;
+ uint32_t timeout;
+ uint8_t kg[IPMI_KG_BUFFER_SIZE]; /* BMC key */
+ uint8_t lookupbit;
+};
+#define IPMI_AUTHSTATUS_PER_MSG_DISABLED 0x10
+#define IPMI_AUTHSTATUS_PER_USER_DISABLED 0x08
+#define IPMI_AUTHSTATUS_NONNULL_USERS_ENABLED 0x04
+#define IPMI_AUTHSTATUS_NULL_USERS_ENABLED 0x02
+#define IPMI_AUTHSTATUS_ANONYMOUS_USERS_ENABLED 0x01
+
+struct ipmi_session {
+ int active;
uint32_t session_id;
uint32_t in_seq;
uint32_t out_seq;
+
+ uint8_t authcode[IPMI_AUTHCODE_BUFFER_SIZE + 1];
+ uint8_t challenge[16];
+ uint8_t authtype;
+ uint8_t authstatus;
+ uint8_t authextra;
uint32_t timeout;
struct sockaddr_storage addr;
socklen_t addrlen;
- int ai_family; /* Protocol family for socket. */
/*
* This struct holds state data specific to IPMI v2 / RMCP+ sessions
@@ -107,7 +114,6 @@ struct ipmi_session {
uint8_t integrity_alg;
uint8_t crypt_alg;
uint8_t max_priv_level;
- uint8_t lookupbit;
uint32_t console_id;
uint32_t bmc_id;
@@ -168,8 +174,11 @@ struct ipmi_intf {
int abort;
int noanswer;
int picmg_avail;
+ int vita_avail;
IPMI_OEM manufacturer_id;
+ int ai_family;
+ struct ipmi_session_params ssn_params;
struct ipmi_session * session;
struct ipmi_oem_handle * oem;
struct ipmi_cmd * cmdlist;
diff --git a/include/ipmitool/ipmi_lanp.h b/include/ipmitool/ipmi_lanp.h
index 1aaae5e..ba25582 100644
--- a/include/ipmitool/ipmi_lanp.h
+++ b/include/ipmitool/ipmi_lanp.h
@@ -76,6 +76,8 @@ enum {
IPMI_LANP_RMCP_CIPHER_SUPPORT,
IPMI_LANP_RMCP_CIPHERS,
IPMI_LANP_RMCP_PRIV_LEVELS,
+ IPMI_LANP_VLAN_TAGS,
+ IPMI_LANP_BAD_PASS_THRESH,
IPMI_LANP_OEM_ALERT_STRING=96,
IPMI_LANP_ALERT_RETRY=97,
IPMI_LANP_UTC_OFFSET=98,
@@ -92,38 +94,39 @@ static struct lan_param {
uint8_t * data;
int data_len;
} ipmi_lan_params[] __attribute__((unused)) = {
- { IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress" },
- { IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support" },
- { IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable" },
- { IPMI_LANP_IP_ADDR, 4, "IP Address" },
- { IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source" },
- { IPMI_LANP_MAC_ADDR, 6, "MAC Address" }, /* 5 */
- { IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask" },
- { IPMI_LANP_IP_HEADER, 3, "IP Header" },
- { IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port" },
- { IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port" },
- { IPMI_LANP_BMC_ARP, 1, "BMC ARP Control" }, /* 10 */
- { IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl" },
- { IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP" },
- { IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC" },
- { IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP" },
- { IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC" }, /* 15 */
- { IPMI_LANP_SNMP_STRING, 18, "SNMP Community String" },
- { IPMI_LANP_NUM_DEST, 1, "Number of Destinations"},
- { IPMI_LANP_DEST_TYPE, 4, "Destination Type" },
- { IPMI_LANP_DEST_ADDR, 13, "Destination Addresses" },
- { IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID" }, /* 20 */
- { IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority" },
- { IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count" },
- { IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites" },
- { IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max" },
- { IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String" }, /* 25 */
- { IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm" },
- { IPMI_LANP_UTC_OFFSET, 3, "UTC Offset" },
- { IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP" },
- { IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC" },
- { IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable" }, /* 30 */
- { IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode" },
+ { IPMI_LANP_SET_IN_PROGRESS, 1, "Set in Progress", NULL, 0 },
+ { IPMI_LANP_AUTH_TYPE, 1, "Auth Type Support", NULL, 0 },
+ { IPMI_LANP_AUTH_TYPE_ENABLE, 5, "Auth Type Enable", NULL, 0 },
+ { IPMI_LANP_IP_ADDR, 4, "IP Address", NULL, 0 },
+ { IPMI_LANP_IP_ADDR_SRC, 1, "IP Address Source", NULL, 0 },
+ { IPMI_LANP_MAC_ADDR, 6, "MAC Address", NULL, 0 }, /* 5 */
+ { IPMI_LANP_SUBNET_MASK, 4, "Subnet Mask", NULL, 0 },
+ { IPMI_LANP_IP_HEADER, 3, "IP Header", NULL, 0 },
+ { IPMI_LANP_PRI_RMCP_PORT, 2, "Primary RMCP Port", NULL, 0 },
+ { IPMI_LANP_SEC_RMCP_PORT, 2, "Secondary RMCP Port", NULL, 0 },
+ { IPMI_LANP_BMC_ARP, 1, "BMC ARP Control", NULL, 0}, /* 10 */
+ { IPMI_LANP_GRAT_ARP, 1, "Gratituous ARP Intrvl", NULL, 0 },
+ { IPMI_LANP_DEF_GATEWAY_IP, 4, "Default Gateway IP", NULL, 0 },
+ { IPMI_LANP_DEF_GATEWAY_MAC, 6, "Default Gateway MAC", NULL, 0 },
+ { IPMI_LANP_BAK_GATEWAY_IP, 4, "Backup Gateway IP", NULL, 0 },
+ { IPMI_LANP_BAK_GATEWAY_MAC, 6, "Backup Gateway MAC", NULL, 0 }, /* 15 */
+ { IPMI_LANP_SNMP_STRING, 18, "SNMP Community String", NULL, 0 },
+ { IPMI_LANP_NUM_DEST, 1, "Number of Destinations", NULL, 0 },
+ { IPMI_LANP_DEST_TYPE, 4, "Destination Type", NULL, 0 },
+ { IPMI_LANP_DEST_ADDR, 13, "Destination Addresses", NULL, 0 },
+ { IPMI_LANP_VLAN_ID, 2, "802.1q VLAN ID", NULL, 0 }, /* 20 */
+ { IPMI_LANP_VLAN_PRIORITY, 1, "802.1q VLAN Priority", NULL, 0 },
+ { IPMI_LANP_RMCP_CIPHER_SUPPORT,1, "RMCP+ Cipher Suite Count", NULL, 0 },
+ { IPMI_LANP_RMCP_CIPHERS, 16, "RMCP+ Cipher Suites", NULL, 0 },
+ { IPMI_LANP_RMCP_PRIV_LEVELS, 9, "Cipher Suite Priv Max", NULL, 0 },
+ { IPMI_LANP_BAD_PASS_THRESH, 6, "Bad Password Threshold", NULL, 0 },
+ { IPMI_LANP_OEM_ALERT_STRING, 28, "OEM Alert String", NULL, 0 }, /* 25 */
+ { IPMI_LANP_ALERT_RETRY, 1, "Alert Retry Algorithm", NULL, 0 },
+ { IPMI_LANP_UTC_OFFSET, 3, "UTC Offset", NULL, 0 },
+ { IPMI_LANP_DHCP_SERVER_IP, 4, "DHCP Server IP", NULL, 0 },
+ { IPMI_LANP_DHCP_SERVER_MAC, 6, "DHDP Server MAC", NULL, 0},
+ { IPMI_LANP_DHCP_ENABLE, 1, "DHCP Enable", NULL, 0 }, /* 30 */
+ { IPMI_LANP_CHAN_ACCESS_MODE, 2, "Channel Access Mode", NULL, 0 },
{ -1 }
};
diff --git a/include/ipmitool/ipmi_mc.h b/include/ipmitool/ipmi_mc.h
index 5546a3a..a840f78 100644
--- a/include/ipmitool/ipmi_mc.h
+++ b/include/ipmitool/ipmi_mc.h
@@ -157,6 +157,9 @@ struct ipm_get_watchdog_rsp {
#define IPMI_SYSINFO_SET0_SIZE 14
#define IPMI_SYSINFO_SETN_SIZE 16
+/* System Information "Parameter selector" values: */
+#define IPMI_SYSINFO_SET_STATE 0x00
+#define IPMI_SYSINFO_SYSTEM_FW_VERSION 0x01
#define IPMI_SYSINFO_HOSTNAME 0x02
#define IPMI_SYSINFO_PRIMARY_OS_NAME 0x03
#define IPMI_SYSINFO_OS_NAME 0x04
diff --git a/include/ipmitool/ipmi_sel.h b/include/ipmitool/ipmi_sel.h
index cacdb2d..53a8c1f 100644
--- a/include/ipmitool/ipmi_sel.h
+++ b/include/ipmitool/ipmi_sel.h
@@ -690,41 +690,41 @@ static struct ipmi_event_sensor_types sensor_specific_types[] __attribute__((unu
};
static uint16_t supermicro_x9dal[] = {
- 0x0635
+ 0x0635, 0xFFFF
};
static uint16_t supermicro_x9db[] = {
- 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637
+ 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0xFFFF
};
static uint16_t supermicro_x9sb[] = {
- 0x0651
+ 0x0651, 0xFFFF
};
static uint16_t supermicro_x9[] = {
- 0x0635, 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0x0651
+ 0x0635, 0x0733, 0x0722, 0x0703, 0x0721, 0x0716, 0x0637, 0x0651, 0xFFFF
};
static uint16_t supermicro_b8[] = {
- 0x000A, 0x061c, 0x0620, 0x0101, 0x061f, 0x0612, 0x061e
+ 0x000A, 0x061c, 0x0620, 0x0101, 0x061f, 0x0612, 0x061e, 0xFFFF
};
static uint16_t supermicro_h8[] = {
0xa111, 0x0408, 0x0811, 0x1411, 0x0911, 0x1211, 0x1011, 0xcd11, 0x1111, 0xbe11, 0xce11, 0xbd11,
0xbc11, 0xa911, 0xaa11, 0xbd11, 0xcb11, 0xad11, 0xa811, 0xac11, 0xaf11, 0xa511, 0xa011, 0x1611,
0x2511, 0xbf11, 0x1511, 0x2211, 0x2411, 0x1911, 0xab11, 0xd011, 0xae11, 0xca11, 0x0409, 0xa211,
- 0xa311, 0x1311, 0xba11, 0xa711, 0xd111, 0x1711, 0xcf11, 0x2011, 0x1811
+ 0xa311, 0x1311, 0xba11, 0xa711, 0xd111, 0x1711, 0xcf11, 0x2011, 0x1811, 0xFFFF
};
static uint16_t supermicro_p8[] = {
- 0x6480, 0x7380, 0x6280, 0x7480, 0x5980
+ 0x6480, 0x7380, 0x6280, 0x7480, 0x5980, 0xFFFF
};
static uint16_t supermicro_x8[] = {
0xa880, 0x0403, 0x0100, 0x0601, 0x0001, 0x0404, 0x0606, 0x0608, 0x0632, 0x0400, 0x0401, 0x0006,
0x040a, 0xf280, 0x060f, 0x0609, 0x0008, 0x0613, 0x061b, 0x0007, 0x0600, 0x060c, 0x060d, 0x0614,
0x060c, 0x0003, 0x040b, 0x0621, 0x0610, 0x0638, 0xf380, 0x060b, 0x040d, 0x0605, 0x062d, 0x060e,
- 0x061a, 0xf580, 0x062e, 0x0009
+ 0x061a, 0xf580, 0x062e, 0x0009, 0xFFFF
};
static uint16_t supermicro_X8[] = {
@@ -736,7 +736,7 @@ static uint16_t supermicro_X8[] = {
0x0601, 0x0001, 0x0404, 0x0606, 0x0608, 0x0632, 0x0400, 0x0401, 0x0006, 0x040a, 0xf280, 0x060f,
0x0609, 0x0008, 0x0613, 0x061b, 0x0007, 0x0600, 0x060c, 0x060d, 0x0614, 0x060c, 0x0003, 0x040b,
0x0621, 0x0610, 0x0638, 0xf380, 0x060b, 0x040d, 0x0605, 0x062d, 0x060e, 0x061a, 0xf580, 0x062e,
- 0x0009
+ 0x0009, 0xFFFF
};
int ipmi_sel_main(struct ipmi_intf *, int, char **);
diff --git a/include/ipmitool/ipmi_user.h b/include/ipmitool/ipmi_user.h
index 4a8e481..fd727ca 100644
--- a/include/ipmitool/ipmi_user.h
+++ b/include/ipmitool/ipmi_user.h
@@ -38,58 +38,46 @@
#endif
#include <ipmitool/ipmi.h>
+#define IPMI_PASSWORD_DISABLE_USER 0x00
+#define IPMI_PASSWORD_ENABLE_USER 0x01
+#define IPMI_PASSWORD_SET_PASSWORD 0x02
+#define IPMI_PASSWORD_TEST_PASSWORD 0x03
-/*
- * The GET USER ACCESS response from table 22-32 of the IPMI v2.0 spec
- */
-struct user_access_rsp {
-#if WORDS_BIGENDIAN
- uint8_t __reserved1 : 2;
- uint8_t maximum_ids : 6;
-#else
- uint8_t maximum_ids : 6;
- uint8_t __reserved1 : 2;
-#endif
-
-#if WORDS_BIGENDIAN
- uint8_t __reserved2 : 2;
- uint8_t enabled_user_count : 6;
-#else
- uint8_t enabled_user_count : 6;
- uint8_t __reserved2 : 2;
-#endif
-
-#if WORDS_BIGENDIAN
- uint8_t __reserved3 : 2;
- uint8_t fixed_name_count : 6;
-#else
- uint8_t fixed_name_count : 6;
- uint8_t __reserved3 : 2;
-#endif
-
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(1)
-#endif
-#if WORDS_BIGENDIAN
- uint8_t __reserved4 : 1;
- uint8_t no_callin_access : 1;
- uint8_t link_auth_access : 1;
- uint8_t ipmi_messaging_access : 1;
- uint8_t channel_privilege_limit : 4;
-#else
- uint8_t channel_privilege_limit : 4;
- uint8_t ipmi_messaging_access : 1;
- uint8_t link_auth_access : 1;
- uint8_t no_callin_access : 1;
- uint8_t __reserved4 : 1;
-#endif
-} ATTRIBUTE_PACKING;
-#ifdef HAVE_PRAGMA_PACK
-#pragma pack(0)
-#endif
+#define IPMI_USER_ENABLE_UNSPECIFIED 0x00
+#define IPMI_USER_ENABLE_ENABLED 0x40
+#define IPMI_USER_ENABLE_DISABLED 0x80
+#define IPMI_USER_ENABLE_RESERVED 0xC0
+/* (22.27) Get and (22.26) Set User Access */
+struct user_access_t {
+ uint8_t callin_callback;
+ uint8_t channel;
+ uint8_t enabled_user_ids;
+ uint8_t enable_status;
+ uint8_t fixed_user_ids;
+ uint8_t ipmi_messaging;
+ uint8_t link_auth;
+ uint8_t max_user_ids;
+ uint8_t privilege_limit;
+ uint8_t session_limit;
+ uint8_t user_id;
+};
+/* (22.29) Get User Name */
+struct user_name_t {
+ uint8_t user_id;
+ uint8_t user_name[17];
+};
int ipmi_user_main(struct ipmi_intf *, int, char **);
+int _ipmi_get_user_access(struct ipmi_intf *intf,
+ struct user_access_t *user_access_rsp);
+int _ipmi_get_user_name(struct ipmi_intf *intf, struct user_name_t *user_name);
+int _ipmi_set_user_access(struct ipmi_intf *intf,
+ struct user_access_t *user_access_req,
+ uint8_t change_priv_limit_only);
+int _ipmi_set_user_password(struct ipmi_intf *intf,
+ uint8_t user_id, uint8_t operation,
+ const char *password, uint8_t is_twenty_byte);
#endif /* IPMI_USER_H */
diff --git a/include/ipmitool/ipmi_vita.h b/include/ipmitool/ipmi_vita.h
new file mode 100644
index 0000000..71d471a
--- /dev/null
+++ b/include/ipmitool/ipmi_vita.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) Pigeon Point Systems. All right reserved
+ */
+
+#ifndef _IPMI_VITA_H_
+#define _IPMI_VITA_H_
+
+/* VITA 46.11 commands */
+#define VITA_GET_VSO_CAPABILITIES_CMD 0x00
+#define VITA_FRU_CONTROL_CMD 0x04
+#define VITA_GET_FRU_LED_PROPERTIES_CMD 0x05
+#define VITA_GET_LED_COLOR_CAPABILITIES_CMD 0x06
+#define VITA_SET_FRU_LED_STATE_CMD 0x07
+#define VITA_GET_FRU_LED_STATE_CMD 0x08
+#define VITA_SET_FRU_STATE_POLICY_BITS_CMD 0x0A
+#define VITA_GET_FRU_STATE_POLICY_BITS_CMD 0x0B
+#define VITA_SET_FRU_ACTIVATION_CMD 0x0C
+#define VITA_GET_FRU_ADDRESS_INFO_CMD 0x40
+
+/* VITA 46.11 site types */
+#define VITA_FRONT_VPX_MODULE 0x00
+#define VITA_POWER_ENTRY 0x01
+#define VITA_CHASSIS_FRU 0x02
+#define VITA_DEDICATED_CHMC 0x03
+#define VITA_FAN_TRAY 0x04
+#define VITA_FAN_TRAY_FILTER 0x05
+#define VITA_ALARM_PANEL 0x06
+#define VITA_XMC 0x07
+#define VITA_VPX_RTM 0x09
+#define VITA_FRONT_VME_MODULE 0x0A
+#define VITA_FRONT_VXS_MODULE 0x0B
+#define VITA_POWER_SUPPLY 0x0C
+#define VITA_FRONT_VITA62_MODULE 0x0D
+#define VITA_71_MODULE 0x0E
+#define VITA_FMC 0x0F
+
+
+#define GROUP_EXT_VITA 0x03
+
+extern uint8_t
+vita_discover(struct ipmi_intf *intf);
+
+extern uint8_t
+ipmi_vita_ipmb_address(struct ipmi_intf *intf);
+
+extern int
+ipmi_vita_main(struct ipmi_intf * intf, int argc, char ** argv);
+
+#endif /* _IPMI_VITA_H_ */