mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-users] docs/interface_protocol.txt: network byte order is wron


From: Goswin Brederlow
Subject: [Mldonkey-users] docs/interface_protocol.txt: network byte order is wrong
Date: 04 Sep 2002 04:29:11 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter)

Hi,

in docs/interface_protocol.txt you say:

----------------------------------------------------------------------
Basic ideas:
============

  The GUI must connect to the core via a TCP socket. Binary messages are
sent on this socket, with the following format:

| size of content (4 bytes) | content |

size of content: 4 bytes integer (in network order, ie
  1025 = 1 + 256 * 4 = |   1 |   4 |  0 |  0 | ), indicating the length
  of the content of the message
----------------------------------------------------------------------

Now that is little endian as used on ix86 cpus and not network byte
order as used on the internet.

>From man ntohl:
----------------------------------------------------------------------
 On the i80x86 the host byte order  is  Least  Significant  Byte  first,
 whereas  the  network byte order, as used on the Internet, is Most Sig-
 nificant Byte first.
----------------------------------------------------------------------


MfG
        Goswin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]