Main Page | Class List | Directories | File List | Class Members | File Members

ipmi_mc.h

Go to the documentation of this file.
00001 /*
00002  * ipmi_mc.h
00003  *
00004  * MontaVista IPMI interface for management controllers
00005  *
00006  * Author: MontaVista Software, Inc.
00007  *         Corey Minyard <minyard@mvista.com>
00008  *         source@mvista.com
00009  *
00010  * Copyright 2002,2003,2004 MontaVista Software Inc.
00011  *
00012  *  This program is free software; you can redistribute it and/or
00013  *  modify it under the terms of the GNU Lesser General Public License
00014  *  as published by the Free Software Foundation; either version 2 of
00015  *  the License, or (at your option) any later version.
00016  *
00017  *
00018  *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
00019  *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00020  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00021  *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00022  *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00023  *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00024  *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00025  *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
00026  *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
00027  *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00028  *
00029  *  You should have received a copy of the GNU Lesser General Public
00030  *  License along with this program; if not, write to the Free
00031  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00032  */
00033 
00034 #ifndef _IPMI_MC_H
00035 #define _IPMI_MC_H
00036 #include <OpenIPMI/ipmi_types.h>
00037 #include <OpenIPMI/ipmi_sdr.h>
00038 #include <OpenIPMI/ipmi_bits.h>
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 /* MCs are mostly internal items in OpenIPMI, but they are here because
00045    they are sometimes useful.  It is at least theoretically possible to
00046    put a non-IPMI system under OpenIPMI, and if you do the MCs won't
00047    be very useful.  You generally shouldn't need them anyway. */
00048 
00049 ipmi_mcid_t ipmi_mc_convert_to_id(ipmi_mc_t *mc);
00050 typedef void (*ipmi_mc_ptr_cb)(ipmi_mc_t *mc, void *cb_data);
00051 int ipmi_mc_pointer_cb(ipmi_mcid_t    id,
00052                        ipmi_mc_ptr_cb handler,
00053                        void           *cb_data);
00054 int ipmi_mc_pointer_noseq_cb(ipmi_mcid_t    id,
00055                              ipmi_mc_ptr_cb handler,
00056                              void           *cb_data);
00057 int ipmi_cmp_mc_id(ipmi_mcid_t id1, ipmi_mcid_t id2);
00058 int ipmi_cmp_mc_id_noseq(ipmi_mcid_t id1, ipmi_mcid_t id2);
00059 void ipmi_mc_id_set_invalid(ipmi_mcid_t *id);
00060 /* Is it the invalid MCID? */
00061 int ipmi_mc_id_is_invalid(ipmi_mcid_t *id);
00062 
00063 
00064 /* Generic callback type for MCs */
00065 typedef void (*ipmi_mc_done_cb)(ipmi_mc_t *mc, int err, void *cb_data);
00066 typedef void (*ipmi_mc_data_done_cb)(ipmi_mc_t *mc, int err, int value,
00067                                      void *cb_data);
00068 
00069 /* Get the name of an MC. */
00070 #define IPMI_MC_NAME_LEN (IPMI_DOMAIN_NAME_LEN + 32)
00071 int ipmi_mc_get_name(ipmi_mc_t *mc, char *name, int length);
00072 
00073 /* Return the domain for the given MC. */
00074 ipmi_domain_t *ipmi_mc_get_domain(ipmi_mc_t *mc);
00075 
00076 /* Basic information about a MC.  */
00077 int ipmi_mc_provides_device_sdrs(ipmi_mc_t *mc);
00078 int ipmi_mc_device_available(ipmi_mc_t *mc);
00079 int ipmi_mc_chassis_support(ipmi_mc_t *mc);
00080 int ipmi_mc_bridge_support(ipmi_mc_t *mc);
00081 int ipmi_mc_ipmb_event_generator_support(ipmi_mc_t *mc);
00082 int ipmi_mc_ipmb_event_receiver_support(ipmi_mc_t *mc);
00083 int ipmi_mc_fru_inventory_support(ipmi_mc_t *mc);
00084 int ipmi_mc_sel_device_support(ipmi_mc_t *mc);
00085 int ipmi_mc_sdr_repository_support(ipmi_mc_t *mc);
00086 int ipmi_mc_sensor_device_support(ipmi_mc_t *mc);
00087 int ipmi_mc_device_id(ipmi_mc_t *mc);
00088 int ipmi_mc_device_revision(ipmi_mc_t *mc);
00089 int ipmi_mc_major_fw_revision(ipmi_mc_t *mc);
00090 int ipmi_mc_minor_fw_revision(ipmi_mc_t *mc);
00091 int ipmi_mc_major_version(ipmi_mc_t *mc);
00092 int ipmi_mc_minor_version(ipmi_mc_t *mc);
00093 int ipmi_mc_manufacturer_id(ipmi_mc_t *mc);
00094 int ipmi_mc_product_id(ipmi_mc_t *mc);
00095 void ipmi_mc_aux_fw_revision(ipmi_mc_t *mc, unsigned char val[]);
00096 
00097 /* Get the GUID (if it is available).  Returns ENOSYS if the GUID is
00098    not available.  guid must point to 16 bytes of data. */
00099 int ipmi_mc_get_guid(ipmi_mc_t *mc, unsigned char *guid);
00100 
00101 /* Check to see if the MC is operational in the system.  If this is
00102    false, then the MC was referred to by an SDR, but it doesn't really
00103    exist. */
00104 int ipmi_mc_is_active(ipmi_mc_t *mc);
00105 
00106 /* Used to monitor when the MC goes active or inactive. */
00107 typedef void (*ipmi_mc_active_cb)(ipmi_mc_t *mc,
00108                                   int       active,
00109                                   void      *cb_data);
00110 int ipmi_mc_add_active_handler(ipmi_mc_t         *mc,
00111                                ipmi_mc_active_cb handler,
00112                                void              *cb_data);
00113 int ipmi_mc_remove_active_handler(ipmi_mc_t         *mc,
00114                                   ipmi_mc_active_cb handler,
00115                                   void              *cb_data);
00116 
00117 /* Used to tell when an MC goes "fully up" meaning that all its SDRs
00118    have been read, etc. */
00119 int ipmi_mc_add_fully_up_handler(ipmi_mc_t      *mc,
00120                                  ipmi_mc_ptr_cb handler,
00121                                  void           *cb_data);
00122 int ipmi_mc_remove_fully_up_handler(ipmi_mc_t      *mc,
00123                                     ipmi_mc_ptr_cb handler,
00124                                     void           *cb_data);
00125 
00126 /* Send the command in "msg" and register a handler to handle the
00127    response.  This will return without blocking; when the response
00128    comes back the handler will be called.  The handler may be NULL;
00129    then the response is ignored.  Note that if non-NULL the response
00130    handler will always be called; if no response is received in time
00131    the code will return a timeout response. rsp_data is passed to the
00132    response handler, it may contain anything the user likes.  Note
00133    that if the mc goes away between the time the command is sent and
00134    the response comes back, this callback WILL be called, but the MC
00135    value will be NULL.  You must handle that. */
00136 typedef void (*ipmi_mc_response_handler_t)(ipmi_mc_t  *src,
00137                                            ipmi_msg_t *msg,
00138                                            void       *rsp_data);
00139 int ipmi_mc_send_command(ipmi_mc_t                  *mc,
00140                          unsigned int               lun,
00141                          const ipmi_msg_t           *cmd,
00142                          ipmi_mc_response_handler_t rsp_handler,
00143                          void                       *rsp_data);
00144 
00145 /* Reset the MC, either a cold or warm reset depending on the type.
00146    Note that the effects of a reset are not defined by IPMI, so this
00147    might do wierd things.  Some systems do not support resetting the
00148    MC.  This is not a standard control because there is no entity to
00149    hang if from and you don't want people messing with it unless they
00150    really know what they are doing. */
00151 #define IPMI_MC_RESET_COLD 1
00152 #define IPMI_MC_RESET_WARM 2
00153 int ipmi_mc_reset(ipmi_mc_t       *mc,
00154                   int             reset_type,
00155                   ipmi_mc_done_cb done,
00156                   void            *cb_data);
00157 
00158 /* Get and set the setting to enable events for the entire MC.  The
00159    value returned by the get function is a boolean telling whether
00160    events are enabled.  The "val" passed in to the set function is a
00161    boolean telling whether to turn events on (true) or off (false). */
00162 int ipmi_mc_get_events_enable(ipmi_mc_t *mc);
00163 int ipmi_mc_set_events_enable(ipmi_mc_t       *mc,
00164                               int             val,
00165                               ipmi_mc_done_cb done,
00166                               void            *cb_data);
00167 
00168 /*
00169  * Get and set the event log enable flag on the MC.  If this is
00170  * enabled (true), events will go into the event log on the MC.  If
00171  * this is disabled, events will be ignored by the MC (except for ones
00172  * added directly with an add_event call).
00173  *
00174  * NOTE: This is a somewhat dangerous call to set, since other flags
00175  * are also set in the same message and there is no way to set them
00176  * individually.  The set function does a read-modify-write, but there
00177  * is a race condition.  If other things are also setting the same
00178  * flags (like a device driver), it is recommended that you *NOT* use
00179  * this function.  In fact, in general, it is recommended that you not
00180  * use this function except perhaps to ensure that events are on.
00181  * They should be on by default, anyway.
00182  */
00183 int ipmi_mc_get_event_log_enable(ipmi_mc_t            *mc,
00184                                  ipmi_mc_data_done_cb done,
00185                                  void                 *cb_data);
00186 int ipmi_mc_set_event_log_enable(ipmi_mc_t       *mc,
00187                                  int             val,
00188                                  ipmi_mc_done_cb done,
00189                                  void            *cb_data);
00190 
00191 /* Reread all the sensors for a given mc.  This will request the
00192    device SDRs for that mc (And only for that MC) and change the
00193    sensors as necessary. */
00194 int ipmi_mc_reread_sensors(ipmi_mc_t       *mc,
00195                            ipmi_mc_done_cb done,
00196                            void            *done_data);
00197 
00198 /*
00199  * SEL support for the MC
00200  */
00201 void ipmi_mc_set_sel_rescan_time(ipmi_mc_t *mc, unsigned int seconds);
00202 unsigned int ipmi_mc_get_sel_rescan_time(ipmi_mc_t *mc);
00203 
00204 /* Reread the sel.  When the hander is called, all the events in the
00205    SEL have been fetched into the local copy of the SEL (with the
00206    obvious caveat that this is a distributed system and other things
00207    may have come in after the read has finised). */
00208 int ipmi_mc_reread_sel(ipmi_mc_t       *mc,
00209                        ipmi_mc_done_cb handler,
00210                        void            *cb_data);
00211 
00212 /* Fetch the current time from the SEL. */
00213 typedef void (*sel_get_time_cb)(ipmi_mc_t     *mc,
00214                                 int           err,
00215                                 unsigned long time,
00216                                 void          *cb_data);
00217 int ipmi_mc_get_current_sel_time(ipmi_mc_t       *mc,
00218                                  sel_get_time_cb handler,
00219                                  void            *cb_data);
00220 
00221 /* Set the time for the SEL.  Note that this function is rather
00222    dangerous to do, especially if you don't set it to the current
00223    time, as it can cause old events to be interpreted as new
00224    events on this and other systems. */
00225 int ipmi_mc_set_current_sel_time(ipmi_mc_t            *mc,
00226                                  const struct timeval *time,
00227                                  ipmi_mc_done_cb      handler,
00228                                  void                 *cb_data);
00229 
00230 
00231 /* Add an event to the real SEL.  This does not directly put it into
00232    the internal copy of the SEL. */
00233 typedef void (*ipmi_mc_add_event_done_cb)(ipmi_mc_t    *mc,
00234                                           unsigned int record_id,
00235                                           int          err,
00236                                           void         *cb_data);
00237 int ipmi_mc_add_event_to_sel(ipmi_mc_t                 *mc,
00238                              ipmi_event_t              *event,
00239                              ipmi_mc_add_event_done_cb handler,
00240                              void                      *cb_data);
00241 
00242 /* Allocate an event with the given data.  This is required so you can
00243    add it to the SEL. */
00244 ipmi_event_t *ipmi_event_alloc(ipmi_mcid_t   mcid,
00245                                unsigned int  record_id,
00246                                unsigned int  type,
00247                                ipmi_time_t   timestamp,
00248                                unsigned char *data,
00249                                unsigned int  data_len);
00250 
00251 typedef void (ipmi_mc_del_event_done_cb)(ipmi_mc_t *mc, int err, void *cb_data);
00252 int ipmi_mc_del_event(ipmi_mc_t                 *mc,
00253                       ipmi_event_t              *event, 
00254                       ipmi_mc_del_event_done_cb handler,
00255                       void                      *cb_data);
00256 
00257 /* Clear out all the events in the SEL if and only if the last_event
00258    passed in is the last event in the SEL.  Note that use of this is
00259    *HIGHLY* discouraged.  This is only here for HPI support.  In
00260    general, you should delete individual events and OpenIPMI will do
00261    the right thing (do a clear if they are all gone, do individual
00262    deletes if possible otherwise, etc.).  If you pass in NULL for
00263    last_event, it forces a clear of the SEL without checking anything.
00264    Very dangerous, events can be lost. */
00265 int ipmi_mc_sel_clear(ipmi_mc_t                 *mc,
00266                       ipmi_event_t              *last_event, 
00267                       ipmi_mc_del_event_done_cb handler,
00268                       void                      *cb_data);
00269 
00270 
00271 ipmi_event_t *ipmi_mc_first_event(ipmi_mc_t *mc);
00272 ipmi_event_t *ipmi_mc_last_event(ipmi_mc_t *mc);
00273 ipmi_event_t *ipmi_mc_next_event(ipmi_mc_t *mc, const ipmi_event_t *event);
00274 ipmi_event_t *ipmi_mc_prev_event(ipmi_mc_t *mc, const ipmi_event_t *event);
00275 ipmi_event_t *ipmi_mc_event_by_recid(ipmi_mc_t *mc,
00276                                      unsigned int record_id);
00277 int ipmi_mc_sel_count(ipmi_mc_t *mc);
00278 int ipmi_mc_sel_entries_used(ipmi_mc_t *mc);
00279 int ipmi_mc_sel_get_major_version(ipmi_mc_t *mc);
00280 int ipmi_mc_sel_get_minor_version(ipmi_mc_t *mc);
00281 int ipmi_mc_sel_get_num_entries(ipmi_mc_t *mc);
00282 int ipmi_mc_sel_get_free_bytes(ipmi_mc_t *mc);
00283 int ipmi_mc_sel_get_overflow(ipmi_mc_t *mc);
00284 int ipmi_mc_sel_get_supports_delete_sel(ipmi_mc_t *mc);
00285 int ipmi_mc_sel_get_supports_partial_add_sel(ipmi_mc_t *mc);
00286 int ipmi_mc_sel_get_supports_reserve_sel(ipmi_mc_t *mc);
00287 int ipmi_mc_sel_get_supports_get_sel_allocation(ipmi_mc_t *mc);
00288 int ipmi_mc_sel_get_last_addition_timestamp(ipmi_mc_t *mc);
00289 
00290 
00291 /* Get the MC's full IPMI address. */
00292 void ipmi_mc_get_ipmi_address(ipmi_mc_t    *mc,
00293                               ipmi_addr_t  *addr,
00294                               unsigned int *addr_len);
00295 
00296 /* Get the IPMI slave address of the given MC. */
00297 unsigned ipmi_mc_get_address(ipmi_mc_t *mc);
00298 
00299 /* Get the channel for the given MC. */
00300 unsigned ipmi_mc_get_channel(ipmi_mc_t *mc);
00301 
00302 
00303 /***********************************************************************
00304  *
00305  * Channel handling for MCs.
00306  *
00307  ***********************************************************************/
00308 
00309 /* 
00310  * Fetch channel information.  Note that you cannot keep the channel
00311  * info data structure passed to you, you can just use it to extract
00312  * the data you want.
00313  */
00314 typedef struct ipmi_channel_info_s ipmi_channel_info_t;
00315 typedef void (*ipmi_channel_info_cb)(ipmi_mc_t           *mc,
00316                                      int                 err,
00317                                      ipmi_channel_info_t *info,
00318                                      void                *cb_data);
00319 int ipmi_mc_channel_get_info(ipmi_mc_t            *mc,
00320                              unsigned int         channel,
00321                              ipmi_channel_info_cb handler,
00322                              void                 *cb_data);
00323 
00324 /*
00325  * Allow the user to keep their own copy of the info data.  Note that
00326  * you should *NOT* free the info data you get from the get_info.
00327  */
00328 ipmi_channel_info_t *ipmi_channel_info_copy(ipmi_channel_info_t *info);
00329 void ipmi_channel_info_free(ipmi_channel_info_t *info);
00330 
00331 /*
00332  * Extract various data from the channel.
00333  */
00334 int ipmi_channel_info_get_channel(ipmi_channel_info_t *info,
00335                                   unsigned int        *channel);
00336 
00337 #define IPMI_CHANNEL_MEDIUM_IPMB        1
00338 #define IPMI_CHANNEL_MEDIUM_ICMB_V10    2
00339 #define IPMI_CHANNEL_MEDIUM_ICMB_V09    3
00340 #define IPMI_CHANNEL_MEDIUM_8023_LAN    4
00341 #define IPMI_CHANNEL_MEDIUM_RS232       5
00342 #define IPMI_CHANNEL_MEDIUM_OTHER_LAN   6
00343 #define IPMI_CHANNEL_MEDIUM_PCI_SMBUS   7
00344 #define IPMI_CHANNEL_MEDIUM_SMBUS_v1    8
00345 #define IPMI_CHANNEL_MEDIUM_SMBUS_v2    9
00346 #define IPMI_CHANNEL_MEDIUM_USB_v1      10
00347 #define IPMI_CHANNEL_MEDIUM_USB_v2      11
00348 #define IPMI_CHANNEL_MEDIUM_SYS_INTF    12
00349 const char *ipmi_channel_medium_string(int val);
00350 int ipmi_channel_info_get_medium(ipmi_channel_info_t *info,
00351                                  unsigned int        *medium);
00352 #define IPMI_CHANNEL_PROTOCOL_IPMB      1
00353 #define IPMI_CHANNEL_PROTOCOL_ICMB      2
00354 #define IPMI_CHANNEL_PROTOCOL_SMBus     4
00355 #define IPMI_CHANNEL_PROTOCOL_KCS       5
00356 #define IPMI_CHANNEL_PROTOCOL_SMIC      6
00357 #define IPMI_CHANNEL_PROTOCOL_BT_v10    7
00358 #define IPMI_CHANNEL_PROTOCOL_BT_v15    8
00359 #define IPMI_CHANNEL_PROTOCOL_TMODE     9
00360 const char *ipmi_channel_protocol_string(int val);
00361 int ipmi_channel_info_get_protocol_type(ipmi_channel_info_t *info,
00362                                         unsigned int        *prot_type);
00363 
00364 #define IPMI_CHANNEL_SESSION_LESS       0
00365 #define IPMI_CHANNEL_SINGLE_SESSION     1
00366 #define IPMI_CHANNEL_MULTI_SESSION      2
00367 #define IPMI_CHANNEL_SESSION_BASED      3
00368 const char *ipmi_channel_session_support_string(int val);
00369 int ipmi_channel_info_get_session_support(ipmi_channel_info_t *info,
00370                                           unsigned int        *sup);
00371 /* Data is 3 bytes long */
00372 int ipmi_channel_info_get_vendor_id(ipmi_channel_info_t *info,
00373                                     unsigned char       *data);
00374 /* Data is 2 bytes long */
00375 int ipmi_channel_info_get_aux_info(ipmi_channel_info_t *info,
00376                                    unsigned char       *data);
00377 
00378 /*
00379  * Get and set the channel access information.  You should generally
00380  * get the items you want, modify them, then write them back out.
00381  */
00382 typedef struct ipmi_channel_access_s ipmi_channel_access_t;
00383 typedef void (*ipmi_channel_access_cb)(ipmi_mc_t             *mc,
00384                                        int                   err,
00385                                        ipmi_channel_access_t *info,
00386                                        void                  *cb_data);
00387 int ipmi_mc_channel_get_access(ipmi_mc_t              *mc,
00388                                unsigned int           channel,
00389                                enum ipmi_set_dest_e   dest,
00390                                ipmi_channel_access_cb handler,
00391                                void                   *cb_data);
00392 int ipmi_mc_channel_set_access(ipmi_mc_t             *mc,
00393                                unsigned int           channel,
00394                                enum ipmi_set_dest_e  dest,
00395                                ipmi_channel_access_t *access,
00396                                ipmi_mc_done_cb       handler,
00397                                void                  *cb_data);
00398 
00399 /*
00400  * Allow the user to keep their own copy of the info data.  Note that
00401  * you should *NOT* free the info data you get from the get_access.
00402  */
00403 ipmi_channel_access_t *ipmi_channel_access_copy(ipmi_channel_access_t *access);
00404 void ipmi_channel_access_free(ipmi_channel_access_t *access);
00405 
00406 /*
00407  * Get and set various fields in the channel.
00408  */
00409 int ipmi_channel_access_get_channel(ipmi_channel_access_t *access,
00410                                     unsigned int          *channel);
00411 int ipmi_channel_access_get_alerting_enabled(ipmi_channel_access_t *access,
00412                                              unsigned int          *enab);
00413 int ipmi_channel_access_set_alerting_enabled(ipmi_channel_access_t *access,
00414                                              unsigned int          enab);
00415 int ipmi_channel_access_get_per_msg_auth(ipmi_channel_access_t *access,
00416                                          unsigned int          *msg_auth);
00417 int ipmi_channel_access_set_per_msg_auth(ipmi_channel_access_t *access,
00418                                          unsigned int          msg_auth);
00419 int ipmi_channel_access_get_user_auth(ipmi_channel_access_t *access,
00420                                       unsigned int          *user_auth);
00421 int ipmi_channel_access_set_user_auth(ipmi_channel_access_t *access,
00422                                       unsigned int          user_auth);
00423 #define IPMI_CHANNEL_ACCESS_MODE_DISABLED       0
00424 #define IPMI_CHANNEL_ACCESS_MODE_PRE_BOOT       1
00425 #define IPMI_CHANNEL_ACCESS_MODE_ALWAYS         2
00426 #define IPMI_CHANNEL_ACCESS_MODE_SHARED         3
00427 const char *ipmi_channel_access_mode_string(int val);
00428 int ipmi_channel_access_get_access_mode(ipmi_channel_access_t *access,
00429                                         unsigned int          *access_mode);
00430 int ipmi_channel_access_set_access_mode(ipmi_channel_access_t *access,
00431                                         unsigned int          access_mode);
00432 /* See IPMI_PRIVILEGE_xxx for the values. */
00433 int ipmi_channel_access_get_priv_limit(ipmi_channel_access_t *access,
00434                                        unsigned int          *priv_limit);
00435 int ipmi_channel_access_set_priv_limit(ipmi_channel_access_t *access,
00436                                        unsigned int          priv_limit);
00437 /* Normally setting will only set the values you have changed.  This
00438    forces all the values to be set. */
00439 int ipmi_channel_access_setall(ipmi_channel_access_t *access);
00440 
00441 /***********************************************************************
00442  *
00443  * Misc stuff...
00444  *
00445  **********************************************************************/
00446 
00447 /* Get the MC that the message is sent to for reading and controlling
00448    the sensor.  The SDR for the sensor may not have come from here.
00449    Note that this is not refcounted, it is held in existance by the
00450    sensor's refcount.  So don't keep this after the sensor pointer
00451    ceases to exist. */
00452 ipmi_mc_t *ipmi_sensor_get_mc(ipmi_sensor_t *sensor);
00453 
00454 
00455 /***********************************************************************
00456  *
00457  * Crufty backwards-compatible interfaces.  Don't use these as they
00458  * are deprecated.
00459  *
00460  **********************************************************************/
00461 
00462 /* A monitor to tell when the SDRs and SELs for an MC are read for the
00463    first time and are finished being processed.  Setting the handler
00464    to NULL disables it.  Note this only works for the first time, it
00465    will not be called on subsequent SDR and SEL reads and checks. */
00466 int ipmi_mc_set_sdrs_first_read_handler(ipmi_mc_t      *mc,
00467                                         ipmi_mc_ptr_cb handler,
00468                                         void           *cb_data);
00469 int ipmi_mc_set_sels_first_read_handler(ipmi_mc_t      *mc,
00470                                         ipmi_mc_ptr_cb handler,
00471                                         void           *cb_data);
00472 
00473 #ifdef __cplusplus
00474 }
00475 #endif
00476 
00477 #endif /* _IPMI_MC_H */

© sourcejam.com 2005-2008