Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MAGTAPE protocol. #8

Open
larsbrinkhoff opened this issue Nov 2, 2023 · 0 comments
Open

Add support for MAGTAPE protocol. #8

larsbrinkhoff opened this issue Nov 2, 2023 · 0 comments

Comments

@larsbrinkhoff
Copy link
Member

@ams wrote:

;; Our RFC packet (to contact name MAGTAPE) contains
;; MAGTAPE r devname
;; r = "R" or "W" saying whether to open for read or for read/write.
;; devname = magtape device name.

;; Following that, we get packets with opcode 200 with data to write on tape,
;; or 201 containing commands.

;; 200 is simple: the data in the packet is written.

;; The data is written into records of a fixed size, regardless of packet boundaries.
;; The record size is specified by the set record size command.
;; You can write a smaller record by sending as much data as you want,
;; followed by a force-output command.

;; We do not reply to data packets.
;; Every so often, you should send an output-status inquiry command
;; to find out whether the output data got an error (such as end of tape).
;; All data packets past the error are ignored, and the reply to the
;; output-status command tells you how many packets were handled (not ignored)
;; which will tell you where the error occurred.

;; The error code returned by the output-status inquiry describes the
;; success, or reason for failure, of the output data packets.
;; If the error code is %ereot (end of tape), then the data in the packet
;; that got the error was all written properly, but following packets were ignored.
;; You should send a couple of write tape mark commands to finish the tape.

;; 201 packets are formatted as follows:

;; Four 8-bit bytes, the first of which contains a command code
;; and the next three of which are a transaction code.

;; Arguments to the command occupy four bytes each,
;; and they are turned into numbers by using the earlier bytes
;; as the less significant bits of the number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant