[net.lang.c] Converting structs of binary data among machine types

gnu@l5.uucp (John Gilmore) (09/28/85)

In article <274@ccivax.UUCP>, rb@ccivax.UUCP (rex ballard) writes:
> Speaking of inter-processor communications, how about a binary
> "packf()/unpackf()" function for the library.  It can get real hairy
> trying to get a complex structure of long words, shorts, and chars
> between a VAX or PDP-11 and a 68000 in binary form.  For that matter
> letting a 68000 and an 8088 share the same disk can do real strange
> things to "plot(5)" and similar binary files that write different order
> & length "ints".

This is one of the problems that the Sun NFS had to solve.  They solved
it with "Network Data Representation" or NDR.  The package that
implements NDR was posted to the net within the last year (with the
Remote Procedure Call, RPC, package); contact your local or nearby
net.sources archive for a copy.

mikeb@inset.UUCP (Mike Banahan) (10/03/85)

As well as the Sun Xternal Data Representation (XDR), there is
an ISO X.something proposal for the same thing. Anyone remember the number?
-- 
Mike Banahan, Technical Director, The Instruction Set Ltd.
mcvax!ukc!inset!mikeb

robert@cheviot.uucp (Robert Stroud) (10/04/85)

In article <706@inset.UUCP> mikeb@inset.UUCP (Mike Banahan) writes:
>As well as the Sun Xternal Data Representation (XDR), there is
>an ISO X.something proposal for the same thing. Anyone remember the number?
>-- 
>Mike Banahan, Technical Director, The Instruction Set Ltd.
>mcvax!ukc!inset!mikeb

This is part of the CCITT X.400 series. I think the data encoding standard
is X.409. The Sun standard is at least in part a programming interface to
such a protocol - I doubt the X.400 stuff gets that specific.

Robert Stroud,
Computing Laboratory,
University of Newcastle upon Tyne.

ARPA robert%cheviot.newcastle@ucl-cs.ARPA
UUCP ...!ukc!cheviot!robert
JANET robert@newcastle.cheviot