Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - t20/nmlt20/nmxint.req
There are 2 other files named nmxint.req in the archive. Click here to see a list.
! UPD ID= 68, SNARK:<6.1.NML>NMXINT.REQ.3,  31-Aug-84 11:21:46 by HALPIN
! Changed the NML$RETURN to pass an Entity Type to %NTMAN, if one was
! specified.  Chnaged needed for SHOW KNOWN NODES.  Now passes an AREA
! Entity Id.
!
! UPD ID= 25, SNARK:<6.1.NML>NMXINT.REQ.2,  24-May-84 16:03:37 by GLINDELL
! NET:<VOBA.NML.DEVELOPMENT>NMXINT.REQ.3 19-Mar-82 08:47:13, Edit by VOBA
!
! Remove the setting of N$QUAF bit from $$NML_INTERFACE_EXPAND macro.
! Let NMX check the QUALIFIER pointer and set the bit appropriately.
!
! NET:<PECKHAM.DEVELOPMENT>NMXINT.REQ.3  6-Mar-82 23:48:12, Edit by PECKHAM
!
! Remove references of NML$VDB from $NML$xxx macros
! Seperate definitions of $$NML_INTERFACE_EXPAND.
!
! NET:<PECKHAM.DEVELOPMENT>NMXINT.REQ.2  6-Mar-82 21:33:49, Edit by PECKHAM
!
! Make all $NML$xxx macros accept qualifiers and remove $NML$xxxQ macros.
!
! NET:<PECKHAM.DEVELOPMENT>NMXINT.REQ.2  5-Mar-82 09:21:41, Edit by PECKHAM
!
! Fix parameter reference in $NML$SET.
!
! NET:<PECKHAM.DEVELOPMENT>NMXINT.REQ.2 19-Feb-82 12:03:57, Edit by PECKHAM
!
! Fix $NML$SET to only call NMX on CIRCUIT/LINE state parameter
!
! NET:<VOBA.NML.DEVELOPMENT>NMXINT.REQ.6 18-Feb-82 16:45:03, Edit by VOBA
!
! Clean up code and update copyright date.
!
! NET:<PECKHAM.DEVELOPMENT>NMXINT.REQ.2 16-Jan-82 10:54:03, Edit by PECKHAM
!
! Add $NML$GET_HOST_ID to get host node name/number for NMLEVT.
!
! 14-Nov-81 22:26:49, Edit by GROSSMAN
!
! Make this module work under Tops-10. Accomplish this by turning many
! "%if $TOPS20" conditionals into "%if ($TOPS20 or $TOPS10)" conditionals
!
! NET:<DECNET20-V3P1.BASELEVEL-2.MCB>NMXINT.REQ.3 20-Aug-81 13:31:39, Edit by GUNN
!
! Change all calls to NML$VDB to not increment
! entity type number in variable TYPE.
!
! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMXINT.REQ.33 27-Jul-81 16:38:09, Edit by GUNN
! 
! Fix $NML$SET to do last edit properly. Wasn't returning value.
!
! NET:<DECNET20-V3P1.NML>NMXINT.REQ.2  1-Jul-81 16:25:14, Edit by GUNN
!
! Fix $NML$SET to pass change of STATE parameter down to lower layers.
!
! NET:<DECNET20-V3P1.NML>NMXINT.REQ.3  6-Mar-81 17:07:47, Edit by GUNN
!
! Fix $NML$RETURNxxx macros to pass selector properly.
!
! <DECNET20-V3P1.BASELEVEL-2.MCB>NMXINT.REQ.2  6-Mar-81 15:47:25, Edit by SROBINSON
!
! Fix Error Code Mapping Functions
!
! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMXINT.REQ.27  5-Mar-81 12:06:37, Edit by GUNN
!
! Map arguments to VDB routines based on system type.
!
! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMXINT.REQ.26  5-Mar-81 10:12:12, Edit by GUNN
!
! Fix misc bugs in $NML$MAP_NODE_ID for MCB.
!	Change GLN$ to GLNW$S
!
! NET:<DECNET20-V3P1.NML>NMXINT.REQ.19 27-Feb-81 15:46:52, Edit by GUNN
!
! Fix $NML$MAP_NODE_ID to expand properly for MCB.
!
! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMXINT.REQ.22 25-Feb-81 10:29:23, Edit by SROBINSON
!
! Fixup QIOW Interface to return buffer length and correct error codes
!
! NET:<DECNET20-V3P1.BASELEVEL-2.MCB>NMXINT.REQ.4 23-Feb-81 10:59:16, Edit by SROBINSON
!
! Fixup QIOW Interface to reflect NMX's mapping functions.
!
! NET:<DECNET20-V3P1.NML>NMXINT.REQ.10 20-Feb-81 08:42:28, Edit by GUNN
!
! Change interface macros to make call to NML volatile
! data base processor.
!
! NET:<DECNET20-V3P1.NML>NMXINT.REQ.4 12-Feb-81 16:54:12, Edit by GUNN
!
! Add definition for $NML$MAP_NODE_ID to map a node address to name
! or a node name to address.
!
! <DECNET20-V3P1.BASELEVEL-2.MCB>NMXINT.REQ.2 10-Feb-81 12:55:35, Edit by SROBINSON
! Fixup LUN assignment and format of QIOW macro for MCB Environments.
! Also define symbols for operations.
!
%title 'NMXINT -- NML Interface to NMX'

!                  COPYRIGHT (c) 1980, 1981, 1982 BY
!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
! ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
! INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
! COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
! OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
! TRANSFERRED.
!
! THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
! AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
! SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
!

!++
! FACILITY:	DECnet-10/20 V3.0 Network Management Layer (NML)
!
! ABSTRACT:
!
!	Contains interface declarations to the NMX
!
! ENVIRONMENT:	TOPS-10/20 User mode under NML
!
! AUTHOR: Dale C. Gunn , CREATION DATE: 25-Nov-80
!
! MODIFIED BY:
!
!	maintainer, date : VERSION nnn
!
! 01	- Description of modification
!--
%sbttl 'MCB specific literals'

%if $MCB %then                          ! MCB specific literals

literal                                 ! Contents of N$FFNC
    N$FSET = 1,                         ! Set Parameter
    N$FCLR = 2,                         ! Clear Parameter
    N$FZRO = 3,                         ! Zero Counters
    N$FSHO = 4,                         ! Show Selected Items
    N$FSZC = 5,                         ! Show and Zero Counters
    N$FRET = 6;                         ! Return Selected Items

literal                                 ! Contents of N$IENT
    N$INOD = 1,                         ! Node Entity
    N$ILIN = 2,                         ! Line Entity
    N$ILOG = 3,                         ! Logging Entity
    N$ICKT = 4,                         ! Circuit Entity
    N$IMOD = 5;                         ! Module Entity

literal                                 ! Contents of N$SELE
    N$SSUM = 1,                         ! Select Summary
    N$SSTA = 2,                         ! Select Status
    N$SCHA = 3,                         ! Select Characteristics
    N$SCOU = 4;                         ! Select Counters

literal
    N$QUAF = 1;                         ! Value of N$QUAL if qualified request

%fi
%sbttl '$$NML_INTERFACE_EXPAND'
%if $TOPS20
%then
macro
     $$NML_INTERFACE_EXPAND (FUNCTION, TYPE, ENTITY, QUALIFIER, SELECTOR,
                             LENGTH, BUFFER, TEXT) = 

         begin
         builtin JSYS;
         literal ARGBLK_SIZE = $NTARG;
         global register AC1 = 1;
         local ARGBLK: vector[ARGBLK_SIZE];

         ARGBLK[$NTCNT] = ARGBLK_SIZE;  ! Size of argument block
         ARGBLK[$NTENT] = TYPE;         ! Entity type
         ARGBLK[$NTEID] = ENTITY;       ! Entity ID pointer
         ARGBLK[$NTFNC] = FUNCTION;     ! Function code
         ARGBLK[$NTERR] = NICE$_MPE;    ! Indicate our error if JSYS fails

         %if %null(SELECTOR)
         %then ARGBLK[$NTSEL] = 0;
         %else ARGBLK[$NTSEL] = SELECTOR;
         %fi

         %if %null(QUALIFIER)
         %then ARGBLK[$NTQUA] = 0;
         %else ARGBLK[$NTQUA] = QUALIFIER;
         %fi

         %if %null(BUFFER)
         %then ARGBLK[$NTBPT] = 0;
         %else ARGBLK[$NTBPT] = BUFFER;
         %fi

         %if %null(LENGTH)
         %then ARGBLK[$NTBYT] = 0;
         %else ARGBLK[$NTBYT] = .LENGTH;
         %fi

         AC1 = ARGBLK;            ! Point to argument block
         if JSYS (-1, NTMAN_, AC1)
         then begin
              %if not %null(LENGTH)
              %then LENGTH = .ARGBLK[$NTBYT]; ! Return length
              %fi
              .ARGBLK[$NTERR]      ! return success code
              end
         else begin
              global register
                     AC2 = 2,
                     AC3 = 3;

              %if not %null(TEXT)
              %then
              AC2 = $FHSLF^18 or .AC1;
              AC1 = TEXT;
              AC3 = 0;
              JSYS (2, ERSTR_, AC1, AC2, AC3);
              %fi

              .ARGBLK[$NTERR]      ! return failure code
              end
         end %;
%fi

%if $TOPS10
%then
macro
     $$NML_INTERFACE_EXPAND (FUNCTION, TYPE, ENTITY, QUALIFIER, SELECTOR,
                             LENGTH, BUFFER, TEXT) = 

         begin
         builtin UUO;
         literal $NTARG = $NTERR + 1;
         literal ARGBLK_SIZE = $NTARG;
         register AC1 = 1;
         local ARGBLK: vector[ARGBLK_SIZE];

         ARGBLK[$NTCNT] = ARGBLK_SIZE;  ! Size of argument block
         ARGBLK[$NTENT] = TYPE;         ! Entity type
         ARGBLK[$NTEID] = ENTITY;       ! Entity ID pointer
         ARGBLK[$NTFNC] = FUNCTION;     ! Function code
         ARGBLK[$NTERR] = NICE$_MPE;    ! Indicate our error if JSYS fails

         %if %null(SELECTOR)
         %then ARGBLK[$NTSEL] = 0;
         %else ARGBLK[$NTSEL] = SELECTOR;
         %fi

         %if %null(QUALIFIER)
         %then ARGBLK[$NTQUA] = 0;
         %else ARGBLK[$NTQUA] = QUALIFIER;
         %fi

         %if %null(BUFFER)
         %then ARGBLK[$NTBPT] = 0;
         %else ARGBLK[$NTBPT] = BUFFER;
         %fi

         %if %null(LENGTH)
         %then ARGBLK[$NTBYT] = 0;
         %else ARGBLK[$NTBYT] = .LENGTH;
         %fi

         AC1 = ARGBLK;            ! Point to argument block

         if UUO (1, NTMAN$(AC1))
         then begin
              %if not %null(LENGTH)
              %then LENGTH = .ARGBLK[$NTBYT]; ! Return length
              %fi
              .ARGBLK[$NTERR]           ! return success code
              end
         else begin
              %if not %null(TEXT)
              %then
              NMU$TEXT(TEXT,
                       40,
                       '?NTMAN. UUO failed - error # %P%/',
                       .AC1);
              %fi
              .ARGBLK[$NTERR]           ! return failure code
              end
         end %;
%fi

%if $MCB
%then
macro
     $$NML_INTERFACE_EXPAND (FUNCTION, TYPE, ENTITY, QUALIFIER, SELECTOR,
                             LENGTH, BUFFER, TEXT) = 

         begin
         external literal               ! LUN literals
             LUN$NM,                    !  for NM: Device Operations
             EFN$NM;                    !  event flag for NM: Device Operations

         %if not %declared (IOSB)
         %then stacklocal IOSB: vector [2]; ! I/O Status block
         %fi

!              Format of QIO$ Macro
!
!              qiow$s (IO$CTL,
!                      LUN,
!                      EFN,
!                      PR,
!                      IOSB,
!                      AST,
!                      <BUFFER,
!                       LENGTH,
!                       FUNCTION & TYPE & SELECTOR [& N$QUAF],
!                       ENTITY,
!                       QUALIFIER>)

         qiow$s (IO$CTL,
                 LUN$NM,
                 EFN$NM,
                 %(PR)%,
                 IOSB,
                 %(AST)%,
                 <%if not %null (LENGTH)
                  %then %if not %null (BUFFER)
                        %then (if .LENGTH eql 0
                               then 0
                               else BUFFER)
                        %fi
                  %fi,

                 %if not %null (BUFFER)
                 %then %if not %null (LENGTH)
                       %then .LENGTH
                       %fi
                 %fi,

                 (%if not %null (SELECTOR)
                  %then ((if (SELECTOR) LSS 0
                          then (-(SELECTOR))
                          else ((SELECTOR)+1)) ^ 12) or
                  %fi
                  (TYPE+1) ^ 8 or
                  FUNCTION ^ 1),
!                  %if not %null (QUALIFIER)
!                  %then or N$QUAF %fi),

                 ENTITY,

                 %if not %null (QUALIFIER)
                 %then QUALIFIER %fi>);

         %if not %null (LENGTH)
         %then LENGTH = .IOSB[1];
         %fi

         if .IOSB<0,8,1> geq 0
         then 1
         else .IOSB<0,8,1>
         end %;
%fi
%sbttl 'NML Interface Function Macro Definitions'

macro
     $NML$SET (TYPE, ENTITY, QUALIFIER, ILENGTH, IBUFFER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTSET)  %bliss16(N$FSET),
                                      (TYPE + 0),
                                      (ENTITY + 0),
                                      (QUALIFIER + 0),
                                      %(SELECTOR)%,
                                      ILENGTH,
                                      IBUFFER) %;


macro
     $NML$CLR (TYPE, ENTITY, QUALIFIER, ILENGTH, IBUFFER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTCLR)  %bliss16(N$FCLR),
                                 (TYPE + 0),
                                 (ENTITY + 0),
                                 (QUALIFIER + 0),
                                 %(SELECTOR)%,
                                 ILENGTH,
                                 IBUFFER) %;


macro
     $NML$ZERO (TYPE, ENTITY, QUALIFIER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTZRO)  %bliss16(N$FZRO),
                                 (TYPE + 0),
                                 (ENTITY + 0),
                                 (QUALIFIER + 0),
                                 %(SELECTOR)%,
                                 %(LENGTH)%,
                                 %(BUFFER)%) %;


macro
     $NML$SHOW (TYPE, ENTITY, QUALIFIER, SELECTOR, OLENGTH, OBUFFER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTSHO)  %bliss16(N$FSHO),
                                 (TYPE + 0),
                                 (ENTITY + 0),
                                 (QUALIFIER + 0),
                                 (SELECTOR + 0),
                                 OLENGTH,
                                 OBUFFER) %;


macro
     $NML$SHOZC (TYPE, ENTITY, QUALIFIER, OLENGTH, OBUFFER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTSZC)  %bliss16(N$FSZC),
                                 (TYPE + 0),
                                 (ENTITY + 0),
                                 (QUALIFIER + 0),
                                 %(SELECTOR)%,
                                 OLENGTH,
                                 OBUFFER) %;


macro
     $NML$RETURN (TYPE,ENTITY,SELECTOR,QUALIFIER,OLENGTH,OBUFFER) =
         $$NML_INTERFACE_EXPAND (%bliss36($NTRET)  %bliss16(N$FRET),
                                 (TYPE + 0),
                                 (ENTITY + 0),
                                 (QUALIFIER + 0),
                                 (SELECTOR + 0),
                                 OLENGTH,
                                 OBUFFER) %;


macro
     $NML$GETPDB (TYPE, ENTITY, QUALIFIER, SELECTOR, OLENGTH, OBUFFER, ERRDET) =
         NML$PDB_READ (%if %null (QUALIFIER) %then 0 %else 1 %fi,
                       (TYPE + 0),
                       (ENTITY + 0),
                       (QUALIFIER + 0),
                       (SELECTOR + 0),
                       OLENGTH,
                       OBUFFER,
                       ERRDET) %;


macro
     $NML$PUTPDB (TYPE, ENTITY, QUALIFIER, ILENGTH, IBUFFER, ERRDET) =
         NML$PDB_CHANGE (%if %null (QUALIFIER) %then 0 %else 1 %fi,
                         (TYPE + 0),
                         (ENTITY + 0),
                         (QUALIFIER + 0),
                         ILENGTH,
                         IBUFFER,
                         ERRDET) %;


macro
     $NML$DELPDB (TYPE, ENTITY, QUALIFIER, ILENGTH, IBUFFER, ERRDET) =
         NML$PDB_CHANGE (%if %null (QUALIFIER) %then 2 %else 3 %fi,
                         (TYPE + 0),
                         (ENTITY + 0),
                         (QUALIFIER + 0),
                         ILENGTH,
                         IBUFFER,
                         ERRDET) %;


macro
     $NML$RETURNPDB (TYPE, SELECTOR, QUALIFIER, OLENGTH, OBUFFER, ERRDET) =
         NML$PDB_READ (%if %null (QUALIFIER) %then 2 %else 3 %fi,
                       (TYPE + 0),
                       (SELECTOR + 0),
                       (QUALIFIER + 0),
                       OLENGTH,
                       OBUFFER,
                       ERRDET) %;
%sbttl 'Node Mapping Function Interface Macros'

! $NML$MAP_NODE_ID (LENGTH,BUFFER) - Map a node address to node name
!                                    or vice versa.


macro
     $NML$MAP_NODE_ID (LENGTH, BUFFER) =
         %if $TOPS20 or $TOPS10
         %then $$NML_INTERFACE_EXPAND (%bliss36($NTMAP),
                                       NODE_E, ! Can only map node entity
                                       0, ! No ENTITY pointer for this function
                                       %(QUALIFIER)%,
                                       %(SELECTOR)%,
                                       LENGTH,
                                       BUFFER)
         %else %if $MCB
               %then begin
                     %if not %declared (IOSB)
                     %then own IOSB: vector [2]; %fi ! I/O Status block
                     external literal   ! Have to get this elsewhere.
                              LUN$NS,
                              EFN$NS;

! Format of GLNW$S Macro
!
! GLNW$S (LUN, EFN, IOSB, AST, <BUFFER, LENGTH, FLG>)

                     glnw$s (LUN$NS,
                             EFN$NS,
                             IOSB,
                             %(AST)%,
                             <BUFFER, .LENGTH, 2>);

! Map error codes to Network Managment Code

                     (if .IOSB<0,8,1> geq 0
                      then 1
                      else -8)
                     end
               %fi
         %fi
     %;                                 ! End $NML$MAP_NODE_ID


! $NML$GET_HOST_ID (LENGTH,BUFFER) - Get the host node number/name


macro
     $NML$GET_HOST_ID (LENGTH, BUFFER) =
         %if $TOPS20 or $TOPS10
         %then begin                    ! Get local instead
               local $NML$TEMP_PTR;
               %if not %declared (NMU$NETWORK_LOCAL)
               %then external NMU$NETWORK_LOCAL; %fi

               $NML$TEMP_PTR = NMU$NETWORK_LOCAL ();
               ch$move (min (2 + 1 + ch$rchar (ch$plus (.$NML$TEMP_PTR, 2)),
                             .(LENGTH)),
                        .$NML$TEMP_PTR,
                        (BUFFER));
               1
               end
         %else %if $MCB
               %then begin
                     %if not %declared (IOSB)
                     %then own IOSB: vector[2]; %fi ! I/O Status block
                     external literal   ! Have to get this elsewhere.
                              LUN$NS,
                              EFN$NS;

! Format of GLNW$S Macro
!
! GLNW$S (LUN, EFN, IOSB, AST, <BUFFER, LENGTH, FLG>)

                     glnw$s (LUN$NS,
                             EFN$NS,
                             IOSB,
                             %(AST)%,
                             <BUFFER, .LENGTH, 3>);

! Map error codes to Network Managment Code

                     (if .IOSB<0,8,1> geq 0
                      then 1
                      else -8)
                     end
               %fi
         %fi
     %;                                 ! End $NML$GET_HOST_ID
	%sbttl	'Event reading interface'

    macro
	$NML$GET_LOCAL_EVENT (LENGTH, BUFFER) =
            $$NML_INTERFACE_EXPAND ($NTEVQ,	! Read event queue
				    0,		! No entity type
				    0,		! No entity ID needed
				    0,		! No qualifier needed
				    0,		! No selector needed
				    LENGTH,
				    BUFFER)
    %;					! End of $NML$GET_LOCAL_EVENT

%title ''
%sbttl ''

!
! [End of NMXINT.REQ]
! Local Modes:
! Mode:BLISS
! Auto Save Mode:2
! Comment Column:40
! Comment Rounding:+1
! End: