1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12procedure FileServerInterface { 13 /* open a file returning a file descriptor. flags and return codes are the same as 14 * posix 'open' syscall. Actual flags supported dependent upon file server implementation */ 15 int open(in string name, in int flags); 16 /* read from an opened file. content is placed into the clients shared memory buffer */ 17 ssize_t read(in int fd, in size_t size); 18 /* seek inside the file stream. this is equivalent to lseek64 */ 19 int64_t seek(in int fd, in int64_t offset, in int whence); 20 /* close an open file */ 21 int close(in int fd); 22}; 23