• Aucun résultat trouvé

Initiating the Remote Access

Dans le document (Phase III) AA-AV51A-TK (Page 66-69)

6:3 Programming Remote Access

6.5 Initiating the Remote Access

Like task-to-task communication, remote file access requires a handshaking sequence at the beginning of the operation. Not only does DECnet software set up a logical link between the accessing program and the remote F AL, it also exchanges initial DAP messages to prepare for the file operation to be performed over the link.

This extended handshake, which is transparent to the accessing program, happens automatically when the program issues a call to open a remote file.

The form of the open call varies from system to system and from language to language, but the call always provides much of the information exchanged in the handshake. Using the information supplied by the call as well as systemsupplied data about the local file system, the remote access subroutines -either NF ARs or routines in the local file system - generate DAP messages addressed to the remote F AL. In response, the F AL sends back DAP messages to define characteristics of its local file system.

For most remote access operations, the open call issued by the accessing program includes the following information:

• A logical unit or channel number

• A file specification

• Access control information

• Characteristics of the file to be accessed

Depending on the open call's particular function, for example, open for reading or open for appending, the call passes other information as well.

6.5.1 The Logical Unit/Channel Number

The logical unit or channel number serves one and sometimes two purposes in remote file access operations. It identifies the data stream associated with the requested 1'0 operation, and in RSX and lAS nodes, the local NSP module treats the number as the program's logical link identifier.

6-6 Introduction to DECnet

6.5.2 The File Specification

The file specification identifies the remote file to be accessed. Because the remote file system actually carries out the requested file operation, the pro-grammer must know how the file is identified by users in its local node. Table 6-3 shows the file specification formats used by each operating system.

Table 6-3: File Specifications for DIGITAL Operating Systems

Operating System

RSX-llM RSX-llM-PLUS RSX-llS * lAS

VAXNMS

RT-ll

RSTS/E

TOPS-20

File Specification

dev: [ufdlfilename. typ; ver

dev: [directorylfilename. typ;ver or

dev: <directory>filename. typ;ver

dev :filnam. typ

dev: [ppnlfilename. typ

dev: <directory>filename. typo ver

* RSX-llS supports unit record devices only.

Examples

DKO:[200t200JPROG7.MAC:1 MT3: [1 t7JACCNT .DAT; 13 DB1:[300t31GJPEEK.LST;2

DBAO:[HIGGINSJSTAT.FTN;l MTA3:(CHARLES>TEST.DAT.3

RKO:CHART1.DAT SYO:TEXT.RNO

SY:[21Gt212JAFIL.BAS DK1:NEWFIL.COB

MT1:BCKUP.LST

PS(FRED>FISCAL.EXE;l PS:(JDOE>PROD81.LST;12

6.5.3 Access Control Information

The access control information identifies the program to the remote system and consists of:

• A user identification code or name

• A password associated with the user identification

• Additional accounting information as required by the remote system If this information matches an account or guest account entry in the remote system's user file, the program gains access to that system's resources. Like the file specification, the access control information must be recognizable to the remote system, and therefore specified according to its syntax.

Gaining access to the remote system does not guarantee that requested file operations will succeed. In most DIGITAL operating systems, each file has a corresponding protection code that determines the types of access allowed to defined groups of users. The user identification - a code or a name - speci-fied by the accessing program determines the program's group category and therefore determines the types of access it can make to each file.

The RT-ll file system enforces a simpler version of access control and file protection than that used by other DIGITAL file systems. To access files at a DECnet-RT node, a remote user supplies a password, which is either privi-leged or nonpriviprivi-leged. The priviprivi-leged password allows the remote user unre-stricted access to the node's files, whereas the non privileged password allows read and directory access only. Furthermore, if a file is marked protected, privileged and nonprivileged users alike are allowed read access only (see Section 6.7.2).

6.5.4 File Characteristics

The file characteristics define the file to be accessed in the following ways:

• Access method - sequential or random. The accessing program indi-cates how it will access the file. All DIGITAL file systems support sequen-tial access in which each I/O operation reads or writes the next record.

Selected file systems permit random access, which allows the program to access a specific record anywhere in the file (refer to Table 6-2).

• File organization - sequential, relative, or indexed. Sequential file or-ganization means that records in a file are arranged in one after the other fashion. This organization is supported for all types of devices. Relative file organization means that records within a file are identified by a relative record number. This number identifies the record's position relative to the beginning of the file. Indexed organization (RMS only) is a complex file structure that allows both sequential and random access and uses record keys for identification. The keys used to identify individual records are defined at file creation. Relative and indexed organizations are supported for disk devices only.

6-8 Introduction to DECnet

• Data type - ASCII or image. ASCII data is subject to formatting conver-sion by the DECnet software, depending on the data's record attributes (see below). Image data is a stream of bits, to which the software applies no interpretation.

• Record format - fixed length, stream, variable length, or variable with fixed length control (VFC). A VFC record includes a fixed length control field in addition to the variable length data portion.

• Record attributes. This characteristic indicates the type of vertical format control that applies to the file.

Dans le document (Phase III) AA-AV51A-TK (Page 66-69)