Marc Roessler
|
Cross-Endian Message Passing with IO_MSG
|
Marc Roessler
02/23/2009 11:43 AM
post22754
|
Cross-Endian Message Passing with IO_MSG
Hi there...
I'd like to use out of band messages (_io_msg) for communication.
Communication is also needed between platforms of different endian-ness.
Of course I need to take care of endianness myself when sending my data, but what about the struct _io_msg ?
It looks as follows:
struct _io_msg {
_Uint16t type;
_Uint16t combine_len;
_Uint16t mgrid;
_Uint16t subtype;
};
Obviously, I have to convert those values myself before sending (and after receiving) from/to Network Byte Order.
Correct?
But how is this usually done? QNX 6.4.0 QNET is supposed to work cross-endian, so even for read, write, devctl, mount, .
.. those values would have to be converted. Are those converted? By whom? The ResMgr Framework? Is this backwards
compatible when with older Clients/Frameworks? (After all, those don't necessarily use Network Byte Order when sending
the structs...?)
Greetings,
Marc
|
|
|