~ubuntu-branches/ubuntu/vivid/openipmi/vivid

« back to all changes in this revision

Viewing changes to include/OpenIPMI/ipmi_mc.h

  • Committer: Bazaar Package Importer
  • Author(s): Noèl Köthe
  • Date: 2006-09-15 17:56:24 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060915175624-ljk0mg3xtcm65tvm
Tags: 2.0.7-1
* new upstream release from 2006-06-08
  Thanks to John Wright <john.wright hp.com> for initial work
  (closes: Bug#380149)
* updated Standards Version
* new binaries openipmicmd, openipmish, rmcp_ping

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
                                  ipmi_mc_active_cb handler,
115
115
                                  void              *cb_data);
116
116
 
 
117
/* Used to tell when an MC goes "fully up" meaning that all its SDRs
 
118
   have been read, etc. */
 
119
int ipmi_mc_add_fully_up_handler(ipmi_mc_t      *mc,
 
120
                                 ipmi_mc_ptr_cb handler,
 
121
                                 void           *cb_data);
 
122
int ipmi_mc_remove_fully_up_handler(ipmi_mc_t      *mc,
 
123
                                    ipmi_mc_ptr_cb handler,
 
124
                                    void           *cb_data);
 
125
 
117
126
/* Send the command in "msg" and register a handler to handle the
118
127
   response.  This will return without blocking; when the response
119
128
   comes back the handler will be called.  The handler may be NULL;
230
239
                             ipmi_mc_add_event_done_cb handler,
231
240
                             void                      *cb_data);
232
241
 
 
242
/* Allocate an event with the given data.  This is required so you can
 
243
   add it to the SEL. */
 
244
ipmi_event_t *ipmi_event_alloc(ipmi_mcid_t   mcid,
 
245
                               unsigned int  record_id,
 
246
                               unsigned int  type,
 
247
                               ipmi_time_t   timestamp,
 
248
                               unsigned char *data,
 
249
                               unsigned int  data_len);
 
250
 
233
251
typedef void (ipmi_mc_del_event_done_cb)(ipmi_mc_t *mc, int err, void *cb_data);
234
252
int ipmi_mc_del_event(ipmi_mc_t                 *mc,
235
253
                      ipmi_event_t              *event, 
236
254
                      ipmi_mc_del_event_done_cb handler,
237
255
                      void                      *cb_data);
238
256
 
 
257
/* Clear out all the events in the SEL if and only if the last_event
 
258
   passed in is the last event in the SEL.  Note that use of this is
 
259
   *HIGHLY* discouraged.  This is only here for HPI support.  In
 
260
   general, you should delete individual events and OpenIPMI will do
 
261
   the right thing (do a clear if they are all gone, do individual
 
262
   deletes if possible otherwise, etc.).  If you pass in NULL for
 
263
   last_event, it forces a clear of the SEL without checking anything.
 
264
   Very dangerous, events can be lost. */
 
265
int ipmi_mc_sel_clear(ipmi_mc_t                 *mc,
 
266
                      ipmi_event_t              *last_event, 
 
267
                      ipmi_mc_del_event_done_cb handler,
 
268
                      void                      *cb_data);
 
269
 
 
270
 
239
271
ipmi_event_t *ipmi_mc_first_event(ipmi_mc_t *mc);
240
272
ipmi_event_t *ipmi_mc_last_event(ipmi_mc_t *mc);
241
273
ipmi_event_t *ipmi_mc_next_event(ipmi_mc_t *mc, const ipmi_event_t *event);
301
333
 */
302
334
int ipmi_channel_info_get_channel(ipmi_channel_info_t *info,
303
335
                                  unsigned int        *channel);
 
336
 
304
337
#define IPMI_CHANNEL_MEDIUM_IPMB        1
305
338
#define IPMI_CHANNEL_MEDIUM_ICMB_V10    2
306
339
#define IPMI_CHANNEL_MEDIUM_ICMB_V09    3
313
346
#define IPMI_CHANNEL_MEDIUM_USB_v1      10
314
347
#define IPMI_CHANNEL_MEDIUM_USB_v2      11
315
348
#define IPMI_CHANNEL_MEDIUM_SYS_INTF    12
 
349
const char *ipmi_channel_medium_string(int val);
316
350
int ipmi_channel_info_get_medium(ipmi_channel_info_t *info,
317
351
                                 unsigned int        *medium);
318
352
#define IPMI_CHANNEL_PROTOCOL_IPMB      1
323
357
#define IPMI_CHANNEL_PROTOCOL_BT_v10    7
324
358
#define IPMI_CHANNEL_PROTOCOL_BT_v15    8
325
359
#define IPMI_CHANNEL_PROTOCOL_TMODE     9
 
360
const char *ipmi_channel_protocol_string(int val);
326
361
int ipmi_channel_info_get_protocol_type(ipmi_channel_info_t *info,
327
362
                                        unsigned int        *prot_type);
328
363
 
330
365
#define IPMI_CHANNEL_SINGLE_SESSION     1
331
366
#define IPMI_CHANNEL_MULTI_SESSION      2
332
367
#define IPMI_CHANNEL_SESSION_BASED      3
 
368
const char *ipmi_channel_session_support_string(int val);
333
369
int ipmi_channel_info_get_session_support(ipmi_channel_info_t *info,
334
370
                                          unsigned int        *sup);
335
371
/* Data is 3 bytes long */
388
424
#define IPMI_CHANNEL_ACCESS_MODE_PRE_BOOT       1
389
425
#define IPMI_CHANNEL_ACCESS_MODE_ALWAYS         2
390
426
#define IPMI_CHANNEL_ACCESS_MODE_SHARED         3
 
427
const char *ipmi_channel_access_mode_string(int val);
391
428
int ipmi_channel_access_get_access_mode(ipmi_channel_access_t *access,
392
429
                                        unsigned int          *access_mode);
393
430
int ipmi_channel_access_set_access_mode(ipmi_channel_access_t *access,
403
440
 
404
441
/***********************************************************************
405
442
 *
 
443
 * Misc stuff...
 
444
 *
 
445
 **********************************************************************/
 
446
 
 
447
/* Get the MC that the message is sent to for reading and controlling
 
448
   the sensor.  The SDR for the sensor may not have come from here.
 
449
   Note that this is not refcounted, it is held in existance by the
 
450
   sensor's refcount.  So don't keep this after the sensor pointer
 
451
   ceases to exist. */
 
452
ipmi_mc_t *ipmi_sensor_get_mc(ipmi_sensor_t *sensor);
 
453
 
 
454
 
 
455
/***********************************************************************
 
456
 *
406
457
 * Crufty backwards-compatible interfaces.  Don't use these as they
407
458
 * are deprecated.
408
459
 *