Menu

#824 OSAF: little endian vs. big endian systems

future
unassigned
None
discussion
osaf
-
major
2014-03-26
2014-03-26
No

Has anyone tried to run OpenSAF in "mixed endian cluster", with both little endian and big endian nodes ?

According to the code, it seems that OpenSAF has been written for little endian systems, and having both a node with a little endian system and a node with a big endian system is not possible.

Code of ncs_encode_ and ncs_decode_ functions had been written for little endian systems, and it works correctly. Integers are converted into network byte order (big endian), while looking from big endian system perspective, it's incorrect. Integers are converted in the opposite way.

Also, macros m_NCS_OS_HTONLL_P() and m_NCS_OS_NTOHLL_P that should replace non-existing htonll and ntohll functions had been written for little endian systems. they don't work correctly in big endian systems.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB