freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freeipmi-devel] ipmi_lan_open_session() question


From: Albert Chu
Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question
Date: Tue, 27 Sep 2005 17:06:05 -0700

Jim,

I forgot to ask.  What motherboard are you attempting to work with? 
I've fixed a number of session startup corner cases in 'ipmipower' that
aren't in libfreeipmi.  Some motherboards flat out handle sequence
numbers wrong and I (make a reasonable attempt to) work around it in
ipmipower.

Al

--
Albert Chu
address@hidden
Lawrence Livermore National Laboratory

----- Original Message -----
From: James Laros <address@hidden>
Date: Tuesday, September 27, 2005 4:34 pm
Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question

> 
> On 16:19 Tue 27 Sep     , Albert Chu wrote:
> > > Yeah that was a typo.... Didn't fix my problem though.
> > 
> > Hmmm.  Does something like 'ipmipower' atleast work?
> 
> I will give it a try, my other app works but I haven't
> tried using something built against freeipmi. 
> 
> By the way I got past my session id problem and now
> I get the same 0xcc response whether I use ipmi_lan_open_session
> or do everything by hand like ipmipower. Hopefully I have a
> consistent (stupid) mistake.
> 
> Jim
> > 
> > Al
> > 
> > --
> > Albert Chu
> > address@hidden
> > Lawrence Livermore National Laboratory
> > 
> > ----- Original Message -----
> > From: James Laros <address@hidden>
> > 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
> > > > address@hidden
> > > > Lawrence Livermore National Laboratory
> > > > 
> > > > ----- Original Message -----
> > > > From: James Laros <address@hidden>
> > > > 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 ............................... 
> address@hidden  
> > >   
> > > > > 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
> > > > > address@hidden
> > > > > http://lists.gnu.org/mailman/listinfo/freeipmi-devel
> > > > > 
> > > 
> > > -- 
> > > ______________________________________________________________ 
> > > 
> > > James Laros ............................... address@hidden  
>   
> > > 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
> > > 
> > > 
> 
> -- 
> ______________________________________________________________ 
> 
> James Laros ............................... address@hidden     
> 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
> 
> 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]