|
RE: Cross-Endian Message Passing with IO_MSG
|
02/24/2009 9:17 AM
post22815
|
RE: Cross-Endian Message Passing with IO_MSG
The client side should be just as usual. Everything suppose to be done
in server (resource manager) side. Please note this also means when you
"reply", you also need to swap your own data if the request is coming
from a cross-endian client.
As a resource manager you know a request comes from cross endian client
by testing
if (ctp->info.flags & _NTO_MI_ENDIAN_DIFF)
The client does not need to do anything, the under layer QNET would know
a message is come from a same-endian/cross-endian machine, and pass this
information through.
-xtang
> -----Original Message-----
> From: Marc Roessler [mailto:community-noreply@qnx.com]
> Sent: Tuesday, February 24, 2009 7:49 AM
> To: ostech-core_os
> Subject: Re: Cross-Endian Message Passing with IO_MSG
>
> Hi,
>
> on the resource manager side, yes.. but on the client side
> there is no framework, so I do (straight from the QNX Course
> material):
>
> msg.hdr.type = _IO_MSG;
> ....
> MsgSend(fd, &msg, sizeof(msg), &reply, sizeof(reply));
>
> Do I need to change this to network byte order myself?
> And how does the ResMgr know that the application has
> different endianness? Do I need to tell this to the ResMgr
> somehow or is this handled by QNet?
>
> Thanks & Greetings,
> Marc
>
> P.S.: Can't access the URL, says "Could not authenticate user
> for SCM viewer" despite being logged in.. any other way to
> access this?
>
> _______________________________________________
> OSTech
> http://community.qnx.com/sf/go/post22804
>
>
|
|
|