Re: [Freeipmi-devel] ipmi_lan_open_session() question

2005-11-03 Thread Anand Babu
,[ Albert Chu [EMAIL PROTECTED] ]
| AB, I'm not doubting that it has a number of enhancements.  However,
| with all APIs, as you abstract away details you remove flexibility from
| the programmer.  For example, the strength of ipmipower is its protocol
| parallelism.  Its protocol parallelism comes from its manual
| management of the ipmi protocol across all nodes.  How can I still
| achieve the performance of the old ipmipower if ipmipower is forced to
| move to the UDM?
`
Only those who wants to develop tools that needs to work both inband
and outband seamlessly has to use UDM. Otherwise you are free to
access any APIs at any layer. Only the redundant obsolete APIs are
removed. UDM is not completely ready yet to accommodate all
needs. Protocol parallelism should be achievable thru UDM
too. Performance difference will not even be noticeable. I am planning
to inline the calls.  

,[ Albert Chu [EMAIL PROTECTED] ]
| Another example.  You assume in the UDM that users are willing to block
| on a recvfrom() waiting for a reply from an IPMI cmd request.  What if a
| user doesn't want this??
`
UDM APIs will support non-blocking calls too. During UDM open call,
you pass this option.

,[ Albert Chu [EMAIL PROTECTED] ]
| I think if you can let us know what API functions may or may not
| disappear, that would help things alot.  I just don't believe its
| correct to just assume that the UDM will be better than what currently
| exists.
`
If you notice, certain new functions will be prefixed with 2. Only
those calls will be replaced. I will rename the old calls with new
name or using a macro like FREEIPMI_FORCE_0_1_3_API.

-- 
Anand Babu 
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]  
The GNU Operating System [http://www.gnu.org]  


___
Freeipmi-devel mailing list
Freeipmi-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-devel


Re: [Freeipmi-devel] ipmi_lan_open_session() question

2005-09-29 Thread ab
,[ Albert Chu [EMAIL PROTECTED] ]
| AB,
| 
|  libfreeipmi driver APIs will completely change in the next
|  release.
| 
| I just want to be sure that a reasonable backwards compatibility
| can be expected in 0.2.0.  We all have code that isn't part of
| FreeIPMI and some of the newer APIs may not be suitable/usable for
| our needs.  I know for a fact I cannot use the new sensors api at
| all.  If someone develops based out of the 0.1.3 API, I believe they
| should still be able to use the old API if it is desired.
`
So far we have retained backward compatibility. But our plans are to
drop the old APIs as soon as all of the utilities (including external
projects) report they are ready.

I seriously recommend everyone to use the Unified Driver Model (UDM)
interface. It has numerous enhancements
 * No global variables (thread safety).
 * Unified driver interface. Internally abstracts all inband,
 outofband and probing drivers.
 * Easier and cleaner API interface, fewer number of arguments.
 * It is easy to maintain UDM APIs unchanged across future releases 
   because of its design.
 * LAN driver in UDM has serious enhancements and bug
 fixes. per-message-auth support will be enabled based on
 'get-channel-auth-caps' returns automatically. This will be a big
 performance improvement (fewer bytes to transfer, one time password
 encryption). 
 * Buffers re-used where ever possible through ipmi_device_t. This
 avoids unnecessary memory copying and allocation.

0.1.3 APIs impose a serious limitation if we want to move
forward. Every IPMI command needs to be written for each driver and
utilities becomes will go crazy supporting all the drivers. I can
retain the old APIs till all utilities gets ported to newer APIs. But
they will get no new enhancements. 

Coding freezing and QA releases will happen by end of October and
Final release tentatively planned around end of November. 

I wish I can drop the APIs and have a clean start from 0.2.0
onwards. Our next major focus will be towards SOL support.

-- 
Anand Babu 
GPG Key ID: 0x62E15A31
Blog [http://ab.freeshell.org]  
The GNU Operating System [http://www.gnu.org]  


___
Freeipmi-devel mailing list
Freeipmi-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-devel


Re: [Freeipmi-devel] ipmi_lan_open_session() question

2005-09-27 Thread Albert Chu
 Yeah that was a typo Didn't fix my problem though.

Hmmm.  Does something like 'ipmipower' atleast work?

Al

--
Albert Chu
[EMAIL PROTECTED]
Lawrence Livermore National Laboratory

- Original Message -
From: James Laros [EMAIL PROTECTED]
Date: Tuesday, September 27, 2005 4:12 pm
Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question

 On 16:07 Tue 27 Sep , Albert Chu wrote:
  Hi Jim,
  
  I think the open_lan_session() function was created a long time 
 ago as a
  convenience function for libfreeipmi users.  I know that the 
 ipmiutil author (ipmiutil.sourceforge.net) atleast uses it.  I 
 suppose it has
  never been used for the FreeIPMI tools because:
  
  A) some tools like bmc-config only work in-band
  B) some tools like ipmipower need to work more reliably/quickly and
  therefore manually setup a lan session
 
 This was the first direction I went and hit a bump with extracting the
 temp session id. If I can't get past it I will send out a question.
 
  
  As for the reason why your code isn't working with MD5, I'm 
 guessing: 
  sizeof(password),
  
  should instead be
  
  strlen(password)
 
 Yeah that was a typo Didn't fix my problem though.
 
  
  ???
  
   By the way it seems to return  0 but set errno to Success??
  
  I see a few corner cases in the code.  In particular the fallout 
 case for goto error;.  I'll let AB talk about this since its his 
 part of
  the lib :P
  
  Al
  
  
  --
  Albert Chu
  [EMAIL PROTECTED]
  Lawrence Livermore National Laboratory
  
  - Original Message -
  From: James Laros [EMAIL PROTECTED]
  Date: Tuesday, September 27, 2005 2:51 pm
  Subject: [Freeipmi-devel] ipmi_lan_open_session() question
  
   I have a question about the usage of ipmi_lan_open_session.
   First off I don't see it used in any of the utilities
   that come with the distro? Any reason?
   
   I was doing things more by hand as in ipmipower until
   I noticed this call.
   
   More specific question if I use the call as follows the
   Activate Session Application Response returns a completion
   code of 0xcc (Invalid data field in request)
   
   Wasn't sure if I need to pass in something for session_seq_num
   or session_id??? In the request message the session_id seems be 
   set properly to a temp session id, session_seq is 0 which 
 should be 
   ok yes?
   
   Note that if I run it with MD5 as an auth type and provide 
 username  and password I never get an app response.
   
   By the way it seems to return  0 but set errno to Success??
   
   --
   
  u_int8_t auth_type;
  u_int8_t *username = root;
  u_int8_t *password = yada;
  u_int8_t priv;
  priv = IPMI_PRIV_LEVEL_OPERATOR;
  u_int32_t *session_seq_num;
  u_int32_t *session_id;
   
  session_seq_num = (u_int32_t *)malloc(sizeof(u_int32_t));
  session_id = (u_int32_t *)malloc(sizeof(u_int32_t));
   
  auth_type = IPMI_SESSION_AUTH_TYPE_MD5;
   
  if (ipmi_lan_open_session(conn-fd,
(struct sockaddr *)(conn-
 target_addr),   sizeof(struct 
 sockaddr_in),  IPMI_SESSION_AUTH_TYPE_NONE,
   // auth_type,
username,
   // password,
   // sizeof(password),
   NULL,
   0,
INITIAL_OUTBOUND_SEQ_NUM,
priv,
session_seq_num,
session_id)  0 ) {
  fprintf(stderr, Error: ipmi_lan_open_session %s\n, 
   strerror(errno));return -1;
  }
   
   ---
   
   Thanks if anyone can help.
   
   Jim
   -- 
   __ 
   
   James Laros ... [EMAIL PROTECTED]  
   
   Dept. 09224
   Scalable Systems Integration .. PHONE:505.845.8532
   Sandia National Labs  FAX:505.844.9297
   __
   
   Is someone getting the best of you?
   - Foo Fighters
   
   
   
   ___
   Freeipmi-devel mailing list
   Freeipmi-devel@gnu.org
   http://lists.gnu.org/mailman/listinfo/freeipmi-devel
   
 
 -- 
 __ 
 
 James Laros ... [EMAIL PROTECTED] 
 Dept. 09224
 Scalable Systems Integration .. PHONE:505.845.8532
 Sandia National Labs  FAX:505.844.9297
 __
 
 Is someone getting the best of you?
 - Foo Fighters
 
 



___
Freeipmi-devel