X hits on this document

PDF document

February 10, 2006 - page 64 / 238

1140 views

0 shares

0 downloads

0 comments

64 / 238

52

CHAPTER 3. IPMI INTERFACES

int

err,

_ _ ipmi lan config_t *config,

void

_ *cb data);

Once you have a lanparm structure, you can get and set individual parms assuming you follow all the rules associated with the configuration table. However, there is a much easier way that OpenIPMI provides.

After you have allocated a lanparm structure these, the function

:

t y p e d e f v o i d ( * i p m i _ l a n _ g e t _ c o n f i g _ c b ) ( i p m i _ l a n p a r m _ t

*lanparm,

void

* c b _ d a t a ) ;

i n t i p m i _ l a n _ g e t _ c o n f i g ( i p m i _ l a n p a *lanparm, r m _ t i p m i _ l a n _ g e t _ c o n f i g _ c b d o n e ,

will fetch the full current configuration. Note that when you call this, you will be holding a lock if it succeeds. You must release the lock when you are done, or no one else will be able to change the configuration unless they forcefully remove your lock.

At this point, you can change the value in the config structure. But those changes are only local. When you have complete making the changes, you must commit them back to the BMC. To do this, call:

_ _ ipmi lan config_t

*config,

_ _ _ ipmi lanparm done cb done,

void

_ *cb data);

i n t i p m i _ l a n _ s e t _ c o n f i g ( i p m i _ l a n p a r m _ t

*lanparm,

After this point in time, the config cannot be used for future set operation, because it has been committed. You must re-read it to modify parameters again. If you do not wish to modify the configuration, you still need to clear the lock. Do that with:

i n t i p m i _ l a n _ c l e a r _ l o c k ( i p m i _ l a n p a r m _ t i p m i _ l a n _ c o n f i g _ t i p m i _ l a n p a r m _ d o n e

_

*lanparm, *config, cb done,

void

* c b _ d a t a ) ;

Once you are done with the config structure, you must free it with: void ipmi_lan_free_config(ipmi_lan_config_t *config); When you are done with a lanparm structure, you must free it with:

i n t i p m i _ l a n p a r m _ d e s t r o y ( i p m i _ l a n p a r m _ t

*lanparm,

i p m i _ l a n p a r m _ d o n e _ c b h a n d l e r ,

void

* c b _ d a t a ) ;

If the lanparm structure currently has operations pending on it, the destroy will be delayed until those operations are complete. The handler will be called when the actual destroy takes place.

3.9.5

The

OpenIPMI

LAN

Interface

The LAN interface is complicated, but OpenIPMI handles most of the details for the user. A single function sets up the interface. Unfortunately, that function takes a huge number of parameters due to the large number of things required to configure a IPMI LAN connection. The function is:

Document info
Document views1140
Page views1140
Page last viewedMon Jan 23 15:41:19 UTC 2017
Pages238
Paragraphs8090
Words85809

Comments