home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / aix / 8370 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  1.1 KB

  1. Path: sparky!uunet!ibmarc!drake.almaden.ibm.com!drake
  2. From: drake@drake.almaden.ibm.com (Sam Drake)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: socket problem on RS6000, HELP !.
  5. Message-ID: <1895@coyote.UUCP>
  6. Date: 31 Jul 92 18:57:57 GMT
  7. References: <7749@lee.SEAS.UCLA.EDU>
  8. Sender: news@ibmarc.UUCP
  9. Organization: IBM Almaden Research Center
  10. Lines: 19
  11. Nntp-Posting-Host: drake.almaden.ibm.com
  12.  
  13. In article <7749@lee.SEAS.UCLA.EDU> giao@harpo.seas.ucla.edu (Giao N. Tran) writes:
  14. >        The communication is perfect between PS/2's systems !.
  15. >        The same program is compiled on RS6000 and run as a client version,
  16. >        then the data received at the server (PS/2) is always incorrect.
  17.  
  18. The '6000 is a big endian machine while the PS/2 is little endian.  This
  19. means that the byte representation of integers is different on the two
  20. systems.  The number 12345678 (base 16) is represented thus:
  21.  
  22. byte     0    1    2    3
  23. PS/2    78    56    34    12
  24. 6000    12    34    56    78
  25.  
  26. You need to transmit binary data in a normalized form ... investigate the
  27. use of xdr, or look at htonl() and friends.
  28.  
  29.  
  30. Sam Drake / IBM Almaden Research Center 
  31. Internet:  drake@almaden.ibm.com    BITNET:  DRAKE at ALMADEN
  32.