mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
clean up some strval defines that were causing problems with -Wall
This commit is contained in:
parent
3c78114ccc
commit
94245169c1
@ -52,13 +52,6 @@
|
|||||||
#define IPMI_SET_USER_PASSWORD 0x47
|
#define IPMI_SET_USER_PASSWORD 0x47
|
||||||
|
|
||||||
|
|
||||||
#define IPMI_1_5_AUTH_TYPE_BIT_NONE 0x01
|
|
||||||
#define IPMI_1_5_AUTH_TYPE_BIT_MD2 0x02
|
|
||||||
#define IPMI_1_5_AUTH_TYPE_BIT_MD5 0x04
|
|
||||||
#define IPMI_1_5_AUTH_TYPE_BIT_PASSWORD 0x10
|
|
||||||
#define IPMI_1_5_AUTH_TYPE_BIT_OEM 0x20
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The Get Authentication Capabilities response structure
|
* The Get Authentication Capabilities response structure
|
||||||
* From table 22-15 of the IPMI v2.0 spec
|
* From table 22-15 of the IPMI v2.0 spec
|
||||||
|
@ -56,15 +56,20 @@
|
|||||||
#define IPMI_GET_SEL_TIME 0x48
|
#define IPMI_GET_SEL_TIME 0x48
|
||||||
#define IPMI_SET_SEL_TIME 0x49
|
#define IPMI_SET_SEL_TIME 0x49
|
||||||
|
|
||||||
|
#define IPMI_1_5_AUTH_TYPE_BIT_NONE 0x01
|
||||||
|
#define IPMI_1_5_AUTH_TYPE_BIT_MD2 0x02
|
||||||
|
#define IPMI_1_5_AUTH_TYPE_BIT_MD5 0x04
|
||||||
|
#define IPMI_1_5_AUTH_TYPE_BIT_PASSWORD 0x10
|
||||||
|
#define IPMI_1_5_AUTH_TYPE_BIT_OEM 0x20
|
||||||
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_NONE 0x0
|
#define IPMI_SESSION_AUTHTYPE_NONE 0x0
|
||||||
#define IPMI_SESSION_AUTHTYPE_MD2 0x1
|
#define IPMI_SESSION_AUTHTYPE_MD2 0x1
|
||||||
#define IPMI_SESSION_AUTHTYPE_MD5 0x2
|
#define IPMI_SESSION_AUTHTYPE_MD5 0x2
|
||||||
#define IPMI_SESSION_AUTHTYPE_KEY 0x4
|
#define IPMI_SESSION_AUTHTYPE_KEY 0x4
|
||||||
|
#define IPMI_SESSION_AUTHTYPE_PASSWORD IPMI_SESSION_AUTHTYPE_KEY
|
||||||
#define IPMI_SESSION_AUTHTYPE_OEM 0x5
|
#define IPMI_SESSION_AUTHTYPE_OEM 0x5
|
||||||
#define IPMI_SESSION_AUTHTYPE_RMCP_PLUS 0x6
|
#define IPMI_SESSION_AUTHTYPE_RMCP_PLUS 0x6
|
||||||
|
|
||||||
|
|
||||||
#define IPMI_SESSION_PRIV_CALLBACK 0x1
|
#define IPMI_SESSION_PRIV_CALLBACK 0x1
|
||||||
#define IPMI_SESSION_PRIV_USER 0x2
|
#define IPMI_SESSION_PRIV_USER 0x2
|
||||||
#define IPMI_SESSION_PRIV_OPERATOR 0x3
|
#define IPMI_SESSION_PRIV_OPERATOR 0x3
|
||||||
|
@ -43,6 +43,8 @@ extern const struct valstr ipmi_channel_activity_type_vals[];
|
|||||||
extern const struct valstr ipmi_privlvl_vals[];
|
extern const struct valstr ipmi_privlvl_vals[];
|
||||||
extern const struct valstr impi_bit_rate_vals[];
|
extern const struct valstr impi_bit_rate_vals[];
|
||||||
extern const struct valstr ipmi_set_in_progress_vals[];
|
extern const struct valstr ipmi_set_in_progress_vals[];
|
||||||
|
extern const struct valstr ipmi_authtype_session_vals[];
|
||||||
|
extern const struct valstr ipmi_authtype_vals[];
|
||||||
|
|
||||||
|
|
||||||
#endif /*IPMI_STRINGS_H*/
|
#endif /*IPMI_STRINGS_H*/
|
||||||
|
@ -50,19 +50,11 @@
|
|||||||
#include <ipmitool/helper.h>
|
#include <ipmitool/helper.h>
|
||||||
#include <ipmitool/ipmi_lanp.h>
|
#include <ipmitool/ipmi_lanp.h>
|
||||||
#include <ipmitool/ipmi_channel.h>
|
#include <ipmitool/ipmi_channel.h>
|
||||||
|
#include <ipmitool/ipmi_constants.h>
|
||||||
|
|
||||||
void printf_channel_usage (void);
|
void printf_channel_usage (void);
|
||||||
|
|
||||||
const struct valstr ipmi_authtype_vals[] = {
|
extern const struct valstr ipmi_authtype_vals[];
|
||||||
{ IPMI_1_5_AUTH_TYPE_BIT_NONE, "NONE" },
|
|
||||||
{ IPMI_1_5_AUTH_TYPE_BIT_MD2, "MD2" },
|
|
||||||
{ IPMI_1_5_AUTH_TYPE_BIT_MD5, "MD5" },
|
|
||||||
{ IPMI_1_5_AUTH_TYPE_BIT_PASSWORD, "PASSWORD" },
|
|
||||||
{ IPMI_1_5_AUTH_TYPE_BIT_OEM, "OEM" },
|
|
||||||
{ 0, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static const struct valstr ipmi_channel_protocol_vals[] = {
|
static const struct valstr ipmi_channel_protocol_vals[] = {
|
||||||
{ 0x00, "reserved" },
|
{ 0x00, "reserved" },
|
||||||
|
@ -81,3 +81,21 @@ const struct valstr ipmi_set_in_progress_vals[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const struct valstr ipmi_authtype_session_vals[] = {
|
||||||
|
{ IPMI_SESSION_AUTHTYPE_NONE, "NONE" },
|
||||||
|
{ IPMI_SESSION_AUTHTYPE_MD2, "MD2" },
|
||||||
|
{ IPMI_SESSION_AUTHTYPE_MD5, "MD5" },
|
||||||
|
{ IPMI_SESSION_AUTHTYPE_PASSWORD, "PASSWORD" },
|
||||||
|
{ IPMI_SESSION_AUTHTYPE_OEM, "OEM" },
|
||||||
|
{ 0, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const struct valstr ipmi_authtype_vals[] = {
|
||||||
|
{ IPMI_1_5_AUTH_TYPE_BIT_NONE, "NONE" },
|
||||||
|
{ IPMI_1_5_AUTH_TYPE_BIT_MD2, "MD2" },
|
||||||
|
{ IPMI_1_5_AUTH_TYPE_BIT_MD5, "MD5" },
|
||||||
|
{ IPMI_1_5_AUTH_TYPE_BIT_PASSWORD, "PASSWORD" },
|
||||||
|
{ IPMI_1_5_AUTH_TYPE_BIT_OEM, "OEM" },
|
||||||
|
{ 0, NULL },
|
||||||
|
};
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
#include <ipmitool/bswap.h>
|
#include <ipmitool/bswap.h>
|
||||||
#include <ipmitool/ipmi.h>
|
#include <ipmitool/ipmi.h>
|
||||||
#include <ipmitool/ipmi_intf.h>
|
#include <ipmitool/ipmi_intf.h>
|
||||||
|
#include <ipmitool/ipmi_strings.h>
|
||||||
|
#include <ipmitool/ipmi_constants.h>
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
@ -64,22 +66,13 @@
|
|||||||
#include "auth.h"
|
#include "auth.h"
|
||||||
|
|
||||||
extern const struct valstr ipmi_privlvl_vals[];
|
extern const struct valstr ipmi_privlvl_vals[];
|
||||||
extern const struct valstr ipmi_authtype_vals[];
|
extern const struct valstr ipmi_authtype_session_vals[];
|
||||||
|
|
||||||
struct ipmi_rq_entry * ipmi_req_entries;
|
struct ipmi_rq_entry * ipmi_req_entries;
|
||||||
static struct ipmi_rq_entry * ipmi_req_entries_tail;
|
static struct ipmi_rq_entry * ipmi_req_entries_tail;
|
||||||
|
|
||||||
extern int verbose;
|
extern int verbose;
|
||||||
|
|
||||||
const struct valstr ipmi_authtype_session_vals[] = {
|
|
||||||
{ IPMI_SESSION_AUTHTYPE_NONE, "NONE" },
|
|
||||||
{ IPMI_SESSION_AUTHTYPE_MD2, "MD2" },
|
|
||||||
{ IPMI_SESSION_AUTHTYPE_MD5, "MD5" },
|
|
||||||
{ IPMI_SESSION_AUTHTYPE_PASSWORD, "PASSWORD" },
|
|
||||||
{ IPMI_SESSION_AUTHTYPE_OEM, "OEM" },
|
|
||||||
{ 0, NULL },
|
|
||||||
};
|
|
||||||
|
|
||||||
static sigjmp_buf jmpbuf;
|
static sigjmp_buf jmpbuf;
|
||||||
|
|
||||||
static int ipmi_lan_send_packet(struct ipmi_intf * intf, unsigned char * data, int data_len);
|
static int ipmi_lan_send_packet(struct ipmi_intf * intf, unsigned char * data, int data_len);
|
||||||
|
@ -48,19 +48,6 @@
|
|||||||
#define IPMI_LAN_TIMEOUT 2
|
#define IPMI_LAN_TIMEOUT 2
|
||||||
#define IPMI_LAN_RETRY 4
|
#define IPMI_LAN_RETRY 4
|
||||||
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_NONE 0x0
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_MD2 0x1
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_MD5 0x2
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_PASSWORD 0x4
|
|
||||||
#define IPMI_SESSION_AUTHTYPE_OEM 0x5
|
|
||||||
|
|
||||||
#define IPMI_SESSION_PRIV_CALLBACK 0x1
|
|
||||||
#define IPMI_SESSION_PRIV_USER 0x2
|
|
||||||
#define IPMI_SESSION_PRIV_OPERATOR 0x3
|
|
||||||
#define IPMI_SESSION_PRIV_ADMIN 0x4
|
|
||||||
#define IPMI_SESSION_PRIV_OEM 0x5
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct ipmi_rs * ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req);
|
struct ipmi_rs * ipmi_lan_send_cmd(struct ipmi_intf * intf, struct ipmi_rq * req);
|
||||||
int ipmi_lan_send_rsp(struct ipmi_intf * intf, struct ipmi_rs * rsp);
|
int ipmi_lan_send_rsp(struct ipmi_intf * intf, struct ipmi_rs * rsp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user