{ PASCAL-3 DECNET PACKAGE Version: V1.0 File:[22,320]DECNET.PKG Last Edit: jmb - 11-AUG-1988 23:04:09 Author: Jim Bostwick 11-AUG-1988 History: Currently, this file is simply a concatenation of the individual NTxxx.EXT files. It should be rebuild whenever one of the EXTs changes. The hassle is balanced by much quicker compile times, owing to the reduced number of file opens. ( the compiler opens each include file several times during it's various passes) } { Version: 1.0 File:[22,320]NET.TYP Author: Jim Bostwick Last Edit: jmb - 11-AUG-1988 23:10:09 History: This file contains DECnet definitions for OMSI Pascal-2. } {[a+,b+,l-,k+,r+] Pasmat } {*USER* There are two 'connect blocks' used by DECnet. The Net_request_block is used with outbound connections (e.g. calling task initiates the link). The Net_Connect_block is used for inbound connections (e.g. calling program accepts the link). Although DECnet-M-PLUS V4.0 supports both 'long' and 'short' connect blocks, PASUTL only uses the 'long' form. } CONST Net_Reqb_len = 76; { Connect request block used with NTCON = 152. bytes } Net_Conb_len = 98; { Connect block used with NTGND = 196. bytes } TYPE Net_Request_block = Array [1..Net_Reqb_len] of Word; Net_Connect_block = Array [1..Net_conb_len] of Word; { DECnet IOSB codes. These constants have been extracted from macro NSSYM$ in NETLIB.MLB. They define various error and status codes. Names have been constructed as follows: 1. Prefix all with "Net_". 2. Convert embedded "." in MACRO symbol name to "_". Example: VS.NPV --> Net_VS_NPV (verified, non-priv user) } CONST { Network Object Numbers } Net_NO_TAS = 0B; { General task, user process } Net_NO_FA1 = 1B; { File Access Listener (V1) } Net_NO_TC1 = 5B; { Task Control Listener (V1) } Net_NO_TCL = 17B; { Task Control Listener } Net_NO_TLK = 20B; { TALK utility } Net_NO_FAL = 21B; { File Access Listener } Net_NO_RTL = 22B; { Remote task loader } Net_NO_NCU = 23B; { Network control utility executor } Net_NO_DTR = 77B; { DECnet test receiver } Net_NT_LCB = 1B; { Long connect block } { Network Event Codes } Net_NT_CON = 1B; { Connect } Net_NT_INT = 2B; { Interrupt message } Net_NT_DSC = 3B; { User synchronous disconnect } Net_NT_ABT = 4B; { User abort } Net_NT_ABO = 5B; { Network abort } Net_NT_EVT = 6B; { Network event } Net_NT_VFY = 7B; { Network verification event } Net_NT_MOP = 10B; { MOP event } Net_NT_NSP = 10B; { NSP event (CCB only). same as NT.MOP } { Verification Status } Net_VS_NPV = 1B; { Verified, non-privileged user } Net_VS_PRV = 2B; { Verified, privileged user } Net_VZ_NVD = 0B; { No verification performed } Net_VE_FAI = -1; { Verification failed } { Phase III Session Control error reason codes returned with REJECT (REJ) or DISCONNECT (DSC) } Net_NE$RES = 1; { Resource allocation failure (REJ) } Net_NE$NOD = 2; { Destination node name does not map to a node address (rej) } Net_NE$NSR = 3; { Remote node shutting down (REJ) } Net_NE$UOB = 4; { Destination process does not exist (REJ) } Net_NE$FMT = 5; { Invalid format for object specification (REJ) } Net_NE$MLB = 6; { Mailbox full for queuing message to object or too many connects to object (REJ) } Net_NE$ABM = 8; { Link aborted by management (DSC) } Net_NE$NNF = 10; { Node name format error (REJ) } Net_NE$NSL = 11; { Local node shutting down (REJ) } Net_NE$ACC = 34; { Access not permitted - unacceptable RQSTRID / PASSWORD ETC.(REJ) } Net_NE$ABO = 38; { No response from object (REJ/DSC) } Net_NE$COM = 39; { Unable to communicate with node (REJ/DSC) } { Standard RSX Error Codes } { These error codes are standard RSX IOERR$ codes, with special meaning for DECnet. } Net_IS_SUC = 1; { Success } Net_IS_DAO = 2; { Success, but some data lost. } Net_IE_BAD = -1; { invalid buffer parameter, or data length > 16. } Net_IE_SPC = -6; { Invalid buffer parameters, buffer not word-aligned, illegal address space, buffer > 8128. words } Net_IE_WLK = -12; { Transmission of interrupt message before last one completed } Net_IE_DAO = -13; { Data overrun; unstored data was lost. } Net_IE_ABO = -15; { Link aborted or disconnected } Net_IE_PRI = -16; { Net not accessed on this LUN } Net_IE_RSU = -17; { Required system resources not available } Net_IE_ALN = -34; { Specified LUN already established. } Net_IE_NLN = -37; { No active link on Specified LUN } Net_IE_URJ = -73; { Remote task rejected connect attempt } Net_IE_NRJ = -74; { Network rejected connect attempt } Net_IE_NDA = -78; { There is no data available } Net_IE_NNT = -94; { The issuing task not a network tas; NTOPN not executed successfully } Procedure NTABT ( Lun: Integer; efn: Event_flag; msg: CH16; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Immediately abort specified logical link. All pending traffic on the link is killed, and the LUN freed. EFN is required (do NOT use f0), and is set when the abort completes (will be set upon return). MSG is an optional user data string which is sent to the other end of the link as part of the disconnect message. It may be of zero length (in-use length). It is recommended that an empty type-0 string be used if no user message is desired. Control returns when the abort completes. } Procedure NTACC ( lun:integer; efn:event_flag; VAR conb:Net_Connect_block; VAR msg:CH16; VAR iosb:Io_status_block ); EXTERNAL; {*USER* Directs DECnet software to complete the logical link request from a remote task, using LUN. CONB is the connect block filled in by a previous NTGND or NTGNDW call. MSG contains user message returned to the remote task. } Procedure NTCLS ( Lun: Integer; Efn: Event_flag; VAR Iosb: Io_Status_block ); EXTERNAL; {*USER* This call ends all task network activity. All open logical links are aborted, and all network luns are freed. Most pending network activity is discarded. If incomming connect requests are in the network data queue, the task is rescheduled. } Procedure NTCON ( lun: integer; EFN: Event_flag; Out_MSG: CH16; { user message sent to remote task } VAR Conb: Net_request_block; VAR In_MSG: CH16; VAR IOSB: Io_Status_block ); EXTERNAL; {*USER* Request a logical link with remote task. Build Conb with call to NTCONB prior to invoking NTCON. OUT_MSG contains user data sent to remote task (it get's it in the NTGND call). In_MSG will receive data sent by the remote task in it's NTACC call. } Procedure NTCONB ( node: Ch6; obj: byte; task: packed array [lo..hi:integer] of char; VAR conb: Net_Request_block; VAR Stat: Integer ); EXTERNAL; {*USER* Builds a network connect block in CONB. The connect block is in a format suitable for DECnet - no attempt has been made to map it's contents to Pascal. NODE specifies the remote node name. OBJ is the remote object number to be connected to. Specify 0 (zero) for named objects, or an object number (1..255). If OBJ is zero, TASK must be specified. TASK is the remote task name for OBJ=0 connections. It is ignored if OBJ is not zero. Although specified as a conformant array parameter, TASK must be less than or equal to 16. characters. } Procedure NTGND ( lun: Integer; EFN: Event_flag; VAR Conb: Net_Connect_block; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Retrieve data from local task's network data queue, and store in CONB. IOSB defines type of data received. See DECnet-M-PLUS Programmer's Reference Manual for definitions. Various useful constants, defined in DECNET.TYP, can help crack the IOSB return codes. } Procedure NTOPN ( lun: Integer; efn: Event_flag; links: integer; wait_recover: integer; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Must be the first network call (other than NTCONB) issued by a task. Establishes the task as an active network task. LUN specifies the network mailbox lun, which will receive all network messages (as opposed to network data) for all links for this task. EFN will be set when the OPN$ call completes. LINKS sets the maximum number of simultaneous links for the task. DECnet will reject connect requests which would exceed LINKS without notifying the task. Specify zero (0) for NO limit on the links. WAIT_RECOVER specifies the number of minutes (0..32767.) for DECnet to wait after physical link loss before aborting the logical links. Normally, a small value (< 5 min. ) will suffice. A value of zero specifies that the logical link(s) are to be aborted 'immediately' upon physical link loss. } Procedure NTREC ( Lun: Integer; Efn: Event_Flag; Buff: Address; Bufflen: Integer; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Receive data over established logical link. BUFF will receive the data. BUFFLEN specifies the buffer size, and must be in the range 1..8192. bytes. LUN specifies the unit used in the NTCON or NTACC call, *NOT* the network mailbox lun! } Procedure NTREJ ( lun: Integer; efn: Event_flag; msg: CH16; VAR Conb: Net_connect_block; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Use to reject a link request from a remote task. MSG is user data which will be sent to the requestor. CONB was initialized by the NTGND call. } Procedure NTSND ( lun: Integer; efn: Event_flag; Buff: Address; Blen: Integer; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Send the contents of BUFF over logical link active on LUN. BLEN is length in bytes of buffer, range 1..8128. } Procedure NTXMI ( lun: Integer; EFN: Event_flag; MSG: CH16; VAR IOSB: IO_Status_block ); EXTERNAL; {*USER* Sends an interrupt message over the link active on LUN. The message goes to the remote task's network data queue, and must be retrieved by the target task via a GND call. Only one XMI message can be pending on a given logical link at one time. MSG is the user data placed in the target task network data queue. }