mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
minor changes to interface structures
This commit is contained in:
parent
f9c23d8a54
commit
69501d7827
@ -84,6 +84,11 @@ struct ipmi_v2_payload {
|
||||
struct ipmi_rq * request;
|
||||
} ipmi_request;
|
||||
|
||||
struct {
|
||||
unsigned char rs_seq;
|
||||
struct ipmi_rs * response;
|
||||
} ipmi_response;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
unsigned char * request;
|
||||
@ -151,6 +156,13 @@ struct ipmi_rs {
|
||||
*/
|
||||
int data_len;
|
||||
|
||||
struct {
|
||||
unsigned char netfn;
|
||||
unsigned char cmd;
|
||||
unsigned char seq;
|
||||
unsigned char lun;
|
||||
} msg;
|
||||
|
||||
struct {
|
||||
unsigned char authtype;
|
||||
uint32_t seq;
|
||||
@ -224,7 +236,7 @@ struct ipmi_rs {
|
||||
#define IPMI_NETFN_APP 0x6
|
||||
#define IPMI_NETFN_FIRMWARE 0x8
|
||||
#define IPMI_NETFN_STORAGE 0xa
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_ISOL 0x34
|
||||
|
||||
#define IPMI_BMC_SLAVE_ADDR 0x20
|
||||
|
@ -40,6 +40,10 @@
|
||||
#include <ipmitool/ipmi.h>
|
||||
#include <ipmitool/ipmi_constants.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
/*
|
||||
* An enumeration that describes every possible session state for
|
||||
@ -73,12 +77,13 @@ struct ipmi_session {
|
||||
int active;
|
||||
|
||||
uint32_t session_id;
|
||||
|
||||
uint32_t in_seq;
|
||||
uint32_t out_seq;
|
||||
|
||||
uint32_t timeout;
|
||||
|
||||
struct sockaddr_in addr;
|
||||
socklen_t addrlen;
|
||||
|
||||
/*
|
||||
* This struct holds state data specific to IMPI v2 / RMCP+ sessions
|
||||
*/
|
||||
@ -132,33 +137,33 @@ struct ipmi_session {
|
||||
|
||||
|
||||
struct ipmi_intf {
|
||||
char name[32];
|
||||
char name[16];
|
||||
char desc[128];
|
||||
int fd;
|
||||
int opened;
|
||||
int abort;
|
||||
int pedantic;
|
||||
int (*open)(struct ipmi_intf *);
|
||||
void (*close)(struct ipmi_intf *);
|
||||
struct ipmi_rs *(*sendrecv)(struct ipmi_intf *, struct ipmi_rq *);
|
||||
struct ipmi_rs *(*recv_sol)(struct ipmi_intf *);
|
||||
struct ipmi_rs *(*send_sol)(struct ipmi_intf *,
|
||||
struct ipmi_v2_payload * payload);
|
||||
int thump;
|
||||
|
||||
struct ipmi_session * session;
|
||||
unsigned int my_addr;
|
||||
unsigned int target_addr;
|
||||
|
||||
int (*setup)(struct ipmi_intf * intf);
|
||||
int (*open)(struct ipmi_intf * intf);
|
||||
void (*close)(struct ipmi_intf * intf);
|
||||
struct ipmi_rs *(*sendrecv)(struct ipmi_intf * intf, struct ipmi_rq * req);
|
||||
int (*sendrsp)(struct ipmi_intf * intf, struct ipmi_rs * rsp);
|
||||
struct ipmi_rs *(*recv_sol)(struct ipmi_intf * intf);
|
||||
struct ipmi_rs *(*send_sol)(struct ipmi_intf * intf, struct ipmi_v2_payload * payload);
|
||||
};
|
||||
|
||||
struct static_intf {
|
||||
char * name;
|
||||
int (*setup)(struct ipmi_intf ** intf);
|
||||
};
|
||||
|
||||
int ipmi_intf_init(void);
|
||||
void ipmi_intf_exit(void);
|
||||
struct ipmi_intf * ipmi_intf_load(char * name);
|
||||
char * ipmi_intf_print(void);
|
||||
|
||||
int ipmi_intf_session_set_hostname(struct ipmi_intf * intf, char * hostname);
|
||||
int ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username);
|
||||
int ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password);
|
||||
int ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, unsigned char privlvl);
|
||||
int ipmi_intf_session_set_port(struct ipmi_intf * intf, int port);
|
||||
void ipmi_intf_session_set_hostname(struct ipmi_intf * intf, char * hostname);
|
||||
void ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username);
|
||||
void ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password);
|
||||
void ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, unsigned char privlvl);
|
||||
void ipmi_intf_session_set_port(struct ipmi_intf * intf, int port);
|
||||
|
||||
#endif /* IPMI_INTF_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user