"Bob Armstrong" <bob at jfcl.com> writes:
I want to write a little C program that talks to NML without, say,
spawning NCP to execute commands. I found a specification for Phase IV
NICE, which is doable but a bit complicated. Does anyone know if there's an
NML/NICE interface library of some kind?
================
File NML.MAR is:
================
;++
; Copyright 1992, by Brian Schenkenberger and TMESIS. ALL RIGHTS RESERVED.
;
; This software is provided "AS IS" and is supplied for informational purpose
; only. No warranty is expressed or implied and no liability can be accepted
; for any actions or circumstances incurred from the use of this software or
; from the information contained herein. The author makes no claim as to the
; suitablility or fitness of the software or information contain herein for a
; particular purpose.
;
; Permission is hereby granted *ONLY* for the "not-for-profit" redistribution
; of this software provided that ALL SOURCE and/or OBJECT CODE remains intact
; and ALL COPYRIGHT NOTICES remain intact from its original distribution.
;
;(!) NO TITLE TO AND/OR OWNERSHIP OF THIS SOFTWARE IS HEREBY TRANSFERRED. (!)
;--
; This program uses the DECnet Network Information Command Exchange Protocol
; or NICE protocol (which it is anything but nice if you should have a chance
; to read the functional spec.)
;
; This is a quick and dirty ditty to print out the nodes which your node can
; see as active or reachable nodes.
;
; NICE is comprised of a set of functions (LOOP, LOAD, READ, etc.) to which
; a structure of option functions is attached. A callable interface, the
; NML$xxx calls, facilitate the use of the NICE codes. FYI, you can also
; open a channel to another nodes NML object and request information from it
; using NICE protocols.
;
; I built this example with the NML$xxx calls because it facilitates the
; disassembly of the information returned by the requested NICE command.
;
; I'm a MacroMan so naturally, this example is in Macro. If you're one of
; the followers of fanciful programming fad, you can probaby translate this
; into (eek) 'C' or any other HOL.
;--
; To build:
; $ MACRO NML
; $ LINK NML,SYS$INPUT/OPT
; SYS$SHARE:NMLSHR.EXE/SHARE
; ^Z
;--
.TITLE NML
.LIBRARY "SYS$LIBRARY:STARLET.MLB" ; look here for...
$DSCDEF ; defines, symbolocally, OpenVMS descriptor codes
$LIB$ROUTINESDEF; defines macros for the OpenVMS LIB$ RTL routines
.LIBRARY "SYS$LIBRARY:LIB.MLB" ; look here for...
$NMADEF ; defines, symbolically, NICE/NML function codes
.PSECT $$DATA,WRT,NOEXE,5
;++
; Read function options (RTFM. Sec 6.8 of DNA NML Network Mgt Spec #AA-X437A-TK)
;--
OPTION = <NMA$C_ENT_NOD at NMA$V_OPT_ENT>!- ; Entity type = node
<NMA$C_OPINF_SUM at NMA$V_OPT_INF>!- ; inform type = summary
<0 at NMA$V_OPT_PER> ; Read volatile database
; <1 at NMA$V_OPT_PER> ; Read permanent database
REQST: .ASCID <NMA$C_FNC_REA><OPTION><NMA$C_ENT_KNO>
.ALIGN QUAD
NODE: .ADDRESS DESC
DESC: .QUAD 0
OUTPUT: .LONG <DSC$K_CLASS_D@<DSC$B_CLASS at 3>>!-
<DSC$K_DTYPE_T@<DSC$B_DTYPE at 3>>,0
FORMAT: .ASCID /Node: !6AS DECnet address: !UL.!UL/
.PSECT $$CODE,NOWRT,EXE
.ENTRY START_NML,0
CALLS #0,G^NML$INITIALIZE ; init the NML interface
PUSHAB CALLBACK_ROUTINE ; addr of rtn to output data
PUSHAB REQST ; desc of NICE request
CALLS #2,G^NML$PROCESS_NICE ; call interface, process request
CALLS #0,G^NML$TERMINATE
$EXIT_S
RET
;++
; The callback routine is called by the NML$PROCESS_NICE function with
; the address of a descriptor and will called repeatedly until all the
; information requested is exhausted. First byte of the data described
; by the descriptor is a status byte. The rest is data, passed in a
; format with is unique to each NICE functional operation and is detailed
; in the functional spec.
;--
$OFFDEF CALLBACK_ROUTINE,DESCRIPTOR
.ENTRY CALLBACK_ROUTINE,0
MOVQ @CALLBACK_ROUTINE$_DESCRIPTOR(AP),R0
CMPB (R1),#NMA$_SUCCESS
BEQL 10$
RET
;++
; Here, as per the NML spec, the information is process... The beginning of
; the response string is formatted as such:
;
;
; |<-- ascic node name
; | |<-- node number
; | | |<-- status
; +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
; | | | | F| E| D| C| B| A| #| | | | | | |
; +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
;--
10$: TSTL (R1)+ ; move pointer forward 4 bytes
MOVZWL (R1)+,R0 ; get the node number
EXTZV #0,#7,(R1)+,DESC ; get the node name length
MOVAB (R1),DESC+4 ; get the node name address
EXTZV #NMA$V_ADDR,#NMA$S_ADDR,R0,R1 ; get the node number
EXTZV #NMA$V_AREA,#NMA$S_AREA,R0,R0 ; get the area number
$LIB_SYS_FAO_S character_string = FORMAT,-
resultant_string = OUTPUT,-
directive_argument1 = NODE,-
directive_argument2 = R0,-
directive_argument3 = R1
$LIB_PUT_OUTPUT_S message_string = OUTPUT
RET
.END START_NML
================
File NML.OPT is:
================
SYS$SHARE:NMLSHR.EXE/SHAREABLE
$ MACRO NML.MAR
$ LINK NML.MAR,NML.OPT/OPTION
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
I want to write a little C program that talks to NML without, say, spawning NCP to execute commands. I found a specification for Phase IV NICE, which is doable but a bit complicated. Does anyone know if there s an NML/NICE interface library of some kind?
Thanks,
Bob
On May 28, 2014, at 2:54 PM, Cory Smelosky <b4 at gewt.net> wrote:
On Wed, 28 May 2014, Paul_Koning at Dell.com wrote:
On RSTS, to access a disk without using the RSTS file system ( non file structured mode ) you don t mount it, you just refer to the device name. For example, in BASIC you d use the device name in an OPEN statement, without a file name part: open db0: as file 1%
$ copy moira::xxdp25.dsk du2:
Node: MOIRA
User: csmelosky
Password:
System Password:
Event type 33.0, Remote file access
Occurred 14-May-27 14:52:59.2 on node 9.4 (MANDY)
Access: Remote
Function: OPEN/Read
Remote node = 9.1 (MOIRA)
Remote process = 17 0 0
Local process = 0 1 2 NFT002
User = csmelosky
File accessed = 0 MOIRA$DKA100:[CSMELOSKY]XXDP25.DSK;1
?NFT -- Device name syntax error
I take it copy takes different syntax? ;)
No the problem is that you can t do non-file operations there. In RSTS, only some applications allow non-file operations; basically, they have to know how to issue open requests with no file name part supplied. A lot of applications supply default file name pieces if you don t supply your own; NFT/FAL (network copy) is one such, for that matter so is regular file copy.
You d have to copy the input file to a file on the target system, then do the non-file structured copy as a separate step. And the easiest way to do that second step is probably with a half dozen lines of BASIC code I can t think of an off the shelf program that will do the job.
paul
On Wed, 28 May 2014, Paul_Koning at Dell.com wrote:
On RSTS, to access a disk without using the RSTS file system ( non file structured mode ) you don t mount it, you just refer to the device name. For example, in BASIC you d use the device name in an OPEN statement, without a file name part: open db0: as file 1%
$ copy moira::xxdp25.dsk du2:
Node: MOIRA
User: csmelosky
Password:
System Password:
Event type 33.0, Remote file access
Occurred 14-May-27 14:52:59.2 on node 9.4 (MANDY)
Access: Remote
Function: OPEN/Read
Remote node = 9.1 (MOIRA)
Remote process = 17 0 0
Local process = 0 1 2 NFT002
User = csmelosky
File accessed = 0 MOIRA$DKA100:[CSMELOSKY]XXDP25.DSK;1
?NFT -- Device name syntax error
I take it copy takes different syntax? ;)
You need privs for this logged in as 1,x under V8 or older, WRTNFS privs on V9 or later (which typically are set on 1,x accounts).
paul
--
Cory Smelosky
http://gewt.net Personal stuff
http://gimme-sympathy.org Projects
--
DECtec mailing list
http://dectec.info
To unsubscribe from this list see page at: http://dectec.info/mailman/listinfo/dectec_dectec.info
On May 28, 2014, at 2:19 PM, Cory Smelosky <b4 at gewt.net> wrote:
On Wed, 28 May 2014, Johnny Billquist wrote:
I would guess on a bad XXDP image, since XXDP requires almost nothing working. If RSRS/E and RSX works then I can't imagine XXDP not working.
As soon as I figure out how the hell to write a disk image from RSTS/E I'll try a new image. ;)
Can't MOUNT FOREIGN so I need to read more manuals it appears.
On RSTS, to access a disk without using the RSTS file system ( non file structured mode ) you don t mount it, you just refer to the device name. For example, in BASIC you d use the device name in an OPEN statement, without a file name part: open db0: as file 1%
You need privs for this logged in as 1,x under V8 or older, WRTNFS privs on V9 or later (which typically are set on 1,x accounts).
paul
On Wed, 28 May 2014, Johnny Billquist wrote:
I would guess on a bad XXDP image, since XXDP requires almost nothing working. If RSRS/E and RSX works then I can't imagine XXDP not working.
As soon as I figure out how the hell to write a disk image from RSTS/E I'll try a new image. ;)
Can't MOUNT FOREIGN so I need to read more manuals it appears.
Johnny
--
Cory Smelosky
http://gewt.net Personal stuff
http://gimme-sympathy.org Projects
--
DECtec mailing list
http://dectec.info
To unsubscribe from this list see page at: http://dectec.info/mailman/listinfo/dectec_dectec.info
Sorry about that, I did not pay attention, it had rebooted a image that does
everything except forward DECnet packets, so what I was using it for worked fine...
It's back up again. All configs still in place.
--P
With help and a pointer from Peter, we ve set up the DECnet over Multinet link between LEGATO and STUPI to use TCP instead of UDP. It seems to work fine whether it s better than the UDP version only time will tell.
It turns out that none of this is magic it s all pretty well documented by Process Software. Just type HELP MULTINET SET /DECNET and you ll see the /TCP qualifier.
There s also a /FILTER_OUT_OF_ORDER qualifier which forces the driver to drop out of order UDP packets. Of course, that doesn t apply to TCP, but it does remove that objection to the UDP implementation.
Bob
On May 28, 2014, at 9:40 AM, Johnny Billquist <bqt at softjar.se> wrote:
On 2014-05-28 15:33, Paul_Koning at Dell.com wrote:
...
DDCMP is a data link layer that deals with packet loss. It also deals with reordering, within reason, by treating it as packet loss, just as NSP did until Phase V. It should be ok with limited duplication as well though duplication is not one of the supposed characteristics of UDP.
Duplication is definitely a possible event with UDP. It happens from time to time. It's essentially because duplication is possible with IP. UDP is just IP with ports and a checksum (if you are lucky). And IP makes no promises at all. Packets might not arrive, might arrive out of order, become duplicated, delayed, or even corrupted.
Note that I meant the DDCMP protocol, not the DDCMP point to point service. In other words, the UDP packets would carry DDCMP frames, with DDCMP header (including sequence number and all that). I think SIMH has that right now, in V4.0 DMC emulation.
Ok. So if I understand correctly, DDCMP is guaranteeing the delivery of data between the two points. Data will arrive in order and without any loss or other confusion, as seen by the layers above DDCMP?
Yes, just as with TCP. The usual disclaimers apply. For example, dups or reorders are detected only up to the wrap point of the sequence number space. Corruption is caught only up to the capabilities of the CRC being used.
Also, guaranteed delivery is a commonly used term. A more accurate term would be guaranteed delivery or notification of failure . Connection oriented services like DDCMP and TCP and TP4 and NSP will deliver the data stream intact to the other end, OR they will tell you that they could not do so.
Seems like UDP could work then, but maybe TCP would be better?
Not clear. If things get reordered or delayed to the point that the DDCMP sequence number space is no longer sufficient, then TCP would help. It makes things somewhat more complicated (as Rob Jarratt pointed out) because TCP introduces the asymmetry of who connects while DDCMP does not have than and neither does UDP.
paul
On 2014-05-28 15:33, Paul_Koning at Dell.com wrote:
On May 27, 2014, at 8:53 PM, Johnny Billquist <bqt at softjar.se> wrote:
On 2014-05-27 22:09, Paul_Koning at Dell.com wrote:
On May 27, 2014, at 4:04 PM, Johnny Billquist <bqt at softjar.se> wrote:
On 2014-05-27 21:48, Bob Armstrong wrote:
The way to run DECnet over a flaky long distance network is to use point
to point mode with a data link layer that deals with packet loss.
Probably a good idea, but we don't have that option on HECnet.
Well, HECnet is not a static piece of equipment. Anything is possible...
My bridge emulates a simple ethernet segment. Good enough many times, but if we have a link like yours, that sometimes seems to drop packets, then maybe some other alternative should be considered.
Now, the question then becomes, what can we do in this case.
As far as I understand, links using Multinet are more broken, and still use UDP. The same would appear to possibly be the case for Cisco as well?
Do anyone run any links using TCP?
That would work. DDCMP over UDP would work.
Really? UDP can cause packets to arrive in the wrong order, duplicated, or sometimes dropped. I was certain you wrote above "a data link layer that deals with packet loss". Or was that not meant to be read as that the underlaying transport should deal with it?
DDCMP is a data link layer that deals with packet loss. It also deals with reordering, within reason, by treating it as packet loss, just as NSP did until Phase V. It should be ok with limited duplication as well though duplication is not one of the supposed characteristics of UDP.
Duplication is definitely a possible event with UDP. It happens from time to time. It's essentially because duplication is possible with IP. UDP is just IP with ports and a checksum (if you are lucky). And IP makes no promises at all. Packets might not arrive, might arrive out of order, become duplicated, delayed, or even corrupted.
Note that I meant the DDCMP protocol, not the DDCMP point to point service. In other words, the UDP packets would carry DDCMP frames, with DDCMP header (including sequence number and all that). I think SIMH has that right now, in V4.0 DMC emulation.
Ok. So if I understand correctly, DDCMP is guaranteeing the delivery of data between the two points. Data will arrive in order and without any loss or other confusion, as seen by the layers above DDCMP?
Seems like UDP could work then, but maybe TCP would be better?
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol