141
141
int ipmi_cmp_domain_id(ipmi_domain_id_t id1, ipmi_domain_id_t id2);
142
142
void ipmi_domain_id_set_invalid(ipmi_domain_id_t *id);
143
int ipmi_domain_id_is_invalid(ipmi_domain_id_t *id);
143
int ipmi_domain_id_is_invalid(const ipmi_domain_id_t *id);
145
145
ipmi_entity_id_t ipmi_entity_convert_to_id(ipmi_entity_t *ent);
146
146
int ipmi_cmp_entity_id(ipmi_entity_id_t id1, ipmi_entity_id_t id2);
154
154
ipmi_entity_id_t *id);
155
155
int ipmi_cmp_entity_id(ipmi_entity_id_t id1, ipmi_entity_id_t id2);
156
156
void ipmi_entity_id_set_invalid(ipmi_entity_id_t *id);
157
int ipmi_entity_id_is_invalid(ipmi_entity_id_t *id);
157
int ipmi_entity_id_is_invalid(const ipmi_entity_id_t *id);
159
159
ipmi_sensor_id_t ipmi_sensor_convert_to_id(ipmi_sensor_t *sensor);
160
160
typedef void (*ipmi_sensor_ptr_cb)(ipmi_sensor_t *sensor, void *cb_data);
169
169
ipmi_sensor_id_t *id);
170
170
void ipmi_sensor_id_set_invalid(ipmi_sensor_id_t *id);
171
int ipmi_sensor_id_is_invalid(ipmi_sensor_id_t *id);
171
int ipmi_sensor_id_is_invalid(const ipmi_sensor_id_t *id);
173
173
ipmi_control_id_t ipmi_control_convert_to_id(ipmi_control_t *control);
174
174
typedef void (*ipmi_control_ptr_cb)(ipmi_control_t *control, void *cb_data);
183
183
ipmi_control_id_t *id);
184
184
void ipmi_control_id_set_invalid(ipmi_control_id_t *id);
185
int ipmi_control_id_is_invalid(ipmi_control_id_t *id);
185
int ipmi_control_id_is_invalid(const ipmi_control_id_t *id);
188
188
/************************************************************************
366
366
ipmi_event_free(). */
367
367
ipmi_event_t *ipmi_domain_first_event(ipmi_domain_t *domain);
368
368
ipmi_event_t *ipmi_domain_last_event(ipmi_domain_t *domain);
369
ipmi_event_t *ipmi_domain_next_event(ipmi_domain_t *domain, ipmi_event_t *p);
370
ipmi_event_t *ipmi_domain_prev_event(ipmi_domain_t *domain, ipmi_event_t *n);
369
ipmi_event_t *ipmi_domain_next_event(ipmi_domain_t *domain,
370
const ipmi_event_t *p);
371
ipmi_event_t *ipmi_domain_prev_event(ipmi_domain_t *domain,
372
const ipmi_event_t *n);
372
374
/* Return the number of non-deleted entries in the local copy of the
470
472
instance already exists. You must put() the statistic when you are
472
474
int ipmi_domain_stat_register(ipmi_domain_t *domain,
476
const char *instance,
475
477
ipmi_domain_stat_t **stat);
477
479
/* Find a statistic by name and instance. You must put() the
478
480
statistic when you are done with it. */
479
481
int ipmi_domain_find_stat(ipmi_domain_t *domain,
483
const char *instance,
482
484
ipmi_domain_stat_t **stat);
484
486
/* Say you are done with a statistic. */
544
546
/* Return the management controller that "owns" the event (where the
545
547
event is stored). */
546
ipmi_mcid_t ipmi_event_get_mcid(ipmi_event_t *event);
548
ipmi_mcid_t ipmi_event_get_mcid(const ipmi_event_t *event);
548
550
/* Return a unique (in the MC) record identifier for the event. */
549
unsigned int ipmi_event_get_record_id(ipmi_event_t *event);
551
unsigned int ipmi_event_get_record_id(const ipmi_event_t *event);
551
553
#define OPENIPMI_OEM_EVENT_START 0x10000
552
554
/* Return the event type. Normal IPMI events should be in the
553
555
000-0xff range. Other events should start at
554
556
OPENIPMI_OEM_EVENT_START and higher.*/
555
unsigned int ipmi_event_get_type(ipmi_event_t *event);
557
unsigned int ipmi_event_get_type(const ipmi_event_t *event);
557
559
/* Get the timestamp for the event. This will be IPMI_INVALID_TIME if
558
560
the timestamp is invalid. */
559
ipmi_time_t ipmi_event_get_timestamp(ipmi_event_t *event);
561
ipmi_time_t ipmi_event_get_timestamp(const ipmi_event_t *event);
561
563
/* Get the length of the data attached to the event. */
562
unsigned int ipmi_event_get_data_len(ipmi_event_t *event);
564
unsigned int ipmi_event_get_data_len(const ipmi_event_t *event);
564
566
/* Copy some of the data attached to the event, starting at the given
565
567
offset to an array. Copy "len" bytes. */
566
unsigned int ipmi_event_get_data(ipmi_event_t *event, unsigned char *data,
567
unsigned int offset, unsigned int len);
568
unsigned int ipmi_event_get_data(const ipmi_event_t *event,
570
574
/************************************************************************
1151
1155
ipmi_sensor_done_cb done,
1152
1156
void *cb_data);
1154
/* Get the LUN and sensor number for the sensor, as viewed from its
1155
management controller. */
1158
/* Get the sensor's Owner ID, and the LUN and sensor number for the sensor,
1159
as viewed from its management controller. These are really kind of
1160
internal but are required for CIM mappings. */
1161
int ipmi_sensor_get_owner(ipmi_sensor_t *sensor);
1156
1162
int ipmi_sensor_get_num(ipmi_sensor_t *sensor,