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

How do you call pgetappletalkinfo?



Ok guys and gals, I'm at the end of my rope here.
I'm trying to create a globally-unique symbol name;
global across a network of Macs running MCL. Sort
of a global-gensym, if you will. One way to do this
is to just concatenating a local gensym onto some unique
identifier for my local Macintosh. The problem is
getting that unique identifier for my local Mac. The
way I'm trying to do this is to get the Appletalk
address of this machine, which is always unique. So
I'm trying to call pgetappletalkinfo to get the
Appletalk address of this machine. Here's the code:

; This deftrap definition is from the Appletalk.lisp
;   interfaces file (it's Not in ROM).
(deftrap _pgetappletalkinfo ((thepbptr (:pointer :mppparamblock)) (async
:boolean))
   (:no-trap :signed-integer)
   (:no-trap #x0))

; Here's my code:
(defun get-my-appletalk-address ()
  "Returns my appletalk address."
  (let ((address nil))
    (rlet ((pb :MPPParamBlock
               :version 1
               :laLength 6
               :linkAddr (%null-ptr)
               :zoneName (%null-ptr)))
      (#_PGetAppleTalkInfo pb nil)
      (setq address (pref pb MPPParamBlock.ourAddr))
      address)))

But when I try to eval the definition, I get this error:
> Error: value 0 is not of the expected type SEQUENCE.
> While executing: EXPAND-TRAP
> Type Command-. to abort.

We haven't even gotten to the point of actually calling
the function. If I ever do get there, what goes in the
csCode field of the MPPParamBlock? IM says "PGetAppleTalkInfo"
and then refuses to define what this constant is.

Any clues anybody?
TIA,
Shannon
svspire@sandia.gov