mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
added PICMG netfn\n ran lindent
This commit is contained in:
parent
c792f6e7e1
commit
f9f0599908
@ -57,14 +57,13 @@
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_3 0x14
|
||||
#define IPMI_PAYLOAD_TYPE_RAKP_4 0x15
|
||||
|
||||
|
||||
extern int verbose;
|
||||
extern int csv_output;
|
||||
|
||||
struct ipmi_rq {
|
||||
struct {
|
||||
uint8_t netfn :6;
|
||||
uint8_t lun :2;
|
||||
uint8_t netfn:6;
|
||||
uint8_t lun:2;
|
||||
uint8_t cmd;
|
||||
uint8_t target_cmd;
|
||||
uint16_t data_len;
|
||||
@ -72,50 +71,49 @@ struct ipmi_rq {
|
||||
} msg;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* This is what the sendrcv_v2() function would take as an argument. The common case
|
||||
* is for payload_type to be IPMI_PAYLOAD_TYPE_IPMI.
|
||||
*/
|
||||
struct ipmi_v2_payload {
|
||||
uint16_t payload_length;
|
||||
uint8_t payload_type;
|
||||
uint8_t payload_type;
|
||||
|
||||
union {
|
||||
|
||||
struct {
|
||||
uint8_t rq_seq;
|
||||
struct ipmi_rq * request;
|
||||
uint8_t rq_seq;
|
||||
struct ipmi_rq *request;
|
||||
} ipmi_request;
|
||||
|
||||
struct {
|
||||
uint8_t rs_seq;
|
||||
struct ipmi_rs * response;
|
||||
uint8_t rs_seq;
|
||||
struct ipmi_rs *response;
|
||||
} ipmi_response;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t * request;
|
||||
uint8_t *request;
|
||||
} open_session_request;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t * message;
|
||||
uint8_t *message;
|
||||
} rakp_1_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t * message;
|
||||
uint8_t *message;
|
||||
} rakp_2_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t * message;
|
||||
uint8_t *message;
|
||||
} rakp_3_message;
|
||||
|
||||
/* Only used internally by the lanplus interface */
|
||||
struct {
|
||||
uint8_t * message;
|
||||
uint8_t *message;
|
||||
} rakp_4_message;
|
||||
|
||||
struct {
|
||||
@ -124,32 +122,27 @@ struct ipmi_v2_payload {
|
||||
uint8_t packet_sequence_number;
|
||||
uint8_t acked_packet_number;
|
||||
uint8_t accepted_character_count;
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t assert_ring_wor; /* bool */
|
||||
uint8_t generate_break; /* bool */
|
||||
uint8_t deassert_cts; /* bool */
|
||||
uint8_t deassert_dcd_dsr; /* bool */
|
||||
uint8_t flush_inbound; /* bool */
|
||||
uint8_t flush_outbound; /* bool */
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t assert_ring_wor; /* bool */
|
||||
uint8_t generate_break; /* bool */
|
||||
uint8_t deassert_cts; /* bool */
|
||||
uint8_t deassert_dcd_dsr; /* bool */
|
||||
uint8_t flush_inbound; /* bool */
|
||||
uint8_t flush_outbound; /* bool */
|
||||
} sol_packet;
|
||||
|
||||
} payload;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct ipmi_rq_entry {
|
||||
struct ipmi_rq req;
|
||||
struct ipmi_intf * intf;
|
||||
struct ipmi_intf *intf;
|
||||
uint8_t rq_seq;
|
||||
uint8_t * msg_data;
|
||||
uint8_t *msg_data;
|
||||
int msg_len;
|
||||
struct ipmi_rq_entry * next;
|
||||
struct ipmi_rq_entry *next;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct ipmi_rs {
|
||||
uint8_t ccode;
|
||||
uint8_t data[IPMI_BUF_SIZE];
|
||||
@ -168,19 +161,18 @@ struct ipmi_rs {
|
||||
} msg;
|
||||
|
||||
struct {
|
||||
uint8_t authtype;
|
||||
uint32_t seq;
|
||||
uint32_t id;
|
||||
uint8_t bEncrypted; /* IPMI v2 only */
|
||||
uint8_t bAuthenticated; /* IPMI v2 only */
|
||||
uint8_t payloadtype; /* IPMI v2 only */
|
||||
uint8_t authtype;
|
||||
uint32_t seq;
|
||||
uint32_t id;
|
||||
uint8_t bEncrypted; /* IPMI v2 only */
|
||||
uint8_t bAuthenticated; /* IPMI v2 only */
|
||||
uint8_t payloadtype; /* IPMI v2 only */
|
||||
/* This is the total length of the payload or
|
||||
IPMI message. IPMI v2.0 requires this to
|
||||
be 2 bytes. Not really used for much. */
|
||||
uint16_t msglen;
|
||||
} session;
|
||||
|
||||
|
||||
/*
|
||||
* A union of the different possible payload meta-data
|
||||
*/
|
||||
@ -198,8 +190,8 @@ struct ipmi_rs {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint8_t max_priv_level;
|
||||
uint32_t console_id;
|
||||
uint32_t bmc_id;
|
||||
uint32_t console_id;
|
||||
uint32_t bmc_id;
|
||||
uint8_t auth_alg;
|
||||
uint8_t integrity_alg;
|
||||
uint8_t crypt_alg;
|
||||
@ -207,45 +199,44 @@ struct ipmi_rs {
|
||||
struct {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint32_t console_id;
|
||||
uint8_t bmc_rand[16]; /* Random number generated by the BMC */
|
||||
uint32_t console_id;
|
||||
uint8_t bmc_rand[16]; /* Random number generated by the BMC */
|
||||
uint8_t bmc_guid[16];
|
||||
uint8_t key_exchange_auth_code[20];
|
||||
} rakp2_message;
|
||||
struct {
|
||||
uint8_t message_tag;
|
||||
uint8_t rakp_return_code;
|
||||
uint32_t console_id;
|
||||
uint32_t console_id;
|
||||
uint8_t integrity_check_value[20];
|
||||
} rakp4_message;
|
||||
struct {
|
||||
uint8_t packet_sequence_number;
|
||||
uint8_t acked_packet_number;
|
||||
uint8_t accepted_character_count;
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t transfer_unavailable; /* bool */
|
||||
uint8_t sol_inactive; /* bool */
|
||||
uint8_t transmit_overrun; /* bool */
|
||||
uint8_t break_detected; /* bool */
|
||||
uint8_t is_nack; /* bool */
|
||||
uint8_t transfer_unavailable; /* bool */
|
||||
uint8_t sol_inactive; /* bool */
|
||||
uint8_t transmit_overrun; /* bool */
|
||||
uint8_t break_detected; /* bool */
|
||||
} sol_packet;
|
||||
|
||||
|
||||
} payload;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#define IPMI_NETFN_CHASSIS 0x0
|
||||
#define IPMI_NETFN_BRIDGE 0x2
|
||||
#define IPMI_NETFN_SE 0x4
|
||||
#define IPMI_NETFN_APP 0x6
|
||||
#define IPMI_NETFN_FIRMWARE 0x8
|
||||
#define IPMI_NETFN_FIRMWARE 0x8
|
||||
#define IPMI_NETFN_STORAGE 0xa
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_TRANSPORT 0xc
|
||||
#define IPMI_NETFN_PICMG 0x2C
|
||||
#define IPMI_NETFN_ISOL 0x34
|
||||
|
||||
#define IPMI_BMC_SLAVE_ADDR 0x20
|
||||
#define IPMI_BMC_SLAVE_ADDR 0x20
|
||||
#define IPMI_REMOTE_SWID 0x81
|
||||
|
||||
extern const struct valstr completion_code_vals[];
|
||||
|
||||
#endif /* IPMI_H */
|
||||
#endif /* IPMI_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user