rmt.8c
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 8C 代码 · 共 184 行
8C
184 行
.\" SCCSID: @(#)rmt.8c 8.1 9/11/90.TH rmt 8c .SH Namermt \- remote mass storage device protocol module.SH Syntax.B /etc/rmt.SH Description.NXR "rmt program".NXR "file system" "copying across network".NXS "remote mass storage protocol module" "rmt program".NXA "rdump command" "rmt program"The.PN rmtprogram is used by the remote dump and restore programsto manipulate remote mass storage devices and filesthrough an interprocesscommunication connection.The .PN rmtprogram is normally started with an.MS rexec 3xor.MS rcmd 3xcall..PPThe .PN rmtprogram remotely ties its standard input and output to a socket,accepts commands that manipulateremote devices or files, performs the commands, and then responds witha status indication. All commands and responses are in ASCII and inone of two forms. Successful commands have responses ofan acknowledgement (ack) such as:.PP.ti +0.5i\fBA\fInumber\fR\en.PPIn this example, .I numberis an ASCII representation of a decimal number.Unsuccessful commands are responded to with the following:.PP.ti +0.5i\fBE\fIerror-number\fR\en\fIerror-message\fR\en,.PPIn this example, .I error-numberis one of the possible errornumbers described in.MS intro 2and.I error-messageis the corresponding error string as printedfrom a call to.MS perror 3 .The protocol is comprised of thefollowing commands (a newline (\\n)is present between each token):.NXR "rmt program" "commands".TP 17\fBO \fIdevice mode\fROpen the specified .I deviceusing the indicated.IR mode .The .I deviceis a full pathname and.I modeis an ASCII representation of a decimalnumber suitable for passing to.MS open 2 .If a device had already been opened, it isclosed before a new open is performed.Device can be a regular file..TP 17\fBC \fIdevice\fRClose the currently open device or file. The.I devicespecified is ignored..TP 17.B DReturns generic device information for the open device. ADEVIOCGET.MS ioctl 2 call is performed and the data returned. If the operationis successful, an ``ack'' is sent with the size of the informationbuffer..TP 17\fBL \fIwhence offset\fRPerform an.MS seek 2operation using the specified parameters.The response value is that returned from the.PN lseekcall..TP 17.B PReturns disk partition information of the open device. ADIOCDGTPT.MS ioctl 2call is performed and the data returned. If the operationis successful, an ``ack'' is sent with the size of the informationbuffer..TP 17\fBT \fIfilename\fRReturns file status information for the specified file. A.MS stat 2call is performed and the data returned. If the operationis successful, an ``ack'' is sent with the size of the informationbuffer..TP 17\fBW \fIcount\fRWrite data onto the open device.The.PN rmtprogram reads.I countbytes from the connection, aborting ifa premature end-of-file is encountered.The response value is that returned fromthe.MS write 2call.If the operation was successful, an ``ack'' is sent containingthe number of bytes written..TP 17\fBR \fIcount\fRRead.I countbytes of data from the open device.If.I countexceeds the size of the data buffer (10 kilobytes), it istruncated to the data buffer size.The.PN rmtprogram then performs the requested .MS read 2and responds with \fBA\fIcount-read\fR\en if the read wassuccessful. Otherwise an error in thestandard format is returned. If the readwas successful, the data read is then sent..TP 17\fBI \fIoperation count\fRPerform a MTIOCTOP .MS ioctl 2command using the specified parameters.The parameters are interpreted as theASCII representations of the decimal valuesto place in the .I mt_opand.I mt_countfields of the structure used in the.PN ioctlcall. The return value is the.I countparameter when the operation is successful..TP 17.B SReturn the status of the open device, asobtained with a MTIOCGET .PN ioctlcall. If the operation was successful,an ``ack'' is sent with the size of thestatus buffer, then the status buffer issent (in binary)..PPAny other command causes .PN rmtto exit..SH Restrictions.NXR "rmt program" "restricted"Do not use .PN rmtfor a remote file access protocol..SH DiagnosticsAll responses are of the form described above..SH See Alsorcmd(3x), rexec(3x), mtio(4), rdump(8c), rrestore(8c)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?