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

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * include/net/9p/9p.h
5 * 9P protocol definitions.
16 * enum p9_debug_flags - bits for mount time debug parameter
18 * @P9_DEBUG_9P: 9P protocol tracing
27 * @P9_DEBUG_FSC: FS-cache tracing
35 P9_DEBUG_ERROR = (1<<0),
43 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,
221 * enum p9_perm_t - 9P permissions
223 * @P9_DMAPPEND: mode bit for is append-only
227 * @P9_DMTMP: mode bit for non-backed-up files
228 * @P9_DMSYMLINK: mode bit for symbolic links (9P2000.u)
229 * @P9_DMLINK: mode bit for hard-link (9P2000.u)
230 * @P9_DMDEVICE: mode bit for device files (9P2000.u)
231 * @P9_DMNAMEDPIPE: mode bit for named pipe (9P2000.u)
232 * @P9_DMSOCKET: mode bit for socket (9P2000.u)
233 * @P9_DMSETUID: mode bit for setuid (9P2000.u)
234 * @P9_DMSETGID: mode bit for setgid (9P2000.u)
235 * @P9_DMSETVTX: mode bit for sticky bit (9P2000.u)
237 * 9P permissions differ slightly from Posix standard modes.
239 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
242 P9_DMDIR = 0x80000000,
243 P9_DMAPPEND = 0x40000000,
244 P9_DMEXCL = 0x20000000,
245 P9_DMMOUNT = 0x10000000,
246 P9_DMAUTH = 0x08000000,
247 P9_DMTMP = 0x04000000,
248 /* 9P2000.u extensions */
249 P9_DMSYMLINK = 0x02000000,
250 P9_DMLINK = 0x01000000,
251 P9_DMDEVICE = 0x00800000,
252 P9_DMNAMEDPIPE = 0x00200000,
253 P9_DMSOCKET = 0x00100000,
254 P9_DMSETUID = 0x00080000,
255 P9_DMSETGID = 0x00040000,
256 P9_DMSETVTX = 0x00010000,
259 /* 9p2000.L open flags */
280 /* 9p2000.L at flags */
281 #define P9_DOTL_AT_REMOVEDIR 0x200
283 /* 9p2000.L lock type */
284 #define P9_LOCK_TYPE_RDLCK 0
289 * enum p9_qid_t - QID types
291 * @P9_QTAPPEND: append-only
295 * @P9_QTTMP: non-backed-up files
296 * @P9_QTSYMLINK: symbolic links (9P2000.u)
297 * @P9_QTLINK: hard-link (9P2000.u)
300 * QID types are a subset of permissions - they are primarily
302 * a jump-table. Their value is also the most significant 16 bits
305 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
308 P9_QTDIR = 0x80,
309 P9_QTAPPEND = 0x40,
310 P9_QTEXCL = 0x20,
311 P9_QTMOUNT = 0x10,
312 P9_QTAUTH = 0x08,
313 P9_QTTMP = 0x04,
314 P9_QTSYMLINK = 0x02,
315 P9_QTLINK = 0x01,
316 P9_QTFILE = 0x00,
319 /* 9P Magic Numbers */
320 #define P9_NOTAG (u16)(~0)
321 #define P9_NOFID (u32)(~0)
337 * struct p9_qid - file system entity information
338 * @type: 8-bit type &p9_qid_t
339 * @version: 16-bit monotonically incrementing version number
340 * @path: 64-bit per-server-unique ID for a file system element
342 * qids are identifiers used by 9P servers to track file system
350 * their version to 0, signaling that they should never be cached and
353 * See Also://plan9.bell-labs.com/magic/man2html/2/stat
363 * struct p9_wstat - file system metadata information
366 * @dev: the sub-type of the server (equivalent to a minor number)
368 * @mode: Plan 9 format permissions of type &p9_perm_t
377 * @n_uid: numeric user id of owner (part of 9p2000.u extension)
378 * @n_gid: numeric group id (part of 9p2000.u extension)
379 * @n_muid: numeric user id of laster modifier (part of 9p2000.u extension)
381 * See Also: http://plan9.bell-labs.com/magic/man2html/2/stat
397 char *extension; /* 9p2000.u extensions */
398 kuid_t n_uid; /* 9p2000.u extensions */
399 kgid_t n_gid; /* 9p2000.u extensions */
400 kuid_t n_muid; /* 9p2000.u extensions */
426 #define P9_STATS_MODE 0x00000001ULL
427 #define P9_STATS_NLINK 0x00000002ULL
428 #define P9_STATS_UID 0x00000004ULL
429 #define P9_STATS_GID 0x00000008ULL
430 #define P9_STATS_RDEV 0x00000010ULL
431 #define P9_STATS_ATIME 0x00000020ULL
432 #define P9_STATS_MTIME 0x00000040ULL
433 #define P9_STATS_CTIME 0x00000080ULL
434 #define P9_STATS_INO 0x00000100ULL
435 #define P9_STATS_SIZE 0x00000200ULL
436 #define P9_STATS_BLOCKS 0x00000400ULL
438 #define P9_STATS_BTIME 0x00000800ULL
439 #define P9_STATS_GEN 0x00001000ULL
440 #define P9_STATS_DATA_VERSION 0x00002000ULL
442 #define P9_STATS_BASIC 0x000007ffULL /* Mask for fields up to BLOCKS */
443 #define P9_STATS_ALL 0x00003fffULL /* Mask for All fields above */
446 * struct p9_iattr_dotl - P9 inode attribute for setattr
471 #define P9_LOCK_SUCCESS 0
480 * @type - type of lock
481 * @flags - lock flags
482 * @start - starting offset of the lock
483 * @length - number of bytes
484 * @proc_id - process id which wants to take lock
485 * @client_id - client id
498 * @type - type of lock
499 * @start - starting offset of the lock
500 * @length - number of bytes
501 * @proc_id - process id which wants to take lock
502 * @client_id - client id
526 * struct p9_fcall - primary packet structure
534 * &p9_fcall represents the structure for all 9P RPC
538 * See Also: http://plan9.bell-labs.com/magic/man2html/2/fcall