PROCEDURE GetLnk(VAR Out_Msg: Message_rec; VAR L: Integer); EXTERNAL; {*USER* Procedure searches the link table for an entry matching the given node name. If not found, search for an unused table entry, and attempt to open a link using that entry. Return table index in L, or 0 if both table full and no match found. NOTE: In a later version, throw out least recently used link to make room if necessary. This version just returns 0. When opening a link, attempt translation of logical "MSG$node". If it does NOT translate, use destination task of "AMIRTR". If it DOES translate, parse return string of form node::task for real node name and task. Open link to these, but place original node name in the link record. This 'indirection' is useful for debug on a single node, and may have other uses as well. [ aside from the obvious use of confusing the hell out of appication programmers :^) ] In sum, the two logicals for message redirection are: MSG$node (used by MSINIT in user task) = :: to_node is destination node - will be placed in msg header via_router is router task on LOCAL node to handle traffic RTR$node (used here in the router task) = :: real_node is node name handling traffic for - may be same. remote_router is router task at REMOTE node to handle traffic Together, these allow various combinations of special routers and re-directed traffic. In particular, the following: * LOCAL is local node, ROUTER is normal router task REMOTE is remote node. 1. To use an alternate router on local node: MSG$node = node::ALTRTR (traffic for 'node' is handled by local router 'ALTRTR') 2. To use an alternate remote router: RTR$node = node:ALTRTR ( traffic for 'node' is handled by router 'ALTRTR' on 'node') 3. To re-direct traffic destined for node 'FUBAR' to node 'BLECH' MSG$FUBAR = BLECH::ROUTER (task level) - or - RTR$FUBAR = BLECH::ROUTER (router level) Note: if a remote node is redirected to the local node, task level redirection will send message to router, who will use VSDA (NOT DECNET) to forward it to the destination. However, if router-level redirection is used, the router WILL attempt a DECNET link back to the local node. A Router task can NOT talk to itself! Therefore, alternate router task MUST be installed on local node, and used in the router level redirection. }