[PATCH 2/7] dpwsockx: Implementation of SPInit
Kai Blin
kai.blin at gmail.com
Sat Oct 10 02:30:33 CDT 2009
On Tuesday 01 September 2009 11:00:37 Henri Verbeet wrote:
I realize I'm a bit late for the party, but anyway:
> 2009/9/1 Ismael Barros <razielmine at gmail.com>:
> > +typedef struct tagDPSP_MSG_HEADER
> > +{
> > + DWORD size; /* size & 0x000FFFFF, token & 0xFFF00000
> > */ + SOCKADDR_IN SockAddr;
> > +} DPSP_MSG_HEADER, *LPDPSP_MSG_HEADER;
> > +typedef const DPSP_MSG_HEADER* LPCDPSP_MSG_HEADER;
> > +
>
> It seems you're sending this over the network, so you should make sure
> it's correctly packed, and take the byte order into account.
Wine runs on architectures with different byte order? I'm not sure if we need
to be too concerned here. DirectPlay basically sets up a couple of structs
for managing multiplayer games and pushes the structs over the network. It's
a pretty common way for Microsoft to define "network protocols". I've even
seen pointers in the structures being passed, of course they're completely
meaningless to the other peers.
Of course the packing needs to match what MS is sending over the network.
Cheers,
Kai
--
Kai Blin
WorldForge developer http://www.worldforge.org/
Wine developer http://wiki.winehq.org/KaiBlin
Samba team member http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20091010/70d5f91f/attachment-0001.pgp>
More information about the wine-devel
mailing list