Trailing-Edge
-
PDP-10 Archives
-
TOPS-20_V6.1_DECnetSrc_7-23-85
-
mcb/xpt/tliitf.bli
There is 1 other file named tliitf.bli in the archive. Click here to see a list.
! COPYRIGHT (c) 1980, 1981, 1982
! DIGITAL EQUIPMENT CORPORATION
! Maynard, Massachusetts
!
! 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.
module TLIITF (
IDENT = 'X01150'
) =
begin
!
! COPYRIGHT (c) 1979 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.
!
! FACILITY: Transport
!
! ABSTRACT:
!
! Transport Line Interface interface module: dispatches
! all CCBs passed to the Transport Line Interface Layer.
!
! ENVIRONMENT: MCB
!
! AUTHOR: L. Webber , CREATION DATE: 17-Dec-79
!
! MODIFIED BY:
!
! 17-Dec-79 : VERSION 1.00
!
! 1.01 L. Webber, 16-Apr-80
! Add $XPTDB, the address of the Transport data base
! Make all line control functions take a LIX and translate to a line
! index (1-NLN). If the LIX is a new one (only possible for SET
! STATE LINE), assign a free line index to it.
! Make all line numbers within XPT and TLI be line indices (1-NLN),
! which should be translated to LIXes if the Data Link Layer is
! to be called.
!
! 1.02 L. Webber, 23-June-80
! Modify to use MCBLIB macros
!
! 1.03 A. Peckham, 15-Oct-80
! Update to use dispatch TABLE$ macro.
! Use symbolic function modifiers.
!
! 1.04 A. Peckham, 21-Oct-80
! Change CE_ERR returns to SIGNAL_STOP.
!
! 1.05 A. Peckham, 24-Oct-80
! Change some CE_ERRs back from SIGNAL_STOPs.
!
! 1.06 L. Webber, 3-Dec-80
! Switch first two parameters to DISPATCH$ to match
! macro definition
!
! 1.07 L. Webber, 11-Dec-80
! Modify to support MCB 3.1
!
! 1.08 L. Webber, 12-Jan-81
! Take out Network Management code, and modify to call
! TLINMI.
!
! 1.09 L. Webber, 20-Jan-81
! Take out $XPTDB and $NLN to make TLI read-only.
!
! 1.10 L. Webber, 24-Feb-81
! Take TLITIM out of the dispatch table.
! Delete MAXVAL; it's not used anymore.
!
! 1.11 L. Webber, 27-Feb-81
! Put "timer routine" TLINOP back in dispatch table.
!
! 1.12 L. Webber, 19-May-81
! Add interface to ownership functions; change other DLL interfaces to
! new standard.
!
! 1.13 L. Webber, 2-Jun-81
! Fix routines not to put LINEindex into C_LIN when sending CCBs to
! the DLL.
!
! 1.14 A. peckham, 14-Apr-82
! Optimize linkages through CTLTAB.
!
! 1.15 A. peckham, 8-Jul-82
! Recognize Phase II node verification messages.
!
!--
!
! MACROS
!
require 'XPTMAC';
!
! TABLE OF CONTENTS
!
forward routine
XMEGO: MCB_DB_CCB_MOD novalue,
RCEGO: MCB_DB_CCB_MOD novalue,
CTLGO: MCB_DB_CCB_MOD novalue,
XCPGO: MCB_DB_CCB_MOD novalue,
RCPGO: MCB_DB_CCB_MOD novalue,
CCPGO: MCB_DB_CCB_MOD novalue,
TIMGO: MCB_DB_MOD novalue,
TLI_XMT: MCB_DB_CCB novalue,
TLI_RTN: MCB_DB_CCB novalue,
DLL_RTN: MCB_DB_CCB novalue,
REINIT: MCB_DB_CCB novalue,
TERMINATE: MCB_DB_CCB novalue;
!
! EQUATED SYMBOLS:
!
!
! OWN STORAGE:
!
! $TLILL (see below)
!
!
! EXTERNAL REFERENCES:
!
external
MCB$GW_PROCESS_HANDLE;
external routine
CCPSTR: MCB_DB_CCB novalue,
CCPSTP: MCB_DB_CCB novalue,
GIVE_CIRCUIT: MCB_DB_CCB novalue,
LD_CMP: MCB_DB_CCB novalue,
LU_CMP: MCB_DB_CCB novalue,
RCV_HLO: LINKAGE_DB_CCB novalue,
RCV_NI: LINKAGE_DB_CCB novalue,
RCV_NV: LINKAGE_DB_CCB novalue,
RCV_TI: LINKAGE_DB_CCB novalue,
RCV_TV: LINKAGE_DB_CCB novalue,
TAKE_CIRCUIT: MCB_DB_CCB novalue,
TLI_NM: MCB_DB_CCB novalue,
TLIAST: MCB_DB_CCB_MOD novalue,
XCPDAT: MCB_DB_CCB novalue,
XCPINI: MCB_DB_CCB novalue,
XCPSTP: MCB_DB_CCB novalue;
!++
!
! Dispatch tables
!
!--
!+
! TRANSPORT LINE INTERFACE DISPATCH VECTOR
!
! NAME: $TLILL
!
! This vector is the main MCB transport vector which dispatches
! received CCBs to the interface routine TLIITF.
!
!-
external routine $DSPCR : novalue;
global
bind
$TLILL = TABLE$ ($DSPCR, FC_CCP,
(FC_AST, TLIAST), ! Asynchronous Event
(FC_XME, XMEGO), ! Transmit Enable
(FC_RCE, RCEGO), ! Receive Enable
(FC_CTL, CTLGO), ! Control
(FC_TIM, TIMGO), ! Timer (process initialization)
(FC_XCP, XCPGO), ! Transmit Complete
(FC_RCP, RCPGO), ! Receive Complete
(FC_CCP, CCPGO)); ! Control Complete
!++
!
! PROCESS HEADER
!
! NAME OF PROCESS: TLI
!
!--
$MCB_PROCESS(name=TLI,llc_dispatch=$TLILL)
routine XMEGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Dispatches "transmit enable" CCBs
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! CCB CCB to be passed to dispatched routine
! MODIFIER Subfunction code; used to select routine
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
DISPATCH$(.MODIFIER,
TABLE$ ($DSPCR, FD_XME,
(TM_DAT, TLI_XMT)),
(.XPTDB,.CCB),
MCB_DB_CCB);
end; !End of XMEGO
routine RCEGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch "receive enable" CCBs
!
! FORMAL PARAMETERS
!
! CCB CCB to pass to dispatched routine.
! MODIFIER Subfunction code; used to select routine.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
map CCB:ref block field (C_XPT_FIELDS);
require 'XPTSYM';
DISPATCH$(.MODIFIER,
TABLE$ ($DSPCR, FD_RCE,
(TM_INI, LU_CMP),
(TM_DAT, TLI_RTN),
(TM_TRM, LD_CMP)),
($TLI_GET_LINE_DB(.CCB[C_LIN]),.CCB),
MCB_DB_CCB);
end; !End of RCEGO
routine CTLGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch "control" CCBs
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! CCB CCB to pass to dispatched routine.
! MODIFIER Subfunction code; used to select routine.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
DISPATCH$(.MODIFIER,
TABLE$ ($DSPCR, FD_CTL,
(FM_STR, GIVE_CIRCUIT),
(FM_STP, TAKE_CIRCUIT),
(TM_STR, REINIT),
(TM_STP, TERMINATE),
(FM_NM, TLI_NM)),
(.XPTDB,.CCB),
MCB_DB_CCB);
end; !End of CTLGO
routine XCPGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch "transmit complete" CCBs
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! CCB CCB to pass to dispatched routine.
! MODIFIER Subfunction code; used to select routine.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
map CCB:ref block field (C_XPT_FIELDS);
require 'XPTSYM';
DISPATCH$(.MODIFIER,
TABLE$ ($DSPCR, FD_XCP,
(DLL$K_TRANSMIT, DLL_RTN),
(DLL$K_INITIALIZE_LINK,XCPINI),
(DLL$K_STOP_LINK,XCPSTP)),
($TLI_GET_LINE_DB(.CCB[C_LIN]),.CCB),
MCB_DB_CCB);
end; !End of XCPGO
routine RCPGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch "receive complete" CCBs.
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! CCB CCB to pass to dispatched routine.
! MODIFIER Subfunction code; not used.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
map CCB: ref block field (C_XPT_fields);
local LINEb;
require 'XPTSYM';
LINEb = $TLI_GET_LINE_DB(.CCB[C_LIN]); ! Address line data base entry
!
!
!
if .DLLstate eql DLL_RUNNING
then begin
pointer PTR;
!
! Reset the T4 timer (listen timer).
! Note that even invalid messages set this flag; Transport is
! happy as long as SOMETHING is received over a line...
!
Listen_clock = .Listen_timer;
!
! Map in the receive buffer
!
MAPBUF (.CCB,PTR);
!
! Pick up the first character of the message and dispatch on it
!
selectone getb(PTR) of
set
[OTI_CTLflg]: ! Node Init/Verify
selectone getb(PTR) of
set
[INIT_SUBflg]: ! Node Init
begin
RCV_NI(.LINEb,.CCB);
CCB[C_FNC] = FC_RCE;
end;
[VER_SUBflg]: ! Node Verify
begin
RCV_NV(.LINEb,.CCB);
CCB[C_FNC] = FC_RCE;
end;
[otherwise]: ! Unknown
CCB[C_FNC] = FC_RCE;
tes;
[INIT_CTLflg]: ! Transport Init
begin
RCV_TI(.LINEb,.CCB);
CCB[C_FNC] = FC_RCE;
end;
[HELLO_CTLflg]: ! Hello or Test
begin
RCV_HLO(.LINEb,.CCB);
CCB[C_FNC] = FC_RCE;
end;
[VERIFY_CTLflg]: ! Transport Verify
begin
RCV_TV(.LINEb,.CCB);
CCB[C_FNC] = FC_RCE;
end;
[otherwise]: ! Something else
begin
CCB[C_HANDLE] = .XPThandle;
CCB[C_MOD] = XM_DAT;
end;
tes
end
else CCB [C_FNC] = FC_RCE; ! Toss message
$MCB_SCHEDULE_CCB(.CCB);
end; !End of RCPGO
routine CCPGO (XPTDB,CCB,MODIFIER): MCB_DB_CCB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch "control complete" CCBs.
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! CCB CCB to pass to dispatched routine.
! MODIFIER Subfunction code; used to select routine.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
map CCB:ref block field (C_XPT_FIELDS);
require 'XPTSYM';
DISPATCH$(.MODIFIER,
TABLE$ ($DSPCR, FD_CCP,
(FM_STR, CCPSTR),
(FM_STP, CCPSTP)),
($TLI_GET_LINE_DB(.CCB[C_LIN]),.CCB),
MCB_DB_CCB);
end; !End of CCPGO
routine TIMGO (XPTDB,MODIFIER): MCB_DB_MOD novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to dispatch system related stuff
!
! FORMAL PARAMETERS
!
! XPTDB Address of Transport data base
! MODIFIER Subfunction code; used to select routine.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! NONE.
!
!--
begin
0 ! Nothing to do...
end; ! End of TIMGO
routine TLI_XMT (XPTDB,CCB): MCB_DB_CCB novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to pass CCBs from Transport to the Data Link Layer.
!
! FORMAL PARAMETERS
!
! CCB CCB to pass on.
! CCB[C_LIN] Line index of line to transmit on
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! The line index is translated into a LIX.
!
!--
begin
map CCB: ref block field (C_XPT_fields);
local LINEb;
require 'XPTSYM';
LINEb = $TLI_GET_LINE_DB(.CCB[C_LIN]); ! Address line data base entry
CCB[C_HANDLE] = .DLLhandle;
$DLL_TRANSMIT(.CCB);
end; !End of TLI_XMT
routine TLI_RTN (LINEb,CCB): MCB_DB_CCB novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to pass used receive buffers from Transport back to
! the Data Link Layer.
!
! FORMAL PARAMETERS
!
! CCB CCB to pass on to DLL
! CCB[C_LIN] Line index for line buffer was received on
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! The line index is translated into a LIX.
!
!--
begin
map CCB: ref block field (C_XPT_fields);
require 'XPTSYM';
CCB[C_HANDLE] = .DLLhandle;
CCB[C_FNC] = FC_RCE;
CCB[C_MOD] = DLL$K_TRANSMIT;
$MCB_SCHEDULE_CCB(.CCB);
end; !End of TLI_RTN
routine DLL_RTN (LINEb,CCB): MCB_DB_CCB novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! Routine to process completed transmits from the Data Link Layer.
! If the buffer is type INITcode, the it is passed to Line Support to
! process. Otherwise, it is passed on to Transport.
!
! FORMAL PARAMETERS
!
! CCB CCB representing the completed transmit.
! CCB[C_LIN] LIX for line transmit was done on
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
!--
begin
map CCB: ref block field (C_XPT_fields);
require 'XPTSYM';
if .CCB[C_OWN] eql .MCB$GW_PROCESS_HANDLE ! Buffer created by Line Support -
then XCPDAT(.LINEb,.CCB) ! have Line Support finish it off
else begin ! Buffer is Transport's -
CCB[C_HANDLE] = .XPThandle; ! send it
$MCB_SCHEDULE_CCB(.CCB); ! back there
end;
end; !End of DLL_RTN
routine REINIT (XPTDB,CCB): MCB_DB_CCB novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine performs the "reinitialize" function. It calls INI_LIN
! in Line Support to do that. This function is invalid if the line is
! terminating.
!
! FORMAL PARAMETERS
!
! CCB Function CCB; it will be saved for completion.
! CCB[C_LIN] Line index of line to reinitialize
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! Reinitializing a line will terminate all transmits pending
! on that line. All receive buffers given to Transport from
! the line must have been returned before this function is
! called.
!
!--
begin
map CCB: ref block field (C_XPT_FIELDS);
local LINEb;
require 'XPTSYM';
!
! If the line is terminating, reject the request
!
LINEb = $TLI_GET_LINE_DB(.CCB[C_LIN]); ! Address line data base entry
case .LINEstate from HA to RU of
set
[HA,DT,OFF]: begin !Line is terminating or halted
CCB[C_STS] = CE_DIS;
CCB[C_FNC] = FC_CCP;
$MCB_SCHEDULE_CCB(.CCB);
end;
!
! Otherwise, restart the line unconditionally
!
[inrange]: begin
CALL$L(INI_LIN,.LINEb);
CCB[C_LNK] = .LINEccb; ! Chain the function CCB
LINEccb = .CCB; ! into the pending queue
end;
tes;
end; !End of REINIT
routine TERMINATE (XPTDB,CCB): MCB_DB_CCB novalue =
!++
! FUNCTIONAL DESCRIPTION:
!
! This routine performs the "termination" function for a line. It calls
! TERM_LIN in Line Support to do this.
!
! FORMAL PARAMETERS
!
! CCB Function CCB; it is queued for completion.
!
! IMPLICIT INPUTS
!
! NONE.
!
! ROUTINE VALUE:
! COMPLETION CODES:
!
! NONE.
!
! SIDE EFFECTS:
!
! All transmits outstanding to the line being terminated will be
! returned to Transport before this function completes. All receives
! from the line which have been given to Transport must be returned
! before this function is called.
!
!--
begin
map CCB: ref block field (C_XPT_FIELDS);
local LINEb;
require 'XPTSYM';
LINEb = $TLI_GET_LINE_DB(.CCB[C_LIN]); ! Address line data base entry
CALL$L(TERM_LIN,.LINEb); ! Terminate the line protocol unconditionally
CCB[C_LNK] = .LINEccb; ! Chain the function CCB
LINEccb = .CCB; ! into the pending queue
end; !End of TERMINATE
end !End of module TLIITF
eludom