Coda Distributed File System
coda-src
venus
9pfs.h
Go to the documentation of this file.
1
/* BLURB gpl
2
3
Coda File System
4
Release 8
5
6
Copyright (c) 2018-2021 Carnegie Mellon University
7
Additional copyrights listed below
8
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU General Public Licence Version 2, as shown in the
11
file LICENSE. The technical and financial contributors to Coda are
12
listed in the file CREDITS.
13
14
Additional copyrights
15
none currently
16
17
#*/
18
19
/*
20
* This header defined plan 9 file system specific datatypes and constants.
21
* It will probably not be of much use to any code outside of 9pfs.cc
22
*/
23
24
#ifndef _VENUS_9PFS_H_
25
#define _VENUS_9PFS_H_ 1
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
#include <sys/types.h>
32
#include <stdint.h>
33
34
/* Magic to detect an incoming Tversion request message */
35
#define P9_MAGIC_LEN 19
36
// @ offset 1, assume message len < 256, opcode Tversion, tag NOTAG
37
const
unsigned
char
p9_magic1
[] =
"\0\0\0d"
;
// \377\377";
38
// @ offset 12, assume version len < 256, version string "9P2000"
39
const
unsigned
char
p9_magic12
[] =
"\09P2000"
;
40
41
/* Every message starts with a four byte message size which includes the size
42
* field itself, a one byte message type and a two byte identifying tag. The
43
* following tries to document the various messages in the 9P protocol, as
44
* seen in http://man.cat-v.org/plan_9/5/intro */
45
enum
plan9_message_types
46
{
47
/* Negotiate protocol version */
48
Tversion
= 100,
/* tag[2] msize[4] s[2] version[s] */
49
Rversion
,
/* tag[2] msize[4] s[2] version[s] */
50
/* Authenticate */
51
Tauth
= 102,
/* legacy: tag[2] afid[4] s[2] uname[s] s[2] aname[s] */
52
/* 9p2000.u: tag[2] afid[4] s[2] uname[s] s[2] aname[s]
53
n_uname[4] */
54
Rauth
,
/* tag[2] aqid[13] */
55
/* Establish a connection */
56
Tattach
= 104,
/* legacy: tag[2] fid[4] afid[4] s[2] uname[s]
57
s[2] aname[s] */
58
/* 9p2000.u: tag[2] fid[4] afid[4] s[2] uname[s]
59
s[2] aname[s] n_uname[4] */
60
Rattach
,
/* tag[2] qid[13] */
61
/* Return an error */
62
Terror
,
/* illegal */
63
Rerror
= 107,
/* legacy: tag[2] s[2] ename[s] */
64
/* 9P2000.u: tag[2] s[2] ename[s] errno[4] */
65
/* Abort a message */
66
Tflush
= 108,
/* tag[2] oldtag[2] */
67
Rflush
,
/* tag[2] */
68
/* Traverse a directory hierarchy */
69
Twalk
= 110,
/* tag[2] fid[4] newfid[4] nwname[2] nwname*(s[2] wname[s]) */
70
Rwalk
,
/* tag[2] nwqid[2] nwqid*(wqid[13]) */
71
/* Open a handle for an existing file */
72
Topen
= 112,
/* tag[2] fid[4] mode[1] */
73
Ropen
,
/* tag[2] qid[13] iounit[4] */
74
/* Prepare a handle for a new file */
75
Tcreate
= 114,
/* legacy: tag[2] fid[4] name[s] perm[4] mode[1] */
76
/* 9P2000.u: tag[2] fid[4] name[s] perm[4] mode[1] extension[s] */
77
Rcreate
,
/* tag[2] qid[13] iounit[4] */
78
/* Read from file handle */
79
Tread
= 116,
/* tag[2] fid[4] offset[8] count[4] */
80
Rread
,
/* tag[2] count[4] data[count] */
81
/* Write to file handle */
82
Twrite
= 118,
/* tag[2] fid[4] offset[8] count[4] data[count] */
83
Rwrite
,
/* tag[2] count[4] */
84
/* Forget about file handle */
85
Tclunk
= 120,
/* tag[2] fid[4] */
86
Rclunk
,
/* tag[2] */
87
/* Remove file from server */
88
Tremove
= 122,
/* tag[2] fid[4] */
89
Rremove
,
/* tag[2] */
90
/* Get file attributes */
91
Tstat
= 124,
/* tag[2] fid[4] */
92
Rstat
,
/* tag[2] n[2] stat[n] */
93
/* Update file attributes */
94
Twstat
= 126,
/* tag[2] fid[4] n[2] stat[n] */
95
Rwstat
,
/* tag[2] */
96
};
97
98
enum
plan9_dotl_message_types
99
{
100
Rlerror
= 7,
/* errno[4] */
101
Tstatfs
= 8,
/* fid[4] */
102
Rstatfs
,
/* struct p9_statfs[] */
103
Tlopen
= 12,
/* fid[4] flags[4] */
104
Rlopen
,
/* qid[13] iounit[4] */
105
Tlcreate
= 14,
/* fid[4] name[s] flags[4] mode[4] gid[4] */
106
Rlcreate
,
/* qid[13] iounit[4] */
107
Tsymlink
= 16,
/* fid[4] name[s] symtgt[s] gid[4] */
108
Rsymlink
,
/* qid[13] */
109
Tmknod
= 18,
/* not supported */
110
Rmknod
,
111
Trename
= 20,
/* fid[4] dfid[4] name[s] */
112
Rrename
,
113
Treadlink
= 22,
/* fid[4] */
114
Rreadlink
,
/* target[s] */
115
Tgetattr
= 24,
/* fid[4] request_mask[8] */
116
Rgetattr
,
/* valid[8] struct p9_stat_dotl[] */
117
Tsetattr
= 26,
/* fid[4] valid[4] mode[4] uid[4] gid[4] size[8]
118
atime_sec[8] atime_nsec[8] mtime_sec[8] mtime_nsec[8]
119
*/
120
Rsetattr
,
121
Txattrwalk
= 30,
/* not supported */
122
Rxattrwalk
,
123
Txattrcreate
= 32,
/* not supported */
124
Rxattrcreate
,
125
Treaddir
= 40,
/* fid[4] offset[8] count[4] */
126
Rreaddir
,
/* count[4] data[count]
127
direntry format: qid[13] offset[8] type[1] name[s] */
128
Tfsync
= 50,
/* fid[4] */
129
Rfsync
,
130
Tlock
= 52,
/* not supported */
131
Rlock
,
132
Tgetlock
= 54,
/* not supported */
133
Rgetlock
,
134
Tlink
= 70,
/* dfid[4] fid[4] name[s] */
135
Rlink
,
136
Tmkdir
= 72,
/* dfid[4] name[s] mode[4] gid[4] */
137
Rmkdir
,
/* qid[13] */
138
Trenameat
= 74,
/* olddirfid[4] oldname[s] newdirfid[4] newname[s] */
139
Rrenameat
,
140
Tunlinkat
= 76,
/* dirfd[4] name[s] flags[4] */
141
Runlinkat
,
142
};
143
144
/* Plan9 protocol version */
145
#define P9_PROTO_UNKNOWN 0x00
146
#define P9_PROTO_2000 0x01
/* 9P2000 Legacy protocol */
147
#define P9_PROTO_DOTU 0x02
/* 9P2000.u Unix Extensions */
148
#define P9_PROTO_DOTL 0x04
/* 9P2000.L Linux Extensions */
149
150
#define P9_NOTAG ((uint16_t)~0)
/* version message should use 'NOTAG' */
151
#define P9_NOFID ((uint32_t)~0)
/* noauth attach uses 'NOFID' for 'afid' */
152
#define P9_MAX_NWNAME 16
/* max elements in walk message */
153
154
/* size of 9pfs message header */
155
#define P9_MIN_MSGSIZE (sizeof(uint32_t) + sizeof(uint8_t) + sizeof(uint16_t))
156
157
/* 9P permission mode filetype bits */
158
#define P9_DMDIR 0x80000000
159
#define P9_DMAPPEND 0x40000000
/* unsupported */
160
#define P9_DMEXCL 0x20000000
/* unsupported */
161
#define P9_DMMOUNT 0x10000000
/* unsupported */
162
#define P9_DMAUTH 0x08000000
163
#define P9_DMTMP 0x04000000
/* unsupported */
164
/* 9P2000.u extensions */
165
#define P9_DMSYMLINK 0x02000000
166
#define P9_DMLINK 0x01000000
167
#define P9_DMDEVICE 0x00800000
/* unsupported */
168
#define P9_DMNAMEDPIPE 0x00200000
/* unsupported */
169
#define P9_DMSOCKET 0x00100000
/* unsupported */
170
#define P9_DMSETUID 0x00080000
/* unsupported */
171
#define P9_DMSETGID 0x00040000
/* unsupported */
172
#define P9_DMSETVTX 0x00010000
/* unsupported */
173
174
/* 9P qid.types = higher byte of permission modes */
175
#define P9_QTDIR 0x80
176
#define P9_QTAPPEND 0x40
/* unsupported */
177
#define P9_QTEXCL 0x20
/* unsupported */
178
#define P9_QTMOUNT 0x10
/* unsupported */
179
#define P9_QTAUTH 0x08
180
#define P9_QTTMP 0x04
/* unsupported */
181
#define P9_QTSYMLINK 0x02
182
#define P9_QTLINK 0x01
183
#define P9_QTFILE 0x00
184
185
/* Plan9 open/create flags */
186
#define P9_OREAD 0x00
187
#define P9_OWRITE 0x01
188
#define P9_ORDWR 0x02
189
#define P9_OEXEC 0x03
190
#define P9_OTRUNC 0x10
191
#define P9_OREXEC 0x20
/* unsupported */
192
#define P9_ORCLOSE 0x40
/* unsupported */
193
#define P9_OAPPEND 0x80
194
#define P9_OEXCL 0x1000
/* unsupported */
195
196
/* 9p2000.L open flags */
197
#define P9_DOTL_RDONLY 00000000
198
#define P9_DOTL_WRONLY 00000001
199
#define P9_DOTL_RDWR 00000002
200
#define P9_DOTL_NOACCESS 00000003
201
#define P9_DOTL_CREATE 00000100
202
#define P9_DOTL_EXCL 00000200
/* unsupported */
203
#define P9_DOTL_NOCTTY 00000400
204
#define P9_DOTL_TRUNC 00001000
205
#define P9_DOTL_APPEND 00002000
206
#define P9_DOTL_NONBLOCK 00004000
207
#define P9_DOTL_DSYNC 00010000
/* unsupported */
208
#define P9_DOTL_FASYNC 00020000
/* unsupported */
209
#define P9_DOTL_DIRECT 00040000
/* unsupported */
210
#define P9_DOTL_LARGEFILE 00100000
211
#define P9_DOTL_DIRECTORY 00200000
212
#define P9_DOTL_NOFOLLOW 00400000
213
#define P9_DOTL_NOATIME 01000000
/* unsupported */
214
#define P9_DOTL_CLOEXEC 02000000
/* unsupported */
215
#define P9_DOTL_SYNC 04000000
/* unsupported */
216
217
/* 9p2000.L unlinkat flags */
218
#define P9_DOTL_AT_REMOVEDIR 0x200
219
220
struct
plan9_qid
{
221
uint8_t
type
;
222
uint32_t
version
;
223
uint64_t
path
;
224
};
225
226
struct
plan9_stat
{
227
//uint16_t size; // we compute this as needed
228
uint16_t
type
;
229
uint32_t
dev
;
230
struct
plan9_qid
qid
;
231
uint32_t
mode
;
232
uint32_t
atime
;
233
uint32_t
mtime
;
234
uint64_t
length
;
235
char
*
name
;
236
char
*
uid
;
237
char
*
gid
;
238
char
*
muid
;
239
// fields for 9p2000.u extensions:
240
char
*
extension
;
/* data about special files (links, devices, pipes,...) */
241
uid_t
n_uid
;
/* numeric IDs */
242
gid_t
n_gid
;
243
uid_t
n_muid
;
244
};
245
246
/* Plan9 stat "don't touch" values for writing stat */
247
#define P9_DONT_TOUCH_TYPE ((uint16_t)(-1))
248
#define P9_DONT_TOUCH_DEV ((uint32_t)(-1))
249
#define P9_DONT_TOUCH_QID_TYPE ((uint8_t)(-1))
250
#define P9_DONT_TOUCH_QID_VERS ((uint32_t)(-1))
251
#define P9_DONT_TOUCH_QID_PATH ((uint64_t)(-1))
252
#define P9_DONT_TOUCH_MODE ((uint32_t)(-1))
253
#define P9_DONT_TOUCH_ATIME ((uint32_t)(-1))
254
#define P9_DONT_TOUCH_MTIME ((uint32_t)(-1))
255
#define P9_DONT_TOUCH_LENGTH ((uint64_t)(-1))
256
#define P9_DONT_TOUCH_NAME ""
257
#define P9_DONT_TOUCH_UID ""
258
#define P9_DONT_TOUCH_GID ""
259
#define P9_DONT_TOUCH_MUID ""
260
// fields for 9p2000.u extensions:
261
#define P9_DONT_TOUCH_EXTENSION ""
262
#define P9_DONT_TOUCH_NUID ((uint32_t)(-1))
263
#define P9_DONT_TOUCH_NGID ((uint32_t)(-1))
264
#define P9_DONT_TOUCH_NMUID ((uint32_t)(-1))
265
266
struct
plan9_stat_dotl
{
267
struct
plan9_qid
qid
;
268
uint32_t
st_mode
;
269
uid_t
st_uid
;
270
gid_t
st_gid
;
271
uint64_t
st_nlink
;
272
uint64_t
st_rdev
;
273
uint64_t
st_size
;
274
uint64_t
st_blksize
;
275
uint64_t
st_blocks
;
276
uint64_t
st_atime_sec
;
277
uint64_t
st_atime_nsec
;
278
uint64_t
st_mtime_sec
;
279
uint64_t
st_mtime_nsec
;
280
uint64_t
st_ctime_sec
;
281
uint64_t
st_ctime_nsec
;
282
/* reserved for future use */
283
uint64_t
st_btime_sec
;
284
uint64_t
st_btime_nsec
;
285
uint64_t
st_gen
;
286
uint64_t
st_data_version
;
287
};
288
289
/* bits for request_mask[8] and valid[8] in dotl Tgetattr and Rgetattr msgs */
290
#define P9_GETATTR_MODE 0x00000001ULL
291
#define P9_GETATTR_NLINK 0x00000002ULL
292
#define P9_GETATTR_UID 0x00000004ULL
293
#define P9_GETATTR_GID 0x00000008ULL
294
#define P9_GETATTR_RDEV 0x00000010ULL
295
#define P9_GETATTR_ATIME 0x00000020ULL
296
#define P9_GETATTR_MTIME 0x00000040ULL
297
#define P9_GETATTR_CTIME 0x00000080ULL
298
#define P9_GETATTR_INO 0x00000100ULL
299
#define P9_GETATTR_SIZE 0x00000200ULL
300
#define P9_GETATTR_BLOCKS 0x00000400ULL
301
//reserved for future use
302
#define P9_GETATTR_BTIME 0x00000800ULL
303
#define P9_GETATTR_GEN 0x00001000ULL
304
#define P9_GETATTR_DATA_VERSION 0x00002000ULL
305
//masks
306
#define P9_GETATTR_BASIC 0x000007ffULL
/* Mask for fields up to BLOCKS */
307
#define P9_GETATTR_ALL 0x00003fffULL
/* Mask for All fields above */
308
309
/* bits for valid[4] in dotl Tsetattr msgs */
310
#define P9_SETATTR_MODE 0x00000001UL
311
#define P9_SETATTR_UID 0x00000002UL
312
#define P9_SETATTR_GID 0x00000004UL
313
#define P9_SETATTR_SIZE 0x00000008UL
314
#define P9_SETATTR_ATIME 0x00000010UL
315
#define P9_SETATTR_MTIME 0x00000020UL
316
#define P9_SETATTR_CTIME 0x00000040UL
317
#define P9_SETATTR_ATIME_SET 0x00000080UL
318
#define P9_SETATTR_MTIME_SET 0x00000100UL
319
320
struct
plan9_statfs
{
321
uint32_t
type
;
322
uint32_t
bsize
;
323
uint64_t
blocks
;
324
uint64_t
bfree
;
325
uint64_t
bavail
;
326
uint64_t
files
;
327
uint64_t
ffree
;
328
uint64_t
fsid
;
329
uint32_t
namelen
;
330
};
331
332
#define V9FS_MAGIC 0x01021997
//for type in struct plan9_statfs
333
334
#ifdef __cplusplus
335
}
336
#endif
337
338
#include <
dlist.h
>
339
#include <
mariner.h
>
340
341
#define P9_BUFSIZE 8192
342
343
class
plan9server
{
344
mariner
*conn;
345
dlist
fids;
346
347
unsigned
char
buffer
[
P9_BUFSIZE
];
348
size_t
max_msize;
/* negotiated by Tversion/Rversion */
349
int
protocol;
/* negotiated by Tversion/Rversion */
350
351
int
pack_header(
unsigned
char
**buf,
size_t
*bufspace,
uint8_t
type
,
352
uint16_t
tag
);
353
int
send_response(
unsigned
char
*buf,
size_t
len);
354
int
send_error(
uint16_t
tag
,
const
char
*
error
,
int
errcode);
355
356
int
handle_request(
unsigned
char
*buf,
size_t
len)
EXCLUDES_TRANSACTION
;
357
int
recv_version(
unsigned
char
*buf,
size_t
len,
358
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
359
int
recv_auth(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
360
int
recv_attach(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
361
int
recv_flush(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
362
int
recv_walk(
unsigned
char
*buf,
size_t
len,
363
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
364
int
recv_open(
unsigned
char
*buf,
size_t
len,
365
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
366
int
recv_create(
unsigned
char
*buf,
size_t
len,
367
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
368
int
recv_read(
unsigned
char
*buf,
size_t
len,
369
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
370
int
recv_write(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
371
int
recv_clunk(
unsigned
char
*buf,
size_t
len,
372
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
373
int
recv_remove(
unsigned
char
*buf,
size_t
len,
374
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
375
int
recv_stat(
unsigned
char
*buf,
size_t
len,
376
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
377
int
recv_wstat(
unsigned
char
*buf,
size_t
len,
378
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
379
380
int
recv_getattr(
unsigned
char
*buf,
size_t
len,
381
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
382
int
recv_setattr(
unsigned
char
*buf,
size_t
len,
383
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
384
int
recv_lopen(
unsigned
char
*buf,
size_t
len,
385
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
386
int
recv_lcreate(
unsigned
char
*buf,
size_t
len,
387
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
388
int
recv_symlink(
unsigned
char
*buf,
size_t
len,
389
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
390
int
recv_mkdir(
unsigned
char
*buf,
size_t
len,
391
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
392
int
recv_readdir(
unsigned
char
*buf,
size_t
len,
393
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
394
int
recv_readlink(
unsigned
char
*buf,
size_t
len,
395
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
396
int
recv_statfs(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
397
int
recv_fsync(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
398
int
recv_unlinkat(
unsigned
char
*buf,
size_t
len,
399
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
400
int
recv_link(
unsigned
char
*buf,
size_t
len,
401
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
402
int
recv_rename(
unsigned
char
*buf,
size_t
len,
403
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
404
int
recv_renameat(
unsigned
char
*buf,
size_t
len,
405
uint16_t
tag
)
EXCLUDES_TRANSACTION
;
406
/* unsupported 9p2000.L operations */
407
int
recv_mknod(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
408
int
recv_xattrwalk(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
409
int
recv_xattrcreate(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
410
int
recv_lock(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
411
int
recv_getlock(
unsigned
char
*buf,
size_t
len,
uint16_t
tag
);
412
413
struct
fidmap
*find_fid(
uint32_t
fid
);
414
struct
fidmap
*add_fid(
uint32_t
fid
,
struct
venus_cnode
*
cnode
,
415
struct
attachment
*
root
);
416
int
del_fid(
uint32_t
fid
)
EXCLUDES_TRANSACTION
;
417
418
int
plan9_stat
(
struct
venus_cnode
*
cnode
,
struct
attachment
*
root
,
419
struct
plan9_stat
*stat,
420
const
char
*
name
=
NULL
)
EXCLUDES_TRANSACTION
;
421
ssize_t plan9_read(
struct
fidmap
*fm,
unsigned
char
*buf,
size_t
count,
422
size_t
offset)
EXCLUDES_TRANSACTION
;
423
424
int
cnode_linkcount(
struct
venus_cnode
*
cnode
, uint64_t *linkcount);
425
int
cnode_getname(
struct
venus_cnode
*
cnode
,
char
*
name
);
426
int
cnode_getparent(
struct
venus_cnode
*
cnode
,
struct
venus_cnode
*
parent
);
427
428
public
:
429
plan9server
(
mariner
*
conn
);
430
~plan9server
();
431
432
void
main_loop
(
unsigned
char
*initial_buffer =
NULL
,
433
size_t
len = 0)
EXCLUDES_TRANSACTION
;
434
int
pack_dirent
(
unsigned
char
**buf,
size_t
*len,
size_t
*offset,
435
size_t
*packed_offset,
struct
venus_cnode
*
parent
,
436
struct
attachment
*
root
,
437
const
char
*
name
)
EXCLUDES_TRANSACTION
;
438
int
fidmap_replace_cfid
(
VenusFid
*OldFid,
VenusFid
*NewFid);
439
};
440
441
#endif
/* _VENUS_9PFS_H_ */
plan9_dotl_message_types
plan9_dotl_message_types
Definition:
9pfs.h:99
Rmkdir
@ Rmkdir
Definition:
9pfs.h:137
Tunlinkat
@ Tunlinkat
Definition:
9pfs.h:140
Tmknod
@ Tmknod
Definition:
9pfs.h:109
Treaddir
@ Treaddir
Definition:
9pfs.h:125
Rxattrcreate
@ Rxattrcreate
Definition:
9pfs.h:124
Runlinkat
@ Runlinkat
Definition:
9pfs.h:141
Tgetattr
@ Tgetattr
Definition:
9pfs.h:115
Rrenameat
@ Rrenameat
Definition:
9pfs.h:139
Tsetattr
@ Tsetattr
Definition:
9pfs.h:117
Rmknod
@ Rmknod
Definition:
9pfs.h:110
Tfsync
@ Tfsync
Definition:
9pfs.h:128
Trenameat
@ Trenameat
Definition:
9pfs.h:138
Rlopen
@ Rlopen
Definition:
9pfs.h:104
Rsymlink
@ Rsymlink
Definition:
9pfs.h:108
Tlink
@ Tlink
Definition:
9pfs.h:134
Rsetattr
@ Rsetattr
Definition:
9pfs.h:120
Tgetlock
@ Tgetlock
Definition:
9pfs.h:132
Txattrwalk
@ Txattrwalk
Definition:
9pfs.h:121
Tlopen
@ Tlopen
Definition:
9pfs.h:103
Tstatfs
@ Tstatfs
Definition:
9pfs.h:101
Txattrcreate
@ Txattrcreate
Definition:
9pfs.h:123
Rreadlink
@ Rreadlink
Definition:
9pfs.h:114
Tlock
@ Tlock
Definition:
9pfs.h:130
Rfsync
@ Rfsync
Definition:
9pfs.h:129
Tmkdir
@ Tmkdir
Definition:
9pfs.h:136
Rreaddir
@ Rreaddir
Definition:
9pfs.h:126
Treadlink
@ Treadlink
Definition:
9pfs.h:113
Trename
@ Trename
Definition:
9pfs.h:111
Rxattrwalk
@ Rxattrwalk
Definition:
9pfs.h:122
Rgetattr
@ Rgetattr
Definition:
9pfs.h:116
Tlcreate
@ Tlcreate
Definition:
9pfs.h:105
Rlcreate
@ Rlcreate
Definition:
9pfs.h:106
Rrename
@ Rrename
Definition:
9pfs.h:112
Rgetlock
@ Rgetlock
Definition:
9pfs.h:133
Rlock
@ Rlock
Definition:
9pfs.h:131
Tsymlink
@ Tsymlink
Definition:
9pfs.h:107
Rlink
@ Rlink
Definition:
9pfs.h:135
Rstatfs
@ Rstatfs
Definition:
9pfs.h:102
Rlerror
@ Rlerror
Definition:
9pfs.h:100
P9_BUFSIZE
#define P9_BUFSIZE
Definition:
9pfs.h:341
p9_magic1
const unsigned char p9_magic1[]
Definition:
9pfs.h:37
plan9_message_types
plan9_message_types
Definition:
9pfs.h:46
Tread
@ Tread
Definition:
9pfs.h:79
Tauth
@ Tauth
Definition:
9pfs.h:51
Topen
@ Topen
Definition:
9pfs.h:72
Tcreate
@ Tcreate
Definition:
9pfs.h:75
Rwstat
@ Rwstat
Definition:
9pfs.h:95
Tattach
@ Tattach
Definition:
9pfs.h:56
Twstat
@ Twstat
Definition:
9pfs.h:94
Twrite
@ Twrite
Definition:
9pfs.h:82
Ropen
@ Ropen
Definition:
9pfs.h:73
Tclunk
@ Tclunk
Definition:
9pfs.h:85
Rauth
@ Rauth
Definition:
9pfs.h:54
Rstat
@ Rstat
Definition:
9pfs.h:92
Rwrite
@ Rwrite
Definition:
9pfs.h:83
Tstat
@ Tstat
Definition:
9pfs.h:91
Rread
@ Rread
Definition:
9pfs.h:80
Rattach
@ Rattach
Definition:
9pfs.h:60
Twalk
@ Twalk
Definition:
9pfs.h:69
Rwalk
@ Rwalk
Definition:
9pfs.h:70
Rcreate
@ Rcreate
Definition:
9pfs.h:77
Rerror
@ Rerror
Definition:
9pfs.h:63
Rflush
@ Rflush
Definition:
9pfs.h:67
Tflush
@ Tflush
Definition:
9pfs.h:66
Rclunk
@ Rclunk
Definition:
9pfs.h:86
Rversion
@ Rversion
Definition:
9pfs.h:49
Tremove
@ Tremove
Definition:
9pfs.h:88
Terror
@ Terror
Definition:
9pfs.h:62
Tversion
@ Tversion
Definition:
9pfs.h:48
Rremove
@ Rremove
Definition:
9pfs.h:89
p9_magic12
const unsigned char p9_magic12[]
Definition:
9pfs.h:39
dlist
Definition:
dlist.h:50
mariner
Definition:
mariner.h:63
plan9server
Definition:
9pfs.h:343
plan9server::pack_dirent
int pack_dirent(unsigned char **buf, size_t *len, size_t *offset, size_t *packed_offset, struct venus_cnode *parent, struct attachment *root, const char *name) EXCLUDES_TRANSACTION
Definition:
9pfs.cc:1609
plan9server::~plan9server
~plan9server()
Definition:
9pfs.cc:474
plan9server::plan9server
plan9server(mariner *conn)
Definition:
9pfs.cc:466
plan9server::main_loop
void main_loop(unsigned char *initial_buffer=NULL, size_t len=0) EXCLUDES_TRANSACTION
Definition:
9pfs.cc:539
plan9server::fidmap_replace_cfid
int fidmap_replace_cfid(VenusFid *OldFid, VenusFid *NewFid)
Definition:
9pfs.cc:3071
uint16_t
unsigned short uint16_t
Definition:
coda.h:103
uint32_t
unsigned int uint32_t
Definition:
coda.h:105
uint8_t
unsigned char uint8_t
Definition:
coda.h:101
EXCLUDES_TRANSACTION
#define EXCLUDES_TRANSACTION
Definition:
coda_tsa.h:108
dlist.h
mariner.h
pwdtopdbtool.name
name
Definition:
pwdtopdbtool.py:40
type
void(* type)()
Definition:
rp2main.c:424
conn
#define conn
Definition:
rpc2.private.h:232
parent
PROCESS parent
Definition:
smon2.c:80
VenusFid
Definition:
venusfid.h:24
attachment
Definition:
9pfs.cc:50
buffer
Definition:
coda_dir.h:58
fidmap
Definition:
9pfs.cc:58
fidmap::root
struct attachment * root
Definition:
9pfs.cc:63
fidmap::cnode
struct venus_cnode cnode
Definition:
9pfs.cc:61
fidmap::fid
uint32_t fid
Definition:
9pfs.cc:60
plan9_qid
Definition:
9pfs.h:220
plan9_qid::version
uint32_t version
Definition:
9pfs.h:222
plan9_qid::type
uint8_t type
Definition:
9pfs.h:221
plan9_qid::path
uint64_t path
Definition:
9pfs.h:223
plan9_stat_dotl
Definition:
9pfs.h:266
plan9_stat_dotl::st_mtime_nsec
uint64_t st_mtime_nsec
Definition:
9pfs.h:279
plan9_stat_dotl::st_size
uint64_t st_size
Definition:
9pfs.h:273
plan9_stat_dotl::st_atime_sec
uint64_t st_atime_sec
Definition:
9pfs.h:276
plan9_stat_dotl::st_atime_nsec
uint64_t st_atime_nsec
Definition:
9pfs.h:277
plan9_stat_dotl::st_blksize
uint64_t st_blksize
Definition:
9pfs.h:274
plan9_stat_dotl::st_mode
uint32_t st_mode
Definition:
9pfs.h:268
plan9_stat_dotl::qid
struct plan9_qid qid
Definition:
9pfs.h:267
plan9_stat_dotl::st_uid
uid_t st_uid
Definition:
9pfs.h:269
plan9_stat_dotl::st_btime_nsec
uint64_t st_btime_nsec
Definition:
9pfs.h:284
plan9_stat_dotl::st_gen
uint64_t st_gen
Definition:
9pfs.h:285
plan9_stat_dotl::st_btime_sec
uint64_t st_btime_sec
Definition:
9pfs.h:283
plan9_stat_dotl::st_mtime_sec
uint64_t st_mtime_sec
Definition:
9pfs.h:278
plan9_stat_dotl::st_ctime_sec
uint64_t st_ctime_sec
Definition:
9pfs.h:280
plan9_stat_dotl::st_data_version
uint64_t st_data_version
Definition:
9pfs.h:286
plan9_stat_dotl::st_blocks
uint64_t st_blocks
Definition:
9pfs.h:275
plan9_stat_dotl::st_ctime_nsec
uint64_t st_ctime_nsec
Definition:
9pfs.h:281
plan9_stat_dotl::st_nlink
uint64_t st_nlink
Definition:
9pfs.h:271
plan9_stat_dotl::st_gid
gid_t st_gid
Definition:
9pfs.h:270
plan9_stat_dotl::st_rdev
uint64_t st_rdev
Definition:
9pfs.h:272
plan9_stat
Definition:
9pfs.h:226
plan9_stat::n_uid
uid_t n_uid
Definition:
9pfs.h:241
plan9_stat::n_gid
gid_t n_gid
Definition:
9pfs.h:242
plan9_stat::name
char * name
Definition:
9pfs.h:235
plan9_stat::atime
uint32_t atime
Definition:
9pfs.h:232
plan9_stat::n_muid
uid_t n_muid
Definition:
9pfs.h:243
plan9_stat::gid
char * gid
Definition:
9pfs.h:237
plan9_stat::uid
char * uid
Definition:
9pfs.h:236
plan9_stat::mode
uint32_t mode
Definition:
9pfs.h:231
plan9_stat::length
uint64_t length
Definition:
9pfs.h:234
plan9_stat::mtime
uint32_t mtime
Definition:
9pfs.h:233
plan9_stat::muid
char * muid
Definition:
9pfs.h:238
plan9_stat::type
uint16_t type
Definition:
9pfs.h:228
plan9_stat::extension
char * extension
Definition:
9pfs.h:240
plan9_stat::dev
uint32_t dev
Definition:
9pfs.h:229
plan9_stat::qid
struct plan9_qid qid
Definition:
9pfs.h:230
plan9_statfs
Definition:
9pfs.h:320
plan9_statfs::bsize
uint32_t bsize
Definition:
9pfs.h:322
plan9_statfs::bavail
uint64_t bavail
Definition:
9pfs.h:325
plan9_statfs::namelen
uint32_t namelen
Definition:
9pfs.h:329
plan9_statfs::type
uint32_t type
Definition:
9pfs.h:321
plan9_statfs::ffree
uint64_t ffree
Definition:
9pfs.h:327
plan9_statfs::blocks
uint64_t blocks
Definition:
9pfs.h:323
plan9_statfs::fsid
uint64_t fsid
Definition:
9pfs.h:328
plan9_statfs::files
uint64_t files
Definition:
9pfs.h:326
plan9_statfs::bfree
uint64_t bfree
Definition:
9pfs.h:324
venus_cnode
Definition:
vproc.h:364
tag
TYPE_TAG tag
Definition:
symtab.c:72
error
Error error
Definition:
vol-create.cc:87
NULL
#define NULL
Definition:
voltypes.h:44
Generated by
1.9.4