comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Adasockets storage problem
Date: 17 Feb 2002 20:37:33 -0500
Date: 2002-02-18T01:42:03+00:00	[thread overview]
Message-ID: <u7kpbmuxu.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: a4l9f0$109v0$1@ID-107015.news.dfncis.de

"Nazgul" <darkelf@aim.homelinux.com> writes:

> Hi,
> 
> I'm using the Adasockets library to have network funcionallity in a program.
> The problem is, it works fine if the server and the client are both running
> in the same architecture, for example i386, but when the server runs in a
> HP-UX and the client in i386, the client raises and STORAGE_ERROR when
> receiving a string.
> 
> I suppose it's something about little endian/big endian and using htons(),
> htonl(),... like in C, but I don't know how to fix it.

Probably the string length is sent as a multibyte integer. You may
have to override String'Output, and send the length in a canonical
endianness.

SAL has some packages that help do endian conversions; see
SAL.Endianness and SAL.Gen.Word_Order_Convert.*

SAL is available at
http://users.erols.com/leakstan/Stephe/Ada/sal.html

GLADE (the multi-partition product that goes with GNAT) also has an
XDR package, that provides similar functionality (I've never used it).

-- 
-- Stephe



      parent reply	other threads:[~2002-02-18  1:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-16  9:40 Adasockets storage problem Nazgul
2002-02-16 13:53 ` Marc A. Criley
2002-02-17  7:09 ` Simon Wright
2002-02-18  1:37 ` Stephen Leake [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox