[comp.unix.questions] SUMMARY: Passing floats in inet socket-based IPC

luj@delta.ecn.purdue.edu (Jun Lu) (11/29/90)

After I posted my query, I got several replies. They almost all suggest to
use XDR(External Data Representation).  Due to the several requests for
summary, here is the one:

Query:
-----
Is there a portable way for passing floats(or any data types) between two
machines, which may have different architectures ?


The answer from vipin@Eng.Sun.COM (Vipin Samar) is most complete one
    -----

	--use Sun's XDR (external data representation).  Look into the Sun
	documentation for more details.  

	--XDR is available on almost all platforms.  XDR is used by NFS.
	So if a platform runs NFS, it surely has the support for XDR.
	Now, it is altogether a different things whether that particular
	vendor decided to expose the XDR interface to the programmers
	or not.  If you want more details on who supports what, I'll
	have to contact our marketing people and then let you know.
	So, please let me know.

 I checked all the *nix Systems that I have access to,  they all have
 <rpc/*.h>.  I think that XDR constitutes RFCxxxx.
--
-- Jun Lu                          Internet:luj@ecn.purdue.edu          --
-- Aeronautics & Astronautics      Bitnet:  luj%ecn.purdue.edu@purccvm  --
-- Purdue University		   UUCP:    pur-ee!luj                  -- 
-- W. Lafayette, IN 47907          Phone:317-494-9410  Fax:317-494-0307 --