Lines Matching +full:0 +full:- +full:9

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * 9P protocol definitions.
14 * enum p9_debug_flags - bits for mount time debug parameter
16 * @P9_DEBUG_9P: 9P protocol tracing
25 * @P9_DEBUG_FSC: FS-cache tracing
33 P9_DEBUG_ERROR = (1<<0),
41 P9_DEBUG_FID = (1<<9),
62 * enum p9_msg_t - 9P message types
64 * @P9_RLERROR: response for any failed request for 9P2000.L
71 * @P9_TLCREATE: prepare a handle for I/O on an new file for 9P2000.L
72 * @P9_RLCREATE: response with file access information for 9P2000.L
106 * There are 14 basic operations in 9P2000, paired as
112 * See Also: http://plan9.bell-labs.com/sys/man/5/INDEX.html
187 * enum p9_open_mode_t - 9P open modes
192 * @P9_OTRUNC: truncate file to zero-length before opening it
198 * 9P open modes differ slightly from Posix standard modes.
205 * See Also: http://plan9.bell-labs.com/magic/man2html/2/open
209 P9_OREAD = 0x00,
210 P9_OWRITE = 0x01,
211 P9_ORDWR = 0x02,
212 P9_OEXEC = 0x03,
213 P9_OTRUNC = 0x10,
214 P9_OREXEC = 0x20,
215 P9_ORCLOSE = 0x40,
216 P9_OAPPEND = 0x80,
217 P9_OEXCL = 0x1000,
218 P9L_MODE_MASK = 0x1FFF, /* don't send anything under this to server */
219 P9L_DIRECT = 0x2000, /* cache disabled */
220 P9L_NOWRITECACHE = 0x4000, /* no write caching */
221 P9L_LOOSE = 0x8000, /* loose cache */
225 * enum p9_perm_t - 9P permissions
227 * @P9_DMAPPEND: mode bit for is append-only
231 * @P9_DMTMP: mode bit for non-backed-up files
232 * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u)
233 * @P9_DMLINK: mode bit for hard-link (9P2000.u)
234 * @P9_DMDEVICE: mode bit for device files (9P2000.u)
235 * @P9_DMNAMEDPIPE: mode bit for named pipe (9P2000.u)
236 * @P9_DMSOCKET: mode bit for socket (9P2000.u)
237 * @P9_DMSETUID: mode bit for setuid (9P2000.u)
238 * @P9_DMSETGID: mode bit for setgid (9P2000.u)
239 * @P9_DMSETVTX: mode bit for sticky bit (9P2000.u)
241 * 9P permissions differ slightly from Posix standard modes.
243 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
246 P9_DMDIR = 0x80000000,
247 P9_DMAPPEND = 0x40000000,
248 P9_DMEXCL = 0x20000000,
249 P9_DMMOUNT = 0x10000000,
250 P9_DMAUTH = 0x08000000,
251 P9_DMTMP = 0x04000000,
252 /* 9P2000.u extensions */
253 P9_DMSYMLINK = 0x02000000,
254 P9_DMLINK = 0x01000000,
255 P9_DMDEVICE = 0x00800000,
256 P9_DMNAMEDPIPE = 0x00200000,
257 P9_DMSOCKET = 0x00100000,
258 P9_DMSETUID = 0x00080000,
259 P9_DMSETGID = 0x00040000,
260 P9_DMSETVTX = 0x00010000,
263 /* 9p2000.L open flags */
284 /* 9p2000.L at flags */
285 #define P9_DOTL_AT_REMOVEDIR 0x200
287 /* 9p2000.L lock type */
288 #define P9_LOCK_TYPE_RDLCK 0
293 * enum p9_qid_t - QID types
295 * @P9_QTAPPEND: append-only
299 * @P9_QTTMP: non-backed-up files
300 * @P9_QTSYMLINK: symbolic links (9P2000.u)
301 * @P9_QTLINK: hard-link (9P2000.u)
304 * QID types are a subset of permissions - they are primarily
306 * a jump-table. Their value is also the most significant 16 bits
309 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
312 P9_QTDIR = 0x80,
313 P9_QTAPPEND = 0x40,
314 P9_QTEXCL = 0x20,
315 P9_QTMOUNT = 0x10,
316 P9_QTAUTH = 0x08,
317 P9_QTTMP = 0x04,
318 P9_QTSYMLINK = 0x02,
319 P9_QTLINK = 0x01,
320 P9_QTFILE = 0x00,
323 /* 9P Magic Numbers */
324 #define P9_NOTAG ((u16)(~0))
325 #define P9_NOFID ((u32)(~0))
344 * struct p9_qid - file system entity information
345 * @type: 8-bit type &p9_qid_t
346 * @version: 16-bit monotonically incrementing version number
347 * @path: 64-bit per-server-unique ID for a file system element
349 * qids are identifiers used by 9P servers to track file system
357 * their version to 0, signaling that they should never be cached and
360 * See Also://plan9.bell-labs.com/magic/man2html/2/stat
370 * struct p9_wstat - file system metadata information
373 * @dev: the sub-type of the server (equivalent to a minor number)
375 * @mode: Plan 9 format permissions of type &p9_perm_t
384 * @n_uid: numeric user id of owner (part of 9p2000.u extension)
385 * @n_gid: numeric group id (part of 9p2000.u extension)
386 * @n_muid: numeric user id of laster modifier (part of 9p2000.u extension)
388 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
404 char *extension; /* 9p2000.u extensions */
405 kuid_t n_uid; /* 9p2000.u extensions */
406 kgid_t n_gid; /* 9p2000.u extensions */
407 kuid_t n_muid; /* 9p2000.u extensions */
433 #define P9_STATS_MODE 0x00000001ULL
434 #define P9_STATS_NLINK 0x00000002ULL
435 #define P9_STATS_UID 0x00000004ULL
436 #define P9_STATS_GID 0x00000008ULL
437 #define P9_STATS_RDEV 0x00000010ULL
438 #define P9_STATS_ATIME 0x00000020ULL
439 #define P9_STATS_MTIME 0x00000040ULL
440 #define P9_STATS_CTIME 0x00000080ULL
441 #define P9_STATS_INO 0x00000100ULL
442 #define P9_STATS_SIZE 0x00000200ULL
443 #define P9_STATS_BLOCKS 0x00000400ULL
445 #define P9_STATS_BTIME 0x00000800ULL
446 #define P9_STATS_GEN 0x00001000ULL
447 #define P9_STATS_DATA_VERSION 0x00002000ULL
449 #define P9_STATS_BASIC 0x000007ffULL /* Mask for fields up to BLOCKS */
450 #define P9_STATS_ALL 0x00003fffULL /* Mask for All fields above */
453 * struct p9_iattr_dotl - P9 inode attribute for setattr
478 #define P9_LOCK_SUCCESS 0
487 * @type - type of lock
488 * @flags - lock flags
489 * @start - starting offset of the lock
490 * @length - number of bytes
491 * @proc_id - process id which wants to take lock
492 * @client_id - client id
505 * @type - type of lock
506 * @start - starting offset of the lock
507 * @length - number of bytes
508 * @proc_id - process id which wants to take lock
509 * @client_id - client id
533 * struct p9_fcall - primary packet structure
540 * @zc: whether zero-copy is used
542 * &p9_fcall represents the structure for all 9P RPC
546 * See Also: http://plan9.bell-labs.com/magic/man2html/2/fcall