Previously, the OEM names dictionary was compiled in and
updating it required rebuilding of `ipmitool`, thus taking a
long time for newly registered OEMs to get supported by the tool.
Building also required a direct internet connection to succeed.
With this commit, the OEM enterprise dictionary is now loaded from
either ${HOME}/.local/usr/share/misc/enterprise-numbers or from
/usr/share/misc/enterprise-numbers (in that precedence).
Those files can be downloaded from iana.org at
http://www.iana.org/assignments/enterprise-numbers
Partially resolvesipmitool/ipmitool#11
Fixes: 9d41136c9b7c7d392f1a3f3adeb6d7fe3bd3135e
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Several functions were passed a struct ipmi_intf* even though it was
unused. This removes the unused parameters and changes calls and
signatures.
Partially resolvesipmitool/ipmitool#13
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Dates, times and floating point numbers from now on
will be displayed using system locale settings.
Resolvesipmitoo/ipmitool#23
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Cipher suite ID is a byte as per IPMI spec.
Use the appropriate function and consider target endianness
(so write to a temporary variable).
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
Based on current crypto alogrithms, one could rank cipher suites along
these lines:
17 > 3 >> all the rest
17 and 3 are the only cipher suites that implement any sort of
confidentiality alogorithm that is secure. In addition, any hmac-md5 or
md5 integrity algorithm used in integrity is weak at best and dangerous
for authentication.
This could possibly be enabled in a simpler mechanism by simply checking
for 17 and then choosing it before falling back to 3, but the way this
is implemented, it makes it easy to change the list of acceptable
algorithms from two to three or more items.
Resolvesipmitool/ipmitool#29
Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
Remove all direct comparisons to 'NULL' for pointers.
Replace them with boolean-like 'if (ptr)' and 'if (!ptr)'.
This makes conditions shorter and easier to read.
Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
There are lots of feature test macros like _POSIX_SOURCE,
_BSD_SOURCE, etc. chaotically placed at the beginning of
multiple files without apparent reason, sometime purely
erroneously.
This commit removes them all for the sake of cleaner code.
No new warnings are added due to that at least for gcc 5.4
on Linux with glibc 2.23.
Added an option -Z to display all dates in UTC.
Resolvesipmitool/ipmitool#19
Change-Id: Iac3a61190eefde12d95c892af26072ec01f60474
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Commit adds macros and #include in order to bring down the number of `warning:
implicit declaration of function 'X' [-Wimplicit-function-declaration]`
warnings.
Boards equipped with 'dumb' Intel MAC can do only SOL. IPMITool performs
several autodetection requests before initiating SOL, which are not
recognized by the boards. With each request retried 5 times it takes
about 30 seconds to establish SOL. This patch resolves the problem.
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6
connection. In order to do so, struct ipmi_intf has been extended to carry
ai_family flag.
1. my_addr is not set if an interface does not expose set_my_addr.
Currently, the only interface which requires some special handling to set
my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
set it regardles of bridging.
Commit for: Dmitry Bazhenov
Currently, interface-management code in the ipmitool does not allow safe
interface re-opening (i.e. closing and opening again). It is because the session
is allocated in the interface setup callback while is freed in the close
callback. So, normal re-opening of the interface, which can be required for
example durng the HPM.1 upgrade, leads to segmentation fault. That's why in the
ipmi_hpmfwupg.c instead of normal closing interface, directly access the
interface data for subsequent re-opening.
Commit for Dmitry Bazhenov
This patch adds basic long message support for PICMG-based systems according to
the HPM.2 specification.
It also introduces APIs for setting inbound and outbound messages sizes per
selected interface.
This APIs are used in LAN and LAN+ interfaces to set autonomously detected
inbound and outbound message sizes.
The newly introduced APIs also replace the existing message size detection code
in several ipmitool commands in order to leverage the advantages of long message
support (HPM.1 upgrade, SDR acquring, FRU inventory read and write).
The Kontron-specific long message support is moved under a OEM option.
Commit for Dmitry Bazhenov