.TITLE LAVC$FAILURE_ANALYSIS Load PEDRIVER's Network Component Database. .SBTTL Editing Hints. .IDENT 'X-10' ;++ ; This module is provided as a template to supply PEDRIVER with the ; required data to analyze network failures that impact LAVc operation. ; This module must be edited to supply the physical network configuration ; used in the Local Area VAXcluster or Mixed Interconnect VAXcluster. ; The following steps can be used as a guide to making the required edits. ; ; Edits should be performed between the two comments "Start edits here" ; and "End of edits". ; ; ; 1.) Draw a picture (on paper) of the Local Area Network (LAN) ; portion of the cluster. Be sure to include DELNIs, DEMPRs, ; LAN Bridges, and any LAN segments (ethernet or FDDI) that are ; being used by more than one LAN controller. ; ; 2.) For large cluster configurations, it may be necessary to ; verify the actual network configuration by tracing the cables. ; This can be a time consuming task but will help the trouble ; shooting process later on. ; ; Also while verifying the network connections, uniquely label ; each component and write down it's physical description, ; location, LAN address and node name. These labels will be ; used later for component descriptions, and describing ; component connections. ; ; 3.) Uniquely label each component in the picture. If a large ; number of nodes exist, then you may want to replace the node ; name with an abbreviation. Also, for each node, label (or ; number) each LAN adapter. ; ; 4.) Locate circular paths in the network configuration. These ; paths involve multiple LAN bridges where one LAN bridge will ; be in a stand-by state. Replace each circular path with a ; uniquely labeled network cloud component. ; ; 5.) List the different component types. ; ; Example: SYSTEM, LAN_ADaPter, DELNI, DEMPR, BRIDGE, etc. ; ; 6.) Now make the first edit to the module at the location marked ; by the comment "Edit 1". This edit consists of defining the ; different component types used by this configuration. Each ; component type is preceeded with the NEW_COMPONENT macro name ; and is followed by the component type (NODE, ADAPTER, COMPONENT, ; or CLOUD). ; ; 7.) Now make the second edit to the module at the location marked ; by the comment "Edit 2". This edit consists of documenting ; the physical network configuration. This edit will take the ; longest time but is well worth the time spent. ; ; 8.) Now make the third edit to the module at the location marked ; by the comment "Edit 3". This edit consists of documenting ; the different nodes in the cluster and the LAN adapters that ; they are using. Each line consists of up to 6 parts: ; ; a) The new component name specified in step 6 (example: ; SYSTEM or LAN_ADP). ; b) The label used in the picture. ; c) The node name for SYSTEM components only. ; d) Some additional descriptive text that will be displayed ; if a failure is detected. ; e) The LAN hardware address. ; f) The DECnet LAN address for SYSTEM components only. ; ; 9.) Now make the fourth edit to the module at the location marked ; by the comment "Edit 4". This edit consists of documenting ; the other network components used in the network configuration. ; Again, each line consists of up to 6 parts. See step 8. ; ; 10.) Verify the network configuration again and make sure that ; the connections are correct. ; ; 11.) Edit starting at the comment "Edit 5" and repeat step 12 ; for each network connection. ; ; 12.) Define a connection between two network components. This is ; done using the CONNECTION macro and two component labels as ; parameters. Each connection consists of 3 parts: ; ; a) The CONNECTION macro name. ; b) A component label corresponding to one side of the ; connection. ; c) A component label corresponding to the other side of ; the connection. ; ; 13.) Assemble the program. ; ; $ Macro /alpha /list /object lavc$failure_analysis.mar+sys$library:lib.mlb/lib ; ; 14.) Make the edits necessary to fix the assembly errors and repeat ; step 13 if assembly errors were found. ; ; 15.) Link the program. ; ; $ Link /alpha lavc$failure_analysis.obj ; ; 16.) Run this program on one of the nodes that will perform the LAVc ; network failure analysis. ; ; 17.) Make the edits necessary to fix the execution errors detected ; by step 16. Repeat steps 13, 14, 15, and 16 until no further ; execution errors occur. ; ; 18.) Execute this program on each of the nodes that is to perform ; the LAVc network failure analysis. ;-- .PAGE .SBTTL External Declarations. .DISABLE GLOBAL ; ; Define the external system routines. ; .EXTERNAL LIB$PUT_OUTPUT .EXTERNAL SYS$FAO .EXTERNAL SYS$LAVC_DEFINE_NET_COMPONENT .EXTERNAL SYS$LAVC_DEFINE_NET_PATH .EXTERNAL SYS$LAVC_DISABLE_ANALYSIS .EXTERNAL SYS$LAVC_ENABLE_ANALYSIS ; ; Define the required system constants. ; $PEMCOMPDEF $PEMCLSTDEF $SSDEF $SYIDEF ; ; Define the Non-Paged Pool Usage. ; NON_PAGED_POOL_USAGE = 0 .PAGE .SBTTL Support Macro for Defining the LAN Address. .MACRO DEFINE_LAN_ADDRESS label, lan_address .IF NOT_BLANK lan_address .ALIGN QUAD label: .LONG 6 .ADDRESS . + 4 .IF EQUAL %LENGTH(lan_address) - 17 CHAR_POS = 0 .REPT 6 .BYTE ^X %EXTRACT(CHAR_POS,2,) CHAR_POS = CHAR_POS + 2 + 1 .ENDR ; ; Within a single extended LAN address must remain unique. The ; following line checks for unique LAN addresses in a single ; extended LAN configuration. If your configuration is using ; multiple extended LANs then LAN address can be duplicated between ; the extended LANs. In this case, the following line should be ; removed. ; LAN_ADDR.%EXTRACT(0,2,lan_address)%EXTRACT(3,2,lan_address)%EXTRACT(6,2,lan_address)%EXTRACT(9,2,lan_address)%EXTRACT(12,2,lan_address)%EXTRACT(15,2,lan_address): .IFF .ERROR ; Bad LAN hardware address specified. .ENDC .IFF label = 0 ; No address specified. .ENDC .ENDM DEFINE_LAN_ADDRESS .PAGE .SBTTL Component data structure. $DEFINI CSTR $DEF CSTR_A_LINK .BLKL 1 ; Link to next component in path. $DEF CSTR_L_TYPE .BLKL 1 ; Component type $DEF CSTR_L_COMP_ID .BLKL 1 ; Component ID value. $DEF CSTR_L_NODENAME_LEN .BLKL 1 ; Node name length. $DEF CSTR_L_DESCR_LEN .BLKL 1 ; Description length. $DEF CSTR_A_DESCR .BLKL 1 ; Description buffer address. $DEF CSTR_S_CSTRDEF ; Size of this structure. $DEFEND CSTR .PAGE .SBTTL Support Macro for Defining the Network Components. COMPONENT_COUNT = 0 .MACRO NEW_COMPONENT network_component, component_type .MACRO network_component component_label, nodename, description, - hw_addr, decnet_addr .ENABLE LOCAL_BLOCK ; ; Define a list of the component labels for display if any errors ; are located during the execution of this program. ; .PSECT COMP_LABELS COMP.'component_label: .IF BLANK, nodename .ASCID "component_label" .IFF SCSNODE.'nodename: ; Check for duplicate node names. .ASCID "component_label (nodename)" .ENDC .PSECT COMP_TABLE .IF NOT_DEFINED COMP_TABLE COMP_TABLE:: .ENDC .ADDRESS COMP.'component_label ; ; Define the component name string that will be used for the display. ; This string incorporates the network component type, any additional ; name and location data provided as well as the associated addresses. ; .PSECT ASCII_DATA RD, NOWRT, NOEXE ANM.'component_label: .IF IDENTICAL component_type, NODE ASSUME %LENGTH(nodename) LE 8 ; Verify runtime constraint. .ASCII "'nodename'" NODENAME_LENGTH = . - ANM.'component_label .IFF .IF NOT_EQUAL %LENGTH(nodename) ; Incorrect entry - error. .ERROR ; Comma missing? Do not specify a NODENAME_value for this component. .ENDC NODENAME_LENGTH = 0 .ENDC .ASCII "'description'" .IF DIFFERENT component_type, NODE .IF NOT_BLANK hw_addr .ASCII " ('hw_addr')" .ENDC .IF NOT_BLANK decnet_addr .ASCII " ('decnet_addr')" .ENDC .ENDC NAME_LENGTH = . - ANM.'component_label ; ; Build the structure for this component. ; .PSECT COMPONENT_STRUCTURES QUAD, RD, WRT, NOEXE CSTR.'component_label: ASSUME CSTR_A_LINK EQ 0 .LONG 0 ; No link yet. ASSUME CSTR_L_TYPE EQ 4+CSTR_A_LINK CTYP.'component_label: .LONG COMP$C_'component_type ; Component type. ASSUME CSTR_L_COMP_ID EQ 4+CSTR_L_TYPE CTID.'component_label: .LONG 0 ; Component ID value. ASSUME CSTR_L_NODENAME_LEN EQ 4+CSTR_L_COMP_ID NNL.'component_label: .LONG NODENAME_LENGTH ; Node name length. ASSUME CSTR_L_DESCR_LEN EQ 4+CSTR_L_NODENAME_LEN ASSUME CSTR_A_DESCR EQ 4+CSTR_L_DESCR_LEN ASSUME NAME_LENGTH LE COMP$C_MAX_NAME_LEN ; Runtime length AND.'component_label: .LONG NAME_LENGTH ; Description string descriptor. .ADDRESS ANM.'component_label ASSUME CSTR_S_CSTRDEF EQ 4+CSTR_A_DESCR ; ; Build the component structure list. ; .PSECT COMPONENT_STRUCT_LIST QUAD, RD, NOWRT, NOEXE .IF NOT_DEFINED COMPONENT_STRUCT_LIST COMPONENT_STRUCT_LIST:: .ENDC .ADDRESS CSTR.'component_label ; ; Account for the non-paged pool usage. ; NON_PAGED_POOL_USAGE = NON_PAGED_POOL_USAGE + NAME_LENGTH + COMP$S_COMPDEF + 8 ; ; Save the Ethernet addresses. ; .PSECT LAN_ADDR QUAD, RD, NOWRT, NOEXE DEFINE_LAN_ADDRESS HWA.'component_label, hw_addr DEFINE_LAN_ADDRESS DNA.'component_label, decnet_addr ; ; Create the call block to be used by the program to create ; the component. ; .PSECT CALL_BLOCKS LONG, RD, WRT, NOEXE CCB.'component_label: .LONG 6 ; Argument count. .ADDRESS AND.'component_label ; Address of component description. .ADDRESS NNL.'component_label ; Address of node name length. .ADDRESS CTYP.'component_label ; Address of component type. .ADDRESS HWA.'component_label ; Address of LAN hardware address. .ADDRESS DNA.'component_label ; Address of LAN DECnet address. .ADDRESS CTID.'component_label ; Address of returned component ID value. ; ; Append this component to the list of components that need ; to be defined. ; .PSECT COMPONENT_TABLE LONG, RD, NOWRT, NOEXE .IF NOT_DEFINED NETWORK_COMPONENT_TABLE NETWORK_COMPONENT_TABLE: .ENDC .ADDRESS CCB.'component_label ; ; Define the component label values. ; CID.'component_label = COMPONENT_COUNT ; ; Account for this component. ; COMPONENT_COUNT = COMPONENT_COUNT + 1 .DISABLE LOCAL_BLOCK .ENDM network_component .ENDM NEW_COMPONENT .PAGE .SBTTL Support Macro for Defining a Connection Between Network Components. CONNECTION_TABLE_LENGTH = 0 .MACRO CONNECTION comp_a, comp_b .SAVE_PSECT .PSECT CONNECTION_TABLE QUAD, RD, NOWRT, NOEXE .IF NOT_DEFINED CONNECTION_TABLE CONNECTION_TABLE:: .ENDC ; ; Define both labels for the connection to prevent the connection ; from being defined twice. Preventing multiple connection ; definitions makes it easier to change the network description by ; adding and REMOVING connections. ; CONN.'comp_a'_2_'comp_b:: CONN.'comp_b'_2_'comp_a:: .ADDRESS CSTR.'comp_a .ADDRESS CSTR.'comp_b CONNECTION_TABLE_LENGTH = CONNECTION_TABLE_LENGTH + 1 .RESTORE_PSECT .ENDM CONNECTION .PAGE .SBTTL Define the Network Components. .SHOW MEB ; *** Start edits here *** ; Edit 1. ; ; Define the hardware components needed to describe ; the physical configuration. ; NEW_COMPONENT SYSTEM NODE NEW_COMPONENT LAN_ADP ADAPTER NEW_COMPONENT DEMPR COMPONENT NEW_COMPONENT DELNI COMPONENT NEW_COMPONENT SEGMENT COMPONENT NEW_COMPONENT NET_CLOUD CLOUD ; Edit 2. ; ; Diagram of a multi-adapter LAV cluster. ; ; ; Sa -------+---------------+---------------+---------------+------- Sa ; | | | | ; | MPR_A | | ; | .----+----. | | ; | 1| 1| 1| | ; BrA ALPHA BETA DELTA BrB ; | 2| 2| 2| | ; | `----+----' | | ; | LNI_A | | ; | | | | ; Sb -------+---------------+---------------+---------------+------- Sb ; ; ; Edit 3. ; ; Label Node Description LAN HW Addr DECnet Addr ; ----- ------ ------------------------------------------------------ ------------------- ------------------- SYSTEM A, ALPHA, < - MicroVAX II; In the Computer room> LAN_ADP A1, , , <08-00-2B-41-41-01>, LAN_ADP A2, , , <08-00-2B-41-41-02> SYSTEM B, BETA, < - MicroVAX 3500; In the Computer room> LAN_ADP B1, , , <08-00-2B-42-42-01>, LAN_ADP B2, , , <08-00-2B-42-42-02> SYSTEM D, DELTA, < - VAXstation II; In Dan's office> LAN_ADP D1, , , <08-00-2B-44-44-01>, LAN_ADP D2, , , <08-00-2B-44-44-02> ; Edit 4. ; ; Label each of the other network components. ; DEMPR MPR_A, , DELNI LNI_A, , SEGMENT Sa, , SEGMENT Sb, , NET_CLOUD BRIDGES, , ; Edit 5. ; ; Describe the network connections. ; CONNECTION Sa, MPR_A CONNECTION MPR_A, A1 CONNECTION A1, A CONNECTION MPR_A, B1 CONNECTION B1, B CONNECTION Sa, D1 CONNECTION D1, D CONNECTION Sa, BRIDGES CONNECTION Sb, BRIDGES CONNECTION Sb, LNI_A CONNECTION LNI_A, A2 CONNECTION A2, A CONNECTION LNI_A, B2 CONNECTION B2, B CONNECTION Sb, D2 CONNECTION D2, D .PAGE .SBTTL Define the Local Data. ; *** End of edits *** NEW_COMPONENT LCL_LOOPBACK ADAPTER LCL_LOOPBACK LCL, , , <00-00-00-00-00-00> .PSECT LOCAL_DATA QUAD, RD, WRT, NOEXE ; ; Define the output descriptor. ; COMP_DESCR:: .ASCID 'Component: !AS, Status: !XL' .ALIGN QUAD PATH_DESCR:: .ASCID '!+ !8XL: !AS' .ALIGN QUAD BAD_PATH_DESCR:: .ASCID '(Status:!8XL) !8XL: !AS' .ALIGN QUAD POOL_USAGE_DESCR:: .ASCID ' Non-Paged Pool Usage: ~!UL bytes' .ALIGN QUAD BUFFER_LEN = 132 BUFFER_DESCR:: .LONG BUFFER_LEN .ADDRESS BUFFER BUFFER:: .BLKB BUFFER_LEN ; ; Define the bad component ID value for display. ; .ALIGN LONG BAD_COMPONENT_ID:: .BLKL 1 ; ; Define the Non-Paged Pool Usage. ; NPAGEDYN_USAGE:: .LONG NON_PAGED_POOL_USAGE ; ; Define the number of paths. ; PATH_COUNT:: .LONG 0 .PAGE .SBTTL Branch Displacement Support Macros. .MACRO BLBCw location, label, ?no_branch BLBS location, no_branch ; Success, continue - branch. BRW label ; Failure - branch. no_branch: .ENDM BLBCw .MACRO BEQLw label, ?no_branch BNEQ no_branch ; Continue - branch. BRW label ; Take the specified branch. no_branch: .ENDM BEQLw .PSECT PROGRAM_CODE PAGE, RD, NOWRT, EXE .SHOW MEB .PAGE .SBTTL Subroutine to Display Component Definition Failures. ;++ ; Inputs: ; R0 = Failure status. ; R6 = Component label descriptor address. ; ; Outputs: ; All registers preserved. ;-- DISPLAY_COMP_FAILURE: .JSB_ENTRY INPUT=, - PRESERVE= ; Format the error message. PUSHL R0 ; Failure status. PUSHL R6 ; Set the component label address. PUSHAB BUFFER_DESCR PUSHAB BUFFER_DESCR PUSHAB COMP_DESCR CALLS # 5, G^ SYS$FAO ; Format the ID value. ; Display the error message. PUSHAB BUFFER_DESCR CALLS # 1, G^ LIB$PUT_OUTPUT ; Display the ID value. RSB .PAGE .SBTTL Subroutine to Display a Network Path. ;++ ; DISPLAY_NETWORK_PATH ; This routine displays the components in a network path. ; ; Inputs: ; 4(AP) = Component structure address of end of component list. ; 8(AP) = Bad component ID address. ; 12(AP) = Status value. ; ; Register Usage: ; R0 = Temporary. ; R6 = Component structure address. ; R7 = Bad component address. ; R8 = Status value. ; R9 = Saved link pointer for last component. ; ; Outputs: ; R0 = Destroyed. ; R1 = Destroyed. ;-- last_component = 4 bad_component = 4+last_component status_value = 4+bad_component DISPLAY_NETWORK_PATH: .CALL_ENTRY MAX_ARGS=3, - HOME_ARGS=TRUE, - PRESERVE= ; ; Get the last component address. ; MOVL last_component(AP), R6 MOVL bad_component(AP), R7 MOVL status_value(AP), R8 MOVL CSTR_A_LINK(R6), R9 ; Save link pointer. ; ; Display the components in the network path. ; 10$: ; ; Format the ID value and component name. ; MOVZWL # BUFFER_LEN, BUFFER_DESCR PUSHAB CSTR_L_DESCR_LEN(R6) ; Component name descriptor address. PUSHL CSTR_L_COMP_ID(R6) ; Component ID value. PUSHL R8 ; Set the status value PUSHAB BUFFER_DESCR PUSHAB BUFFER_DESCR PUSHAB PATH_DESCR CMPL R7, CSTR_L_COMP_ID(R6) ; Check for bad component BNEQ 20$ ; No - branch. MOVAQ BAD_PATH_DESCR, (SP) ; Set bad component. 20$: CALLS # 6, G^ SYS$FAO ; ; Display the path name and error status. ; PUSHAB BUFFER_DESCR CALLS # 1, G^ LIB$PUT_OUTPUT ; ; Break any circular paths. ; MOVL CSTR_A_LINK(R6), R0 ; Get the next component address. CMPL R6, last_component(AP) ; Check for the last component. BNEQ 30$ ; Not last component - branch. CLRL CSTR_A_LINK(R6) ; Break any circular paths. 30$: ; ; Display the next component name in the list. ; MOVL R0, R6 ; Get the next component address. BNEQ 10$ ; Another component - branch. ; ; Display a blank link. ; CLRL BUFFER_DESCR PUSHAB BUFFER_DESCR CALLS # 1, G^ LIB$PUT_OUTPUT ; ; Restore the last components link. ; MOVL last_component(AP), R6 ; Get the last component address. MOVL R9, CSTR_A_LINK(R6) ; Restore the link pointer. RET .PAGE .SBTTL Subroutine to Build a Network Path From a Linked List of Components. ;++ ; BUILD_PATH ; This subroutine builds a network path from a linked list of components. ; ; Inputs: ; 4(AP) = Component address at the end of the network path. ; ; Register Usage: ; R0 = Temporary. ; R6 = Component structure address. ; R7 = Component ID table length. ; R8 = Component ID table descriptor. ; R9 = Status address. ; R10 = Saved link pointer for last component. ; ; Outputs: ; R0 = Destroyed ; R1 = Destroyed ;-- component = 4 BUILD_PATH: .CALL_ENTRY MAX_ARGS=1, - HOME_ARGS=TRUE, - PRESERVE= ; ; Get the end component address. ; MOVL component(AP), R6 ; Get component structure address. MOVL CSTR_A_LINK(R6), R10 ; Get last component connection. ; ; Walk the link list and build the component ID table. ; MOVL SP, R7 ; Save SP to compute table length. 10$: MOVL CSTR_A_LINK(R6), R0 ; Set the next component address. PUSHL CSTR_L_COMP_ID(R6) ; Add component ID value to table. CMPL R6, component(AP) ; Is this the last component? BNEQ 20$ ; No - branch. CLRL CSTR_A_LINK(R6) ; Break any circular paths. 20$: MOVL R0, R6 ; Set the next component address. BNEQ 10$ ; Another component - branch. ; ; Build the component ID table descriptor address. ; SUBL SP, R7 ; Compute the table length. PUSHL SP ; Set the table address. PUSHL R7 ; Set the table length. MOVL SP, R8 ; Set the descriptor address. MOVAL -(SP), R9 ; Get status address. ; ; Define the network path. ; PUSHAL BAD_COMPONENT_ID ; Address of bad component ID value. PUSHL R9 ; Address of path status for analysis. PUSHL R8 ; Address of directed path description. CALLS # 3, G^ SYS$LAVC_DEFINE_NET_PATH ; Define the network path. BLBC R0, 40$ ; Component definition failure - branch. ; ; Account for this network path. ; ADDL R7, NPAGEDYN_USAGE ; Account for the path length. ADDL # CLST$S_CLSTDEF, - NPAGEDYN_USAGE ; Account for the data structure. INCL PATH_COUNT ; Account for this path. 30$: ; ; Restore the last component's link. ; MOVL component(AP), R6 ; Get component structure address. MOVL R10, CSTR_A_LINK(R6) ; Restore the link address. RET ; ; Path definition error, display an error message. ; 40$: MOVL component(AP), R6 ; Get component structure address. MOVL R10, CSTR_A_LINK(R6) ; Restore the link address. PUSHL R0 ; Set the status. PUSHL BAD_COMPONENT_ID ; Get the BAD component ID value. PUSHL R6 ; Set the component address. CALLS # 3, DISPLAY_NETWORK_PATH ; Display the failure. BRB 30$ .PAGE .SBTTL Subroutine to Walk the Connections and Locate the Network Paths. ;++ ; NEXT_COMPONENT ; This subroutine walks the connection list to locate a network paths ; from this node to all other nodes in the cluster. ; ; Inputs: ; 4(AP) = Previous component structure address. Zero if none. ; 8(AP) = Component structure address to locate in the list. ; 12(AP) = Connection to ignore. ; ; Register Usage: ; R0 = Temporary. ; R6 = Previous component address. ; R7 = Component structure address to locate. ; R8 = Connection table length. ; R9 = Connection table address. ; R10 = 1st component in connection. ; R11 = 2nd component in connection. ; ; Outputs: ; R0 = Destroyed ; R1 = Destroyed ;-- previous_component = 4 locate_component = 4 + previous_component ignore_connection = 4 + locate_component NEXT_COMPONENT: .CALL_ENTRY MAX_ARGS=3, - HOME_ARGS=TRUE, - PRESERVE= ; ; Locate and break circular network paths. ; MOVL previous_component(AP), R6 ; Get the input parameters. MOVL locate_component(AP), R7 TSTL CSTR_A_LINK(R7) ; Check for circular path. BNEQ 60$ ; Circular path - branch. ; ; Link the components together to define the path. ; MOVL R6, CSTR_A_LINK(R7) ; Link components locate -> previous ; ; If this component is a node component then this is the end of ; the path and the path can be defined. Otherwise, search the ; connection table for a connection to this component. ; ; The other case to deal with is the first component which is a ; node. This case always has a previous component of zero (0) ; and is treated as just any other component, i.e. search the ; table. ; BEQL 10$ ; First component - branch. CMPL CSTR_L_TYPE(R7), # COMP$C_NODE ; Is this a node component? BNEQ 10$ ; No, continue search - branch. PUSHL R7 ; Set the end of the path. CALLS # 1, BUILD_PATH ; Build the network path. BRB 50$ 10$: ; ; Setup for the component table scan. ; MOVAB CONNECTION_TABLE, R9 ; Get the connection table address. MOVL # CONNECTION_TABLE_LENGTH, R8 ; Get the connection table length. ; ; Get the components in the connection. ; ASSUME CONNECTION_TABLE_LENGTH GT 0 20$: MOVL (R9)+, R10 ; Get the connected components. MOVL (R9)+, R11 ; ; Locate only components that are connected to the component ; that we are looking for. All other connections can be ignored. ; CMPL R7, R10 ; Component we are looking for? BEQL 30$ ; Yes, continue down tree - branch. CMPL R7, R11 ; Component we are looking for? BNEQ 40$ ; No, finish searching the table. MOVL R10, R11 ; Set component to look for. ; ; Another branch found, continue down this branch if it should ; not be ignored. ; 30$: MOVAB -8(R9), R0 ; Get the connection address. CMPL R0, ignore_connection(AP) ; Ignore this connection? BEQL 40$ ; Yes, ignore it - branch. PUSHL R0 ; Set next connection to ignore. PUSHL R11 ; Component to look for. PUSHL R7 ; Previous component. CALLS # 3, NEXT_COMPONENT ; Locate next component in the path. ; ; Finish searching the table. ; 40$: SOBGTR R8, 20$ ; Another connection - branch. ; ; Disconnect this component from the previous component. ; 50$: CLRL CSTR_A_LINK(R7) ; Break component linkage. ; ; Return to the caller. ; 60$: RET .PAGE .SBTTL Subroutine To Locate Node In Component List. ;++ ; LOCATE_NODE ; This subroutine locates the local node in the component list. ; ; Inputs: ; None. ; ; Register Usage: ; R0 = Temporary. ; R1 = Temporary. ; R2 = Temporary. ; R3 = Temporary. ; R4 = Temporary. ; R5 = Temporary. ; R6 = Component structure address. ; R7 = Component structure table length. ; R8 = Component structure table address. ; R9 = IOSB address. ; R10 = GETSYI item list address. ; R11 = Node name descriptor address. ; ; Outputs: ; R0 = Status. ; R1 = Component structure address. ;-- LOCATE_NODE: .CALL_ENTRY MAX_ARGS=0, - PRESERVE= ; ; Get the current node name. ; NODENAME_BUFFER_LENGTH = 15 SUBL # 1+NODENAME_BUFFER_LENGTH, SP ; Create the node name buffer. PUSHL SP ; Build the buffer descriptor. PUSHL # NODENAME_BUFFER_LENGTH ; Set the default buffer length. MOVL SP, R11 ; Save buffer descriptor address. CLRQ -(SP) PUSHL R11 ; Return length address. PUSHAL @4(R11) ; Buffer address. MOVL # < SYI$_NODENAME @ 16 > ! - ; Item code. NODENAME_BUFFER_LENGTH, -(SP) ; Buffer length. MOVL SP, R10 ; Save the itemlist address. CLRL -(SP) ; Preserve quadword alignment. CLRQ -(SP) ; Create the IOSB. MOVL SP, R9 ; Get the IOSB address. $GETSYIW_S ITMLST=(R10), - ; Get the node name. IOSB=(R9) BLBCw R0, 40$ ; Error - branch. MOVZWL (R9), R0 ; Get the final status. BLBCw R0, 40$ ; Error - branch. ; ; Locate this node in the component list. ; MOVAB CONNECTION_TABLE, R8 ; Get the connection table address. MOVL # 2*CONNECTION_TABLE_LENGTH, R7 ; Get the connection table length. ASSUME CONNECTION_TABLE_LENGTH GT 0 10$: MOVL (R8)+, R6 ; Get component structure address. CMPL CSTR_L_TYPE(R6), # COMP$C_NODE ; Check for a node component. BNEQ 20$ ; Not a node - branch. CMPC5 CSTR_L_NODENAME_LEN(R6), - ; Local node? @CSTR_A_DESCR(R6), - # ^A' ', (R11), @4(R11) BEQL 30$ ; Yes - branch. 20$: SOBGTR R7, 10$ ; Try the next node. MOVZWL # SS$_NOSUCHNODE, R0 ; Local node not defined. BRB 40$ 30$: MOVZWL # SS$_NORMAL, R0 ; Local node found. MOVL R6, R1 ; Return the component address. 40$: RET .PAGE .SBTTL Subroutine To Define the Local Loopback Path. ;++ ; DEFINE_LOOPBACK_PATH ; This subroutine defines the loopback path. ; ; Inputs: ; 4(AP) = Local node component structure address. ; ; Register Usage: ; R6 = Local node component structure address. ; R7 = Local loopback component structure address. ; R8 = Component list descriptor address. ; R9 = Status address. ; ; Outputs: ; R0 = Status. ;-- local_node = 4 DEFINE_LOOPBACK_PATH: .CALL_ENTRY MAX_ARGS=1, - HOME_ARGS=TRUE, - PRESERVE= ; ; Get the local node structure address. ; MOVL local_node(AP), R6 ; Get the structure address. MOVAB CSTR.LCL, R7 ; Get the loopback structure address. ; ; Build the local loopback path. ; PUSHL CSTR_L_COMP_ID(R6) ; Node. PUSHL CSTR_L_COMP_ID(R7) ; Loopback adapter. PUSHL CSTR_L_COMP_ID(R7) ; Loopback adapter. PUSHL CSTR_L_COMP_ID(R6) ; Node. PUSHL SP ; Address of component list. PUSHL # 16 ; Length of the component list. MOVL SP, R8 ; Get list descriptor address. MOVAL -(SP), R9 ; Get the status address. ; ; Define the local loopback path. ; PUSHAL BAD_COMPONENT_ID ; Address of bad component ID value. PUSHL R9 ; Address of path status for analysis. PUSHL R8 ; Address of directed path description. CALLS # 3, G^ SYS$LAVC_DEFINE_NET_PATH ; Define the network path. BLBC R0, 10$ ; Component definition failure - branch. ; ; Account for this network path. ; ADDL (R8), NPAGEDYN_USAGE ; Account for the path length. ADDL # CLST$S_CLSTDEF, - NPAGEDYN_USAGE ; Account for the data structure. INCL PATH_COUNT ; Account for this path. 10$: RET .PAGE .SBTTL Subroutine to Display a Non-Paged Pool Usage. ;++ ; DISPLAY_POOL_USAGE ; This routine displays the non-paged pool usage. ; ; Inputs: ; NPAGEDYN_USAGE ; ; Register Usage: ; R0 = Temporary. ; R1 = Temporary. ; ; Outputs: ; R0 = Destroyed. ; R1 = Destroyed. ;-- DISPLAY_POOL_USAGE: .CALL_ENTRY MAX_ARGS=0, - PRESERVE= ; ; Format the non-page pool usage. ; MOVZWL # BUFFER_LEN, BUFFER_DESCR PUSHL NPAGEDYN_USAGE ; Non-paged pool usage. PUSHAB BUFFER_DESCR PUSHAB BUFFER_DESCR PUSHAB POOL_USAGE_DESCR CALLS # 4, G^ SYS$FAO ; ; Display the non-paged pool usage. ; PUSHAB BUFFER_DESCR CALLS # 1, G^ LIB$PUT_OUTPUT RET .PAGE .SBTTL Program to Load the Network Description into PEDRIVER. LAVC$FAILURE_ANALYSIS: .CALL_ENTRY MAX_ARGS=0, - PRESERVE= ; ; Locate the local node in the component table. ; CALLS # 0, LOCATE_NODE ; Find ourselves. BLBCw R0, 99$ ; Error - branch. MOVL R1, R11 ; Save the local component structure address. ; ; Disable the ANALYSIS code. ; CALLS # 0, G^ SYS$LAVC_DISABLE_ANALYSIS BLBCw R0, 99$ ; Error - branch. ; ; Define the network components described in the tables. ; MOVZWL # SS$_BADPARAM, R0 ; Assume no components available. MOVAL COMP_TABLE, R5 ; Get component label table address. MOVAL NETWORK_COMPONENT_TABLE, R3 ; Get the component table address. MOVL # COMPONENT_COUNT, R2 ; Get the number of components to ; be defined. BEQLw 99$ 10$: MOVL (R5)+, R6 ; Get the component label. MOVL (R3)+, R1 ; Get the component call parameters. CALLG (R1), G^ SYS$LAVC_DEFINE_NET_COMPONENT ; Define the component. BLBC R0, 20$ ; Component definition failure - branch. SOBGTR R2, 10$ ; Define the next component. BRB 30$ 20$: BSBW DISPLAY_COMP_FAILURE ; Display the failure. BRW 99$ ; Exit with failure status. 30$: ; ; Define the loopback path. ; PUSHL R11 ; Local node component addr. CALLS # 1, DEFINE_LOOPBACK_PATH ; Define the loopback path. BLBCw R0, 99$ ; Error, exit - branch. ; ; Define the network paths. ; CLRL -(SP) ; No connection to ignore. PUSHL R11 ; Find this node. PUSHL # 0 ; Previous component found. CALLS # 3, NEXT_COMPONENT ; Define the network paths. ; ; Enable the LAVC network component failure analysis. ; CALLS # 0, G^ SYS$LAVC_ENABLE_ANALYSIS BLBCw R0, 99$ ; Error - branch. CMPL PATH_COUNT, # 1 ; Any paths defined? BLEQU 90$ ; No - branch. CALLS # 0, DISPLAY_POOL_USAGE ; Yes, display nonpaged pool usage. BRB 99$ ; ; Disable the ANALYSIS code if no paths are defined. ; 90$: CALLS # 0, G^ SYS$LAVC_DISABLE_ANALYSIS BLBCw R0, 99$ ; Error - branch. MOVZWL # SS$_RMTPATH, R0 ; Only remote paths described. 99$: RET .PAGE .SBTTL End of Program Code. .END LAVC$FAILURE_ANALYSIS