summaryrefslogtreecommitdiff
path: root/include/ipmitool/ipmi_user.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-20 02:12:42 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-20 02:12:42 +0100
commita61a5992cefc2204a99f25b2395b108092098e2c (patch)
tree3b25da535866adf0458f6d172fd242fc933c77db /include/ipmitool/ipmi_user.h
parent15edf42f095e3cc26e372547ebcaaae558d0cce2 (diff)
parent97d6a2e491c6ed08473beb2c4bac47c5cbc1201a (diff)
Merge tag 'upstream/1.8.16'
Upstream version 1.8.16
Diffstat (limited to 'include/ipmitool/ipmi_user.h')
-rw-r--r--include/ipmitool/ipmi_user.h84
1 files changed, 36 insertions, 48 deletions
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 */