Re: [Freeipmi-devel] ipmi_lan_open_session() question
Hey AB, > Protocol parallelism should be achievable thru UDM too. > UDM APIs will support non-blocking calls too. During UDM open call, > you pass this option. I suppose we can talk about these at the meeting later this month. If these are in your plans, I'd like to hear about them and how you plan to implement them. I have my own ideas concerning them and how to best implement them. Al -- Albert Chu [EMAIL PROTECTED] Lawrence Livermore National Laboratory - Original Message - From: Anand Babu <[EMAIL PROTECTED]> Date: Thursday, November 3, 2005 7:12 pm Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question > ,[ 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
,[ 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
AB, > 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. Perhaps you can tell us what functions you imagine may be dropped. > I seriously recommend everyone to use the Unified Driver Model (UDM) > interface. It has numerous enhancements 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? 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?? 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. Al -- Albert Chu [EMAIL PROTECTED] Lawrence Livermore National Laboratory - Original Message - From: [EMAIL PROTECTED], Anand Babu <[EMAIL PROTECTED]> Date: Thursday, September 29, 2005 6:31 pm Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question > ,[ 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
,[ 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
AB, > libfreeipmi driver APIs will completely change in the next > release. I just want to be sure that a "reasonable" backwards compatability 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. Al -- Albert Chu [EMAIL PROTECTED] Lawrence Livermore National Laboratory - Original Message - From: Anand Babu <[EMAIL PROTECTED]> Date: Tuesday, September 27, 2005 6:59 pm Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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? > ` > libfreeipmi driver APIs will completely change in the next > release. Thats one reason "fish" and tools waited for long time for > network support. Newer APIs are very easy to use and driver > independent. Same tools will work for inband and out-of-band > drivers > transparently. Refer to freeipmi/doc/example/udm-test.c in the CVS. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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) > ` > This means your input field(s) is wrong. You should compare your > values with one of freeipmi's tools (like ipmipower). Bala wrote a > simple UDP server to dump the values for debugging. It will be > included in the next release. First make sure ipmipower, ipmiping > tools work, before you start with your own tool. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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? > ` > With the newer APIs, session_seq, session_id crap all handled > internally by the driver. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | By the way it seems to return < 0 but set errno to Success?? > ` > Thanks for reporting, this is a bug. lan_open_session returns without > setting errno properly when ipmi_comp_test fails. I have fixed it in > the CVS now. > > -- > 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 > ___ Freeipmi-devel mailing list Freeipmi-devel@gnu.org http://lists.gnu.org/mailman/listinfo/freeipmi-devel
Re: [Freeipmi-devel] ipmi_lan_open_session() question
When you say the APIs will completely change does that mean that the current ones will dissapear? If so I guess I should wait until the next release? When will that be? Can I assist by using early release stuff? Jim On 18:59 Tue 27 Sep , Anand Babu wrote: > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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? > ` > libfreeipmi driver APIs will completely change in the next > release. Thats one reason "fish" and tools waited for long time for > network support. Newer APIs are very easy to use and driver > independent. Same tools will work for inband and out-of-band drivers > transparently. Refer to freeipmi/doc/example/udm-test.c in the CVS. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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) > ` > This means your input field(s) is wrong. You should compare your > values with one of freeipmi's tools (like ipmipower). Bala wrote a > simple UDP server to dump the values for debugging. It will be > included in the next release. First make sure ipmipower, ipmiping > tools work, before you start with your own tool. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | 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? > ` > With the newer APIs, session_seq, session_id crap all handled > internally by the driver. > > ,[ "James Laros" <[EMAIL PROTECTED]> ] > | By the way it seems to return < 0 but set errno to Success?? > ` > Thanks for reporting, this is a bug. lan_open_session returns without > setting errno properly when ipmi_comp_test fails. I have fixed it in > the CVS now. > > -- > Anand Babu > GPG Key ID: 0x62E15A31 > Blog [http://ab.freeshell.org] > The GNU Operating System [http://www.gnu.org] -- __ 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
Re: [Freeipmi-devel] ipmi_lan_open_session() question
,[ "James Laros" <[EMAIL PROTECTED]> ] | 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? ` libfreeipmi driver APIs will completely change in the next release. Thats one reason "fish" and tools waited for long time for network support. Newer APIs are very easy to use and driver independent. Same tools will work for inband and out-of-band drivers transparently. Refer to freeipmi/doc/example/udm-test.c in the CVS. ,[ "James Laros" <[EMAIL PROTECTED]> ] | 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) ` This means your input field(s) is wrong. You should compare your values with one of freeipmi's tools (like ipmipower). Bala wrote a simple UDP server to dump the values for debugging. It will be included in the next release. First make sure ipmipower, ipmiping tools work, before you start with your own tool. ,[ "James Laros" <[EMAIL PROTECTED]> ] | 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? ` With the newer APIs, session_seq, session_id crap all handled internally by the driver. ,[ "James Laros" <[EMAIL PROTECTED]> ] | By the way it seems to return < 0 but set errno to Success?? ` Thanks for reporting, this is a bug. lan_open_session returns without setting errno properly when ipmi_comp_test fails. I have fixed it in the CVS now. -- 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
Oh yeah, and if you compile FreeIPMI in debug mode (--enable-debug), you may be able to get a good idea of what's going wrong by using the --ipmidump option on ipmipower. Al -- Albert Chu [EMAIL PROTECTED] Lawrence Livermore National Laboratory - Original Message - From: Albert Chu <[EMAIL PROTECTED]> Date: Tuesday, September 27, 2005 5:06 pm Subject: Re: [Freeipmi-devel] ipmi_lan_open_session() question > 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' > thataren'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 > [EMAIL PROTECTED] > Lawrence Livermore National Laboratory > > - Original Message - > From: James Laros <[EMAIL PROTECTED]> > 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 > > > [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
Re: [Freeipmi-devel] ipmi_lan_open_session() question
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 [EMAIL PROTECTED] Lawrence Livermore National Laboratory - Original Message - From: James Laros <[EMAIL PROTECTED]> 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 > > [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 aut
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 > [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),> >
Re: [Freeipmi-devel] ipmi_lan_open_session() question
> 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; > > >} > > > > > > -
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 mailing list Freeipmi-devel@gnu.org http://lists.gnu.org/mailman/listinfo/freeipmi-devel
Re: [Freeipmi-devel] ipmi_lan_open_session() question
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 As for the reason why your code isn't working with MD5, I'm guessing: sizeof(password), should instead be strlen(password) ??? > 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 > ___ Freeipmi-devel mailing list Freeipmi-devel@gnu.org http://lists.gnu.org/mailman/listinfo/freeipmi-devel
[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