The kdosd daemon, inspired by Dave Kim's Middleman Server, provides across-card access to the KDOS file system via MEDS mailboxes.
kdosd is structured as follows:
Create a COMMAND mailbox.
DO FOREVER
Read a command message from the COMMAND mailbox.
Decode the message and process the command.
Format a response message.
Attach to the client's RESPONSE mailbox.
Write the response message to the RESPONSE mailbox.
ENDDO
Command messages are ASCII strings with the following format:
"tag responseMailbox operation [argument(s)]"
where
void * pointer.
After processing the command, kdosd formats a response message containing the client's command tag and the completion status:
"tag status value [optionalText]"
where
errno status of processing the command.
| Command: | "tag responseMailbox CLOSE fd" |
| Response: | "tag errno status" |
| Command: | "tag responseMailbox DELETE fileSpec" |
| Response: | "tag errno status" |
| Command: | "tag responseMailbox LIST index buffer maxBytes offset whence" |
| Response: | "tag errno status" |
| Command: | "tag responseMailbox OPEN fileName flags" |
| Response: | "tag errno fd" |
| Command: | "tag responseMailbox READ fd buffer maxBytes offset whence" |
| Response: | "tag errno numBytesRead" |
| Command: | "tag responseMailbox RENAME oldName newName" |
| Response: | "tag errno status" |
| Command: | "tag responseMailbox STAT fileName buffer" |
| Response: | "tag errno status" |
| Command: | "tag responseMailbox WRITE fd buffer numBytes offset whence" |
| Response: | "tag errno numBytesWritten" |
The tag and buffer arguments are decoded using the "%p" format. The buffer argument should be a VME address accessible by kdosd.
% kdosd [-debug] [-vperror]
where
-debug- enables debug output (written to stdout).
-vperror- turns
vperror()message output on.vperror()messages are low-level error messages generated by libgpl functions; normally, they are disabled. If enabled, the messages are output to stderr.