We had a Unix code to create diameter file from .xml file as input. As we have moved to Linux platform we need to create same utility, code was compiled successfully but utility is not creating output file content as expected the bits are reversed in order for every byte , i think its because Linux is little endian.
Message block to be written to output file is of format :
ACE_Message_Block* mb = m_pReqMsgBlock;
while (mb) {
out.write(mb->rd_ptr(), mb->size());
mb = mb->cont();
}
Can anyone suggest what extra can be added to code so that bytes can be written in expected manner ?