Alexander Amelkin 7747d86cc4
lanplus: Make byteswapping generic
Get rid of lanplus-specific yet very generic in nature
lanplus_swap() function that unconditionally swaps bytes
in an arbitrary byte array. Move it to helper module and
add two conditionally working interfaces to it:

 - array_ntoh() for network (BE) to host conversion, and
 - array_letoh() for ipmi (LE) to host conversion.

The added functions will only perform byte swapping if
the target architecture differs in endianness from the
data source. array_ntoh() will only do swap on LE machines,
while array_letoh() will only do it on BE ones.

These functions are introduced for future use in other
places of ipmitool.

Partially resolves ipmitool/ipmitool#26

Signed-off-by: Alexander Amelkin <alexander@amelkin.msk.ru>
2018-08-01 11:33:44 +03:00
..
2018-08-01 11:33:44 +03:00
2015-01-17 11:44:46 +01:00
2018-07-28 19:15:10 +03:00
2018-07-20 14:23:33 +03:00
2018-07-28 19:15:10 +03:00
2018-05-11 14:24:17 +03:00
2018-07-28 19:15:10 +03:00
2018-07-26 19:54:57 +03:00
2018-07-28 19:15:10 +03:00