[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XDR implementation in Lisp



I am looking for a XDR compatible rpc:define-octet-structure-like implementation
for Franz or Lucid. A full lisp-side XDR-RPC facility would be great:

  Peter Benson <pab@lucid.com> writes:
  I don't know what XDR stands for, but it sounds like def-foreign-struct is
  what you are looking for.

>From the man page for XDR:


NAME
     xdr - library routines for external data representation

SYNOPSIS AND DESCRIPTION
     XDR routines allow C programmers to describe arbitrary  data
     structures  in  a  machine-independent  fashion.   Data  for
     remote procedure calls (RPC) are encoded and  decoded  using
     these routines.  See rpc(3N).

     All XDR  routines  require  the  header  <rpc/xdr.h>  to  be
     included.


This is implemented (in part) on Symbolics using the define-octect-structure macro:

(rpc:define-octet-structure (gif-screen-descriptor :access-type :unsigned-8)
  (width rpc:integer-16)
  (height rpc:integer-16)
  (* (* rpc:cardinal-8
	(pixel-size-1 (load-byte 0 3))
	(color-resolution-1 (load-byte 4 3))
	(color-map-p (rpc:boolean-bit 7))))
  (background-pixel rpc:cardinal-8)
  (* (rpc:padding rpc:cardinal-8 1)))

The datatypes are compatible with the XDR datatypes. In addition,
Symbolics also implements the stream-based "other end" to RPC on the
Ivory side in their Sun-Ivory connection.

Regards,
Albert Boulanger
aboulanger@bbn.com