.TITLE GETLATNODE .IDENT /V1-001/ ; © 2000 P. Beaudoin ; This software is supplied as is and the usual warranty ; is implied - none. You may use, abuse, modify or ; or ignore this software as you see fit but are ; encouraged to give credit, as is good practice ; when stealing with permission ; ; Modifications: ; 001 JAN-1996 PB Creation ;++ ;1 GETLATNODE ; Routine to return the LAT node information for the input node name. ;2 Input ; .address .desc pointing to LAT node name ; .address desc for service block return ;2 Output ; The NODE block is returned as formatted by LAT: ; From the manual... ; Note that only those marked either REMOTE or BOTH are returned for calls to ; other that the local node ; ; Table 5-17: LAT$C_ENT_NODE Item Codes ; ; Item Codes Meaning ; ; LAT$_ITM_NODE_ LAT node name for the node. ; NAME (BOTH, ; SUMMARY) ; ; LAT$_ITM_ Node identification string. ; IDENTIFICATION ; (BOTH, SUMMARY) ; ; LAT$_ITM_NODE_ Type of node. Possible values are: ; TYPE (BOTH, ; LAT$C_NT_LOCAL Node is local node. ; SUMMARY) ; LAT$C_NT_REMOTE Node is remote node. ; ; LAT$_ITM_STATE Operating state of the LAT protocol. Possible values are: ; (LOCAL,SUMMARY) ; LAT$C_ON New connections are allowed and the LAT protocol is running. ; ; LAT$C_OFF New connections are not allowed. The LAT protocol is not ; running. ; ; LAT$C_SHUT No new connections are allowed. Currently active connections ; are still maintained. The LAT protocol remains running only ; until the last active session is disconnected, at which time the ; node is placed in the OFF state. ; ; LAT$_ITM_NODE_ Current status of remote node. This item code is present only if a LAT virtual ; STATUS (REMOTE, circuit does not currently exist between the local node and this remote node. ; SUMMARY) Possible values are: ; ; LAT$C_REACHABLE Remote node is reachable ; ; LAT$C_UNREACHABLE Remote node is unreachable ; ; LAT$C_UNKNOWN Remote node status is unknown ; ; LAT$_ITM_ Number of LAT sessions from the local node to this remote node. This item code ; CONNECTED_ replaces the LAT$_ITM_NODE_STATUS item code for remote nodes to which a ; COUNT (REMOTE, LAT virtual circuit currently exists. ; SUMMARY) ; ; LAT$_ITM_ A bit mask of LAT group codes that are serviced by the node. ; SERVICE_GROUPS ; (BOTH) ; ; LAT$_ITM_ LAT protocol version string. ; PROTOCOL_ ; VERSION (BOTH) ; ; ; Item Codes Meaning ; ; LAT$_ITM_ LAN address that is used by the node. ; DATALINK_ ; ADDRESS (REMOTE) ; ; LAT$_ITM_NODE_ Maximum number of nodes in LAT database. The default is zero, where the ; LIMIT maximum is determined by system resources. ; ; LAT$_ITM_ LAT retransmit limit. Possible values are 4 to 120 retransmissions. The default ; RETRANSMIT_ is 8 retransmissions. ; LIMIT ; ; LAT$_ITM_ Maximum LTA unit number. ; MAXIMUM_UNITS ; (LOCAL) ; ; LAT$_ITM_ Controls whether the node allows the use of the MASTER side of the LAT protocol ; SERVER_MODE for outbound connections. Possible values are: ; (LOCAL) ; LAT$C_DISABLED Server mode disabled (this is the default) ; ; LAT$C_ENABLED Server mode enabled ; ; LAT$_ITM_ Indicates whether the node is to respond to service inquiries originating from ; SERVICE_ a remote system. These inquiries are not necessarily directed at services being ; RESPONDER offered by the node. See theOpenVMS System Management Utilities Reference ; (LOCAL) Manual for more information on this feature. Possible values are: ; ; LAT$C_DISABLED Service responder disabled (this is the default) ; ; LAT$C_ENABLED Service responder enabled ; ; LAT$_ITM_ Maximum number of outgoing LAT sessions. A value of zero, which is the ; OUTGOING_SES_ default, indicates that the limit is determined by system resources. ; LIMIT (LOCAL) ; ; LAT$_ITM_ Maximum number of interactive LAT sessions. A value of zero, which is the ; INCOMING_SES_ default, indicates that the limit is determined by system resources. ; LIMIT (LOCAL) ; ; LAT$_ITM_USER_ Bit mask of LAT group codes to be used when attempting outbound connections ; GROUPS (LOCAL) using the MASTER side of the LAT protocol. ; ; LAT$_ITM_ Circuit timer value in milliseconds. Possible values are 10 to 1000 milliseconds. ; CIRCUIT_TIMER The default is 80 milliseconds. ; (BOTH) ; ; LAT$_ITM_CPU_ CPU rating. ; RATING (LOCAL) ; ; LAT$_ITM_ Keepalive timer in seconds. Possible values are 10 to 255 seconds. The default is ; KEEPALIVE_TIMER 20 seconds. ; (LOCAL) ; ; LAT$_ITM_ Multicast timer value in seconds. Possible values are 10 to 180 seconds. The ; MULTICAST_TIMER default is 20 seconds. ; (BOTH) ; ; LAT$_ITM_ Indicates whether inbound connections (interactive sessions) can be accepted. ; CONNECTIONS Possible values are: ; (BOTH) ; LAT$C_DISABLED Inbound connections disabled ; ; LAT$C_ENABLED Inbound connections enabled (this is the default) ; ;2 Return ; SS$_NORMAL OK - Node reached and data returned ; SS$_ACCVIO Cant read inpt or cant write outp ; Any error from $assign or $qio. Note that the error returned ; in the IOSB from LAT is .long. Use LATMSG.MAR to translate. ;-- .LIBRARY "SYS$LIBRARY:LIB.MLB" $DSCDEF ; $LATDEF ; LAT definitions $SSDEF ; System Services .PSECT GETLATNODE_D,WRT,NOEXE,PIC,SHR,QUAD LATIOSB: .QUAD 0 LATDEVICE: .ASCID /LTA0/ FULL_OFFSET = LAT$V_SENSE_FULL+16 ; Argument list for LAT read ; .ALIGN LONG READLAT: .LONG 12 ; Arg counter .LONG 0 ; Event number LATCHAN: .LONG 0 ; Channel .LONG ; Function .ADDRESS LATIOSB ; IO Status block .LONG 0 ; AST Routine .LONG 0 ; AST Param LATBUFFER: .LONG 0 ; P1 LATBUFFER_LEN: .LONG 0 ; P2 .LONG LAT$C_ENT_NODE!<1@FULL_OFFSET> ; P3 ENTITY: .LONG 0 ; P4 .LONG 0 ; P5 .LONG 0 ; P6 .PSECT GETLATNODE_C,EXE,NOWRT,LONG .sbttl GETLATNODE (node,str) .CALL_ENTRY MAX_ARGS=2, HOME_ARGS=TRUE, - INPUT=, - PRESERVE=, - LABEL=GETLATNODE ; Regs: ; R6 input node name len ; R7 input node name addr ; R8 Len of outp buff ; R9 Addr where outp service block is written ; MOVQ @4(AP), R6 ; Node name desc MOVQ @8(AP), R8 ; Outp ; Check params PROBER #0, R6, (R7) ; Check for read access BNEQ 20$ ; No MOVL #SS$_ACCVIO, R0 ; Signal Error RET ; Die 20$: PROBER #0, R8, (R9) ; Check for read access BNEQ 30$ ; No MOVL #SS$_ACCVIO, R0 ; Signal Error RET ; Die ; Assign a channel to LTA0. This will CLONE us a brand new LTA ; device which we can use for collecting the data. 30$: TSTL LATCHAN ; Do we have one? BNEQ 40$ ; Yes - skip assign $ASSIGN_S CHAN=LATCHAN,- DEVNAM=LATDEVICE BLBS R0,40$ ; RET ; Error 40$: MOVL R8,LATBUFFER_LEN MOVL R9,LATBUFFER MOVL 4(AP),ENTITY $QIOW_G READLAT BLBS R0,50$ RET ; Error 50$: BLBS LATIOSB,60$ MOVL LATIOSB,R0 ; Error is full .long RET ; Error 60$: MOVL LATIOSB+4,@8(AP) ; return len RET .end