summaryrefslogtreecommitdiff
path: root/include/ipmitool/ipmi_user.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ipmitool/ipmi_user.h')
-rw-r--r--include/ipmitool/ipmi_user.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/ipmitool/ipmi_user.h b/include/ipmitool/ipmi_user.h
index fd727ca..a3cebd9 100644
--- a/include/ipmitool/ipmi_user.h
+++ b/include/ipmitool/ipmi_user.h
@@ -30,8 +30,7 @@
* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*/
-#ifndef IPMI_USER_H
-#define IPMI_USER_H
+#pragma once
#if HAVE_CONFIG_H
# include <config.h>
@@ -48,6 +47,9 @@
#define IPMI_USER_ENABLE_DISABLED 0x80
#define IPMI_USER_ENABLE_RESERVED 0xC0
+#define IPMI_UID_MASK 0x3F /* The user_id is 6-bit and is usually in bits [5:0] */
+#define IPMI_UID(id) ((id) & IPMI_UID_MASK)
+
/* (22.27) Get and (22.26) Set User Access */
struct user_access_t {
uint8_t callin_callback;
@@ -79,5 +81,3 @@ int _ipmi_set_user_access(struct ipmi_intf *intf,
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 */