From: MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 20-OCT-1992 02:55:55.01 To: info-vax@kl.sri.com CC: Subj: Re: NML and NICE In article <1992Oct10.182913.26106@mercury.cair.du.edu>, toupine@casi.cba.du.edu (Ed Toupin) writes: > I am looking for individuals who have experience with the NICE protocol. Yup, I've written lots of programs that communicate with NML via NICE, but it is about 5 years ago now. > I have a small application that is to collect statistical network information from > several nodes. I have reviewed the NICE manual from DEC and found it to be > quite useful in explaining how to extract information using NICE. I used the manual "AA-X437A-TK" and it was a pretty nice ;-) manual. > My question is how to connect to the NML or do I communicate via NET0:? I > attempted to connect to NML and received a slew of errors. > > Which device do I connect to? It is a normal non-transparent DECnet connect that is to be performed. * You connect (via $ASSIGN) to "_NET:" (not NET0:) * Build an NCB which contains the name of the node you want to use executor and that specifies NML as the object to connect to. (::"19=") * Send this NCB to _NET: via a $QIO that specifies IO$_ACCESS as function. (What you send is really a struct which contains the length of the NCB as a longword and the address of the NCB) Now the link is ready and you can communicate with the remote NML via NICE. This is pretty simple -just send a buffer that specifies the function you want to perform via $QIO specifying IO$_WRITEVBLK and read the with $QIO specifying IO$_READVBLK. See the Networking Manual (System Management Volume 5A) for more info. Note that the format of the message returned from NICE is not static. NICE returns a little header and then the information you requested as a byte stream; +--+ <---+ | | | +--+ => 2 bytes, indicating type of info | | | +--+ <---+ | | => 1 byte, depicting length of info. +--+ <---+ | | | +--+ | | | | +--+ | | | => n bytes of info +--+ | | | | . . . . . . . . . +--+ <---+ | | | +--+ => 2 bytes indicating next type of info | | | +--+ <---+ | | => 1 byte indicating lenght of next info. +--+ <---+ | | | . . . . . . . . . The data is not normally fixed length and the items included in a message depends on what as was requested and what the remote NML found. When you have written a set of routines to deal with this, you will find that NICE works pretty well. There is a lot of interesting functions that can be performed by a program using NICE. -- +-------------------------------------+-----------------------------------+ | Magnus Ewert | Phone.: +46 031 833195 | | R K S | Fax...: +46 031 359527 | | Gothenburg Sweden | | +-------------------------------------+-----------------------------------+ | TITANIC was an open system - at least after the event... | +-------------------------------------+-----------------------------------+ | Nothing is for sure in this world - except for the death and the taxes | | /Benjamin Franklin | +-------------------------------------------------------------------------+