[Freeipmi-devel] Re: now ipmi-sel is in C

2006-07-07 Thread Al Chu
 Also I have fixed a bug in ipmi_lan_sendto() in Release-0_2_0_branch.

I believe A.B. said we were just going to revert those changes and go
back to the codebase at 0.2.1?

Al

-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



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


Re: [Freeipmi-devel] Re: bmc-config in C

2006-07-07 Thread Al Chu
One other thought.  

We should also test to see if the output of Password20 makes sense,
since it won't on many IPMI 1.5 machines.  I think it would be
sufficient to run the Set user Password command and try to test a dummy
20 byte password.   If the result comes back invalid input (I think
that's completion code 0xCC), we know it isn't and we shouldn't output
the config option.

Al

-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



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


[Freeipmi-devel] ipmi_lan_sendto bug

2006-07-07 Thread Cress, Andrew R
This routine didn't seem to work at all in freeipmi-0.2.2-qa0 (would
call sendto with NULL pointer).  The routine is below, with the two
changes are commented with ARC:.

Andy
---

ssize_t 
ipmi_lan_sendto (int sockfd, 
 const void *buffer, 
 size_t buffer_size, 
 int flags, 
 const struct sockaddr *server_addr, 
 socklen_t server_addr_len)
{
  void *packet = NULL;
  size_t packet_length = 0;
  ssize_t bytes_sent = 0;
  int fusepad = 0;
  
  if (buffer == NULL || buffer_size == 0 || server_addr == NULL)
{
  errno = EINVAL;
  return (-1);
}
  
  /*
Note from Table 12-8, RMCP Packet for IPMI via Ethernet footnote
Some LAN adapter chips may have a problem where packets of overall
lengths 56, 84, 112, 128, or 156 are not handled correctly. The
PAD byte is added as necessary to avoid these overall
lengths. Remote console software must use the PAD byte when
formatting packets to any 10/100 Ethernet device that accepts RMCP
packets. -- Anand Babu
  */
  
  if (buffer_size == 56  ||
  buffer_size == 84  ||
  buffer_size == 112 ||
  buffer_size == 128 ||
  buffer_size == 156)
{
  packet_length = buffer_size + IPMI_LAN_PKT_PAD_SIZE;
  packet = alloca (packet_length);
  memset (packet, 0, packet_length);
  memcpy (packet, buffer, buffer_size);
  fusepad = 1;
} else {  /* ARC: was missing */
  packet_length = buffer_size;
  packet = buffer;
}
  
  bytes_sent = sendto (sockfd, 
   packet, 
   packet_length, 
   flags, 
   server_addr, 
   server_addr_len);
  
  if (bytes_sent == -1)
return (-1);
  
  if (fusepad)  /* ARC: change condition */
return (bytes_sent - IPMI_LAN_PKT_PAD_SIZE);
  
  return bytes_sent;
}


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


RE: [Freeipmi-devel] ipmi_lan_sendto bug

2006-07-07 Thread Cress, Andrew R
BTW, at ipmi-lan-interface:1541:
   fd_set fd_set;  
Gives FD_ZERO macro errors with several compiler versions, so
   fd_set fd_set1; 
Or similar should be used.

Andy 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Cress, Andrew R
Sent: Friday, July 07, 2006 4:35 PM
To: freeipmi-devel@gnu.org
Subject: [Freeipmi-devel] ipmi_lan_sendto bug

This routine didn't seem to work at all in freeipmi-0.2.2-qa0 (would
call sendto with NULL pointer).  The routine is below, with the two
changes are commented with ARC:.

Andy
---

ssize_t 
ipmi_lan_sendto (int sockfd, 
 const void *buffer, 
 size_t buffer_size, 
 int flags, 
 const struct sockaddr *server_addr, 
 socklen_t server_addr_len)
{
  void *packet = NULL;
  size_t packet_length = 0;
  ssize_t bytes_sent = 0;
  int fusepad = 0;
  
  if (buffer == NULL || buffer_size == 0 || server_addr == NULL)
{
  errno = EINVAL;
  return (-1);
}
  
  /*
Note from Table 12-8, RMCP Packet for IPMI via Ethernet footnote
Some LAN adapter chips may have a problem where packets of overall
lengths 56, 84, 112, 128, or 156 are not handled correctly. The
PAD byte is added as necessary to avoid these overall
lengths. Remote console software must use the PAD byte when
formatting packets to any 10/100 Ethernet device that accepts RMCP
packets. -- Anand Babu
  */
  
  if (buffer_size == 56  ||
  buffer_size == 84  ||
  buffer_size == 112 ||
  buffer_size == 128 ||
  buffer_size == 156)
{
  packet_length = buffer_size + IPMI_LAN_PKT_PAD_SIZE;
  packet = alloca (packet_length);
  memset (packet, 0, packet_length);
  memcpy (packet, buffer, buffer_size);
  fusepad = 1;
} else {  /* ARC: was missing */
  packet_length = buffer_size;
  packet = buffer;
}
  
  bytes_sent = sendto (sockfd, 
   packet, 
   packet_length, 
   flags, 
   server_addr, 
   server_addr_len);
  
  if (bytes_sent == -1)
return (-1);
  
  if (fusepad)  /* ARC: change condition */
return (bytes_sent - IPMI_LAN_PKT_PAD_SIZE);
  
  return bytes_sent;
}


___
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] Intel and IAMT

2006-07-07 Thread Anand Babu
On Fri, Jul 07, 2006 at 04:35:19PM -0400, Cress, Andrew R wrote:
,
| This routine didn't seem to work at all in freeipmi-0.2.2-qa0 (would
| call sendto with NULL pointer).  The routine is below, with the two
| changes are commented with ARC:.
| 
| Andy
| ---
| 
| ssize_t 
| ipmi_lan_sendto (int sockfd, 
|const void *buffer, 
|size_t buffer_size, 
|int flags, 
|const struct sockaddr *server_addr, 
|socklen_t server_addr_len)
| {
|   void *packet = NULL;
|   size_t packet_length = 0;
|   ssize_t bytes_sent = 0;
|   int fusepad = 0;
`
Hi Cress,
This bug is already fixed in the CVS by Bala. Thanks for looking into it.

BTW, I am upset at the way Intel is taking platform management
forward.  Intel was the one to promote IPMI and now Intel is moving to a
proprietary IAMT implementation. Till now, I could not get the specs
for AMT without NDA. I was offered to receive SDK source but with NDA
and I refused.

AMD, HP, DELL, SUN, IBM and the rest of the world supports IPMI now.
Even Tyan Bensley platforms supports IAMT. Only the Intel motherboards don't.

Can you throw us some light on this issue and help us with specs if possible?

-- 
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] Re: now ipmi-sel is in C

2006-07-07 Thread Al Chu
On Fri, 2006-07-07 at 15:20 -0700, Anand Babu wrote:
 This bug was introduced because of re-transmission feature. I thought,
 that feature was required, so we fix the bug.

These functions were nearly entirely re-written.  I have no idea why.

All retransmission code should only be in the UDM code.  None of it
should be in ipmi_lan_sendto().  The ipmi_lan_sendto() in 0.3.0 is still
the same as the code in 0.2.0.

Al

-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory



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


[Freeipmi-devel] Re: now ipmi-sel is in C

2006-07-07 Thread Bala.A
Hi Al,

packet retransmission code is only in UDM.  I did code cleanup in
ipmi_lan_sendto() and forgot to initialize packet_size variable.  Because
of that, ipmi_lan_sendto() was failing.

Thanks,

Bala
---
Free as in freedom
http://www.gnu.org/


 On Fri, 2006-07-07 at 15:20 -0700, Anand Babu wrote:
 This bug was introduced because of re-transmission feature. I thought,
 that feature was required, so we fix the bug.

 These functions were nearly entirely re-written.  I have no idea why.

 All retransmission code should only be in the UDM code.  None of it
 should be in ipmi_lan_sendto().  The ipmi_lan_sendto() in 0.3.0 is still
 the same as the code in 0.2.0.

 Al

 --
 Albert Chu
 [EMAIL PROTECTED]
 925-422-5311
 Computer Scientist
 High Performance Systems Division
 Lawrence Livermore National Laboratory






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