added PICMG netfn\n ran lindent

This commit is contained in:
Francois Isabelle 2005-07-12 13:09:33 +00:00
parent c792f6e7e1
commit f9f0599908

View File

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