Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!mit-eddie!bbn.com!fkittred From: fkittred@bbn.com (Fletcher Kittredge) Newsgroups: comp.sys.dec Subject: Re: Problems with ntohs Message-ID: <62825@bbn.BBN.COM> Date: 20 Feb 91 01:54:31 GMT References: Sender: news@bbn.com Reply-To: fkittred@spca.bbn.com (Fletcher Kittredge) Distribution: comp Organization: Bolt Beranek and Newman Inc., Cambridge MA Lines: 27 In article warren@atmos.washington.edu (David Warren) writes: >Are we discussing VAX ULTRIX or risc ULTRIX. If your ULTRIX is on a >DECstation, you should be able to just reverse the byte order. (I >believe that NFS will even do it for you automatically). If, however, >you ULTRIX is on VAX architecture you will need to also convert >between VAX and IEEE floating point. On a DECstation there are the >routines ftoi, itof, dtoi, itod, gtoi and itog that take care of this. I >have also seen programs that run under VMS to do the same things. >There is probably someone out there that already has them under SUNOS. I suspect the cleanest solution to your problem is to use XDR. XDR is avaliable, documented and supported on the Sun. XDR is available and undocumented on Ultrix. I have no idea if DEC is supporting its use or not. Since NCS seems to be lacking this feature (A general purpose, standalone data conversion facility), it would be in DEC's interest to to support XDR (which probably means they won't). RPC/XDR is in the public domain and is floating around the net. A copy of an implementation lives on uunet.uu.net, available for anonymous FTP. regards, fletcher Fletcher Kittredge Platforms and Tools Group, BBN Software Products 10 Fawcett Street, Cambridge, MA. 02138 617-873-3465 / fkittred@bbn.com / fkittred@das.harvard.edu