"Bob Armstrong" <bob at jfcl.com> writes:
Source code?
You mean the VMS fiche ? Sorry - at one time I had access to a set, but
no more...
Well, these days, I read it from CD/DVD. ;)
1 259 %SBTTL 'NML$PROCESS_NICE Main command processing
routine'
1 260
1 261 GLOBAL ROUTINE NML$PROCESS_NICE (msg_desc, resp_rtn): NOVALUE =
1 262
1 263 !++
1 264 ! This routine is the main command processing routine.
NICE messages
1 265 ! are parsed to determine the requested function and
then the proper
1 266 ! routine is called to perform the function.
1 267 !
1 268 ! Inputs:
1 269 !
1 270 ! msg_desc = Address of descriptor of NICE message
1 271 ! resp_rtn = Address of action routine to call with
NICE response
1 272 ! The action routine is called
with the following arguments:
1 273 ! 1) Address of
descriptor of NICE response
1 274 !
1 275 ! Outputs:
1 276 !
1 277 ! None - control is returned after the last response
has been passed
1 278 ! to the action routine.
1 279 !--
If you Google NML$PROCESS_NICE
Did that last night :-) There's not a lot, but I did find Nick deSmith's
netname.c example, and one other little code fragment, which was helpful.
The "Callback routine" is handed a descriptor.
I saw that. I was really hoping that the callback routine received an
extra generic parameter (like a Windows lParam or a VMS AST parameter) so
that the caller of NML$PROCESS_NICE could pass arbitrary additional
arguments to the callback. It doesn't look like that happens, though, so if
the callback wants to store or save any of the data that it gets, then it
has to do it globally.
It's far from perfect, I agree.
library module "$NMADEF" in the system called LIB.
Got that. Actually on OVMS 7.3 I don't have SYS$LIB_C.TLB or nmadef.h -
from some of the web comments I found, it sounds like those might exist only
on Alpha. No matter, though - $NMADEF is in MACRO32 is in LIB and it's
simple to extract $NMADEF to a MAR file. A little bit of emacs magic turned
it into a .h.
Extract it and use SDL!
The real problem is that there are no comments in $NMADEF, and my NICE
spec (AA-X437A-TK) only gives numeric values for everything. It's kind of
"take your best guess" as to which named constant actually corresponds to
the item you want.
Avoid the nameless constant values; include NMADEF from the library and use
its constant definitions.
Agreed!
Call NML$INITIALIZE; no parameters.
Call NML$PROCESS_NICE; NML request by descriptor, callback routine
Call NML$TERMINATE; no parameters.
The only serious piece I'm missing at this point is, what do you do if you
want to talk to NML on another node besides your own (e.g. "TELL yoyo SHOW
EXEC CHAR") ? There doesn't seem to be any NICE function that can be
embedded in the data stream to do this, and that wouldn't really make sense
anyway. That'd be like asking the local NML to talk to the remote one on
your behalf, and I don't think that's the way it works.
It seems like there should be some parameter to either NML$INITIALIZE or
NML$PROCESS_NICE that gives the node and access control information, but I
don't find any reference to that.
Thanks again for all the help, Brian.
Read the NML spec. You can do all you want via NICE. You simply need to
get the information about the remote node as known by your node and then,
compose the NICE message with the DECnet address in the NICE message. The
rest of the code all looks the same.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.