Plan B User's Manual


getmem, putmem ­ Transfer box contents.


getmemrq box off len
getmemrep box off len bytes
statusrep err
putmemrq box off len bytes
statusrep err


Theses RPC are issued by the implementation of copy(2) and also to service copy(5) requests.

Beware that they are not like read/write on other systems; the differences will hopefully be clear after reading this manual page. Getmem is issued to obtain the contents of a box—which happens whenever the destination of a copy(2) is not a local box, as a result of the copy(5) request.

Putmem is issued to send the contents of a box to the destination— which happens whenever the destination of a copy(2) request is not local.

Both Getmem and putmem transfer box contents and there can be a series of requests followed by a series of replies for a single copy(5) request. The series is terminated when less than a full packet (i.e. less than MAXBYTES bytes) is sent; if necessary, an empty packet is sent to terminate the series when the total box size is a multiple of the packet size.

Both packet types are meant to transfer entire boxes, starting with a packet at offset 0, and terminating with a not-full packet; they are not meant to tranfer some bytes starting at a given offset.

See also

copy(2), copy(5).


Only copies of less than MAXBYTES are atomic.

Plan B User's Manual. First edition.