freeipmi-devel
[Top][All Lists]
Advanced

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

RE: [Freeipmi-devel] Using libfreeipmi interface


From: Cress, Andrew R
Subject: RE: [Freeipmi-devel] Using libfreeipmi interface
Date: Wed, 27 Oct 2004 17:09:21 -0400

Albert,

I did find the problem that was causing the recvfrom to abort.

In libfreeipmi/src/ipmi-lan-interface.c at about line 699:
    fromlen = _pkt_len;  /* added this, fromlen must be initialized */
    pkt_len = ipmi_lan_recvfrom (sockfd, pkt, _pkt_len, 0, 
                                 (struct sockaddr *)&from, &fromlen);
There may be other places that call recvfrom where this change would be
needed also.

It works now, if the app is careful with sequence numbers.

Andy

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Cress, Andrew R
Sent: Wednesday, October 27, 2004 2:07 PM
To: Albert Chu
Cc: address@hidden
Subject: RE: [Freeipmi-devel] Using libfreeipmi interface


Albert,

I have been able to get the kcs interface working with the FreeIPMI
library, but not yet the  LAN interface.  I'm using
ipmi_lan_open_session() and ipmi_lan_cmd(), and I put in some debug
statements in ipmi-lan-interface.c.
The ipmi_lan_open_session fails at the Get_Session_Challenge command
response.
I'm confused as to why ipmi_lan_recvfrom returns -1 for this command.
The ipmipower app does get status ok, but gets "invalid authtype" trying
to reset.
The remote node does respond to BMC LAN commands via other (Intel)
server management applications, and I've included its configuration
information below.

Attempting to open_session to remote node:
assemble_ipmi_lan_pkt complete cmd=38
ipmi_lan_sendto status = 23
ipmi_lan_recvfrom len = 30
unassemble complete
get_chan_auth rsp: 38 00 07 17 01 00 00 00 00 00
ipmi_comp_test complete status = 1
assemble_ipmi_lan_pkt complete cmd=39
get_sess_chal rq: 39 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ipmi_lan_sendto status = 38
ipmi_lan_recvfrom len = -1
ipmi_lan_open_session: rv = -1 id=0

BMC LAN Configuration of remote node:
Lan Param(0) Set in progress: 00
Lan Param(1) Auth type support: 17
Lan Param(2) Auth type enables: 17 17 06 06 00
Lan Param(3) IP address: 10 243 42 182
Lan Param(4) IP addr src: 01
Lan Param(5) MAC addr: 00 03 47 94 ff 46
Lan Param(6) Subnet mask: 255 255 255 0
Lan Param(7) IPv4 header: 40 40 10
Lan Param(10) BMC grat ARP : 01
Lan Param(11) grat ARP interval: 04
Lan Param(12) Def gateway IP: 10 243 42 251
Lan Param(13) Def gateway MAC: 00 05 9a da d3 fc
Lan Param(14) Sec gateway IP: 0 0 0 0
Lan Param(15) Sec gateway MAC: 00 00 00 00 00 00
Lan Param(16) Community string: public
Lan Param(17) Num dest: 04
Lan Param(18) Dest type: 01 00 01 00 69
Lan Param(19) Dest address: 01 00 00 [10 243 42 182] 00 03 47 94 ff 46
Lan Param(192) DHCP Server IP: 0 0 0 0
Lan Param(193) DHCP MAC Address: 00 00 00 00 00 00
Lan Param(194) DHCP Enable: 00
GetChanAcc(lan), ret = 0, new value = 02
  Access = Always Avail, PEF Alerts Enabled
Lan Param(201) Channel Access Mode(Lan): 02 04
Get User Access(1): 04 01 00 14

-----Original Message-----
From: Albert Chu [mailto:address@hidden 
Sent: Monday, October 25, 2004 5:11 PM
To: Cress, Andrew R
Cc: address@hidden
Subject: Re: [Freeipmi-devel] Using libfreeipmi interface


Hi Andrew,

Thanks for trying to support libfreeipmi with ipmiutil.  I think a good
place to start off for how to use the LAN interface would be
libfreeipmi/src/ipmi-ping.c and ipmiping/src/ipmiping.c. The code in
ipmi-ping.c is a wrapper for a generic send/select/read loop that is
common to ipmiping and rmcpping.  The code in ipmiping.c contains the
code to construct and parse packets.  You should be able to see how
packets are constructed, sent, read packets with arbitrary buffer sizes.
and parsed/checked.

For KCS, the construction/parsing of packets is similar.  You just need
to call ipmi_kcs_cmd() or ipmi_kcs_cmd_interruptible() instead of
ipmi_lan_sendto() and ipmi_lan_recvfrom().  I'm not sure of situations
where you may get a response from the BMC of arbitrary size when working
in-band.  Presumably everything will be bounded by some length, and we
have accounted for those varying lengths in the templates
(fiid_template_t types).  Is there is a situation that you are
encountering this issue?  I suppose we could create a helper function
that allocates space based on an integer parameter rather than a
template parameter. AB?? Ian??

I'm not sure about AB's schedule for putting out a hackers guide.  I
will put libfreeipmi examples onto our collective todo list.

Al

--
Albert Chu
address@hidden
Lawrence Livermore National Laboratory

----- Original Message -----
From: "Cress, Andrew R" <address@hidden>
Date: Monday, October 25, 2004 1:34 pm
Subject: [Freeipmi-devel] Using libfreeipmi interface

> Hi,
> 
> I have some IPMI Management Utilities which currently support 3 
> types of
> IPMI drivers, and I'd like to add support for libfreeipmi also.  These
> utilities have the IPMI commands already composed.   See
> http://ipmiutil.sf.net
> I did download version 0.1.0 and build it on my system, and bmc-info,
> bmcpower, and bmcping seem to work ok.  
> 
> Looking at the freeipmi-hackers-intro.pdf, it looks like I need more
> information about the LAN interface and KCS interface routines.  The
> other documents seem to aimed at users, and not much documentation 
> aboutthe developers' API yet.  I tried to distill out what I needed 
> from the
> sample apps, but I'm having trouble in the general case passing a
> pre-formed IPMI command, with a receive buffer that is big enough to
> handle whatever the response might be, then getting the actual 
> receivedbyte count.  The sample routines are targeted at certain 
> given commands
> and the known return length for each.  Maybe what I need is a
> 'pass-through' template, or something (?).  
> 
> What would you suggest?
> 
> Andy
> 
> ---
> Andy Cress                      803-216-2356  fax:803-216-2178
> Senior Software Engineer    address@hidden
> Intel Corporation, Columbia Design Center, CBA1
> 100 Center Point Cir., Suite 200, Columbia, SC 29210
> http://ipmiutil.sf.net   http://scsirastools.sf.net
> BTW, I speak for myself, not for Intel Corp.
> "Do not merely look out for your own personal interests, but also for
> the interests of others." Phil 2:4
> 
> 
> _______________________________________________
> Freeipmi-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/freeipmi-devel
> 



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




reply via email to

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