2 * Based on cfs.h from Coda, but revamped for increased simplicity.
3 * Linux modifications by Peter Braam, Aug 1996
4 * Rewritten for InterMezzo
7 #ifndef _PRESTO_HEADER_
8 #define _PRESTO_HEADER_
13 #define ASYNCHRONOUS 1
15 int lento_permit(int minor, int pathlen, int fsetnamelen, char *path, char *fset);
16 int lento_opendir(int minor, int pathlen, char *path, int async);
17 int lento_kml(int minor, unsigned int offset, unsigned int first_recno,
18 unsigned int length, unsigned int last_recno, int namelen,
20 int lento_open(int minor, int pathlen, char *path);
21 int lento_journal(int minor, char *page, int async);
22 int lento_release_permit(int minor, int cookie);
25 * Kernel <--> Lento communications.
28 #define LENTO_PERMIT 1
29 #define LENTO_JOURNAL 2
30 #define LENTO_OPENDIR 3
32 #define LENTO_SIGNAL 5
34 #define LENTO_COOKIE 7
36 /* Lento <-> Presto RPC arguments */
39 unsigned int unique; /* Keep multiple outstanding msgs distinct */
40 u_short pid; /* Common to all */
44 /* This structure _must_ sit at the beginning of the buffer */
45 struct lento_down_hdr {
52 struct lento_permit_in {
53 struct lento_up_hdr uh;
58 struct lento_permit_out {
59 struct lento_down_hdr dh;
64 struct lento_opendir_in {
65 struct lento_up_hdr uh;
70 struct lento_opendir_out {
71 struct lento_down_hdr dh;
77 struct lento_up_hdr uh;
79 unsigned int first_recno;
81 unsigned int last_recno;
86 struct lento_kml_out {
87 struct lento_down_hdr dh;
92 struct lento_open_in {
93 struct lento_up_hdr uh;
97 struct lento_open_out {
98 struct lento_down_hdr dh;
101 /* lento_response_cookie */
102 struct lento_response_cookie_in {
103 struct lento_up_hdr uh;
107 struct lento_response_cookie_out {
108 struct lento_down_hdr dh;
113 struct lento_down_hdr dh;
121 /* NB: every struct below begins with an up_hdr */
123 struct lento_up_hdr uh;
124 struct lento_permit_in lento_permit;
125 struct lento_open_in lento_open;
126 struct lento_opendir_in lento_opendir;
127 struct lento_kml_in lento_kml;
128 struct lento_response_cookie_in lento_response_cookie;
132 struct lento_down_hdr dh;
133 struct lento_permit_out lento_permit;
134 struct lento_open_out lento_open;
135 struct lento_opendir_out lento_opendir;
136 struct lento_kml_out lento_kml;
137 struct lento_response_cookie_out lento_response_cookie;
140 #include "intermezzo_psdev.h"
142 int lento_upcall(int minor, int read_size, int *rep_size,
143 union up_args *buffer, int async,
144 struct upc_req *rq );