SUMMARY: Passing floats in inet socket-based IPC

Jun Lu luj at delta.ecn.purdue.edu
Thu Nov 29 15:25:22 AEST 1990


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 at 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 at ecn.purdue.edu          --
-- Aeronautics & Astronautics      Bitnet:  luj%ecn.purdue.edu at purccvm  --
-- Purdue University		   UUCP:    pur-ee!luj                  -- 
-- W. Lafayette, IN 47907          Phone:317-494-9410  Fax:317-494-0307 --



More information about the Comp.unix.questions mailing list