diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-01-17 12:04:33 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-01-17 12:19:24 -0700 |
commit | a8b4ec816efc869d00023c7565f1fed5098eca9b (patch) | |
tree | 61025f79e52b31d636faa7b16fc2ee434b9c5a04 /lib9p/include | |
parent | 319987dc70d012c711109589328887c117112965 (diff) |
lib9p: Enable generating code for 9P2000.L
Diffstat (limited to 'lib9p/include')
-rw-r--r-- | lib9p/include/lib9p/9p.generated.h | 624 |
1 files changed, 577 insertions, 47 deletions
diff --git a/lib9p/include/lib9p/9p.generated.h b/lib9p/include/lib9p/9p.generated.h index 3bc77c4..cf30e00 100644 --- a/lib9p/include/lib9p/9p.generated.h +++ b/lib9p/include/lib9p/9p.generated.h @@ -1,4 +1,4 @@ -/* Generated by `lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ +/* Generated by `lib9p/idl.gen lib9p/idl/2002-9P2000.9p lib9p/idl/2005-9P2000.u.9p lib9p/idl/2010-9P2000.L.9p lib9p/idl/2012-9P2000.e.9p`. DO NOT EDIT! */ #ifndef _LIB9P_9P_H_ #error Do not include <lib9p/9p.generated.h> directly; include <lib9p/9p.h> instead @@ -14,6 +14,10 @@ #error config.h must define CONFIG_9P_ENABLE_9P2000 #endif +#ifndef CONFIG_9P_ENABLE_9P2000_L + #error config.h must define CONFIG_9P_ENABLE_9P2000_L +#endif + #ifndef CONFIG_9P_ENABLE_9P2000_e #error config.h must define CONFIG_9P_ENABLE_9P2000_e #endif @@ -29,6 +33,9 @@ enum lib9p_version { #if CONFIG_9P_ENABLE_9P2000 LIB9P_VER_9P2000, /* "9P2000" */ #endif /* CONFIG_9P_ENABLE_9P2000 */ +#if CONFIG_9P_ENABLE_9P2000_L + LIB9P_VER_9P2000_L, /* "9P2000.L" */ +#endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e LIB9P_VER_9P2000_e, /* "9P2000.e" */ #endif /* CONFIG_9P_ENABLE_9P2000_e */ @@ -43,64 +50,124 @@ const char *lib9p_version_str(enum lib9p_version); /* enum msg_type **************************************************************/ enum lib9p_msg_type { /* uint8_t */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Tversion = 100, + LIB9P_TYP_Rversion = 101, + LIB9P_TYP_Tauth = 102, + LIB9P_TYP_Rauth = 103, + LIB9P_TYP_Tattach = 104, + LIB9P_TYP_Rattach = 105, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Rerror = 107, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Tflush = 108, + LIB9P_TYP_Rflush = 109, + LIB9P_TYP_Twalk = 110, + LIB9P_TYP_Rwalk = 111, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Topen = 112, + LIB9P_TYP_Ropen = 113, + LIB9P_TYP_Tcreate = 114, + LIB9P_TYP_Rcreate = 115, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Tread = 116, + LIB9P_TYP_Rread = 117, + LIB9P_TYP_Twrite = 118, + LIB9P_TYP_Rwrite = 119, + LIB9P_TYP_Tclunk = 120, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u - LIB9P_TYP_Tversion = 100, - LIB9P_TYP_Rversion = 101, - LIB9P_TYP_Tauth = 102, - LIB9P_TYP_Rauth = 103, - LIB9P_TYP_Tattach = 104, - LIB9P_TYP_Rattach = 105, - LIB9P_TYP_Rerror = 107, - LIB9P_TYP_Tflush = 108, - LIB9P_TYP_Rflush = 109, - LIB9P_TYP_Twalk = 110, - LIB9P_TYP_Rwalk = 111, - LIB9P_TYP_Topen = 112, - LIB9P_TYP_Ropen = 113, - LIB9P_TYP_Tcreate = 114, - LIB9P_TYP_Rcreate = 115, - LIB9P_TYP_Tread = 116, - LIB9P_TYP_Rread = 117, - LIB9P_TYP_Twrite = 118, - LIB9P_TYP_Rwrite = 119, - LIB9P_TYP_Tclunk = 120, - LIB9P_TYP_Rclunk = 121, - LIB9P_TYP_Tremove = 122, - LIB9P_TYP_Rremove = 123, - LIB9P_TYP_Tstat = 124, - LIB9P_TYP_Rstat = 125, - LIB9P_TYP_Twstat = 126, - LIB9P_TYP_Rwstat = 127, + LIB9P_TYP_Rclunk = 121, #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Tremove = 122, + LIB9P_TYP_Rremove = 123, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u + LIB9P_TYP_Tstat = 124, + LIB9P_TYP_Rstat = 125, + LIB9P_TYP_Twstat = 126, + LIB9P_TYP_Rwstat = 127, +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L + LIB9P_TYP_Rlerror = 7, + LIB9P_TYP_Tstatfs = 8, + LIB9P_TYP_Rstatfs = 9, + LIB9P_TYP_Tlopen = 12, + LIB9P_TYP_Rlopen = 13, + LIB9P_TYP_Tlcreate = 14, + LIB9P_TYP_Rlcreate = 15, + LIB9P_TYP_Tsymlink = 16, + LIB9P_TYP_Rsymlink = 17, + LIB9P_TYP_Tmknod = 18, + LIB9P_TYP_Rmknod = 19, + LIB9P_TYP_Trename = 20, + LIB9P_TYP_Rrename = 21, + LIB9P_TYP_Treadlink = 22, + LIB9P_TYP_Rreadlink = 23, + LIB9P_TYP_Tgetattr = 24, + LIB9P_TYP_Rgetattr = 25, + LIB9P_TYP_Tsetattr = 26, + LIB9P_TYP_Rsetattr = 27, + LIB9P_TYP_Txattrwalk = 30, + LIB9P_TYP_Rxattrwalk = 31, + LIB9P_TYP_Txattrcreate = 32, + LIB9P_TYP_Rxattrcreate = 33, + LIB9P_TYP_Treaddir = 40, + LIB9P_TYP_Rreaddir = 41, + LIB9P_TYP_Tfsync = 50, + LIB9P_TYP_Rfsync = 51, + LIB9P_TYP_Tlock = 52, + LIB9P_TYP_Rlock = 53, + LIB9P_TYP_Tgetlock = 54, + LIB9P_TYP_Rgetlock = 55, + LIB9P_TYP_Tlink = 70, + LIB9P_TYP_Rlink = 71, + LIB9P_TYP_Tmkdir = 73, + LIB9P_TYP_Trenameat = 74, + LIB9P_TYP_Rrenameat = 75, + LIB9P_TYP_Tunlinkat = 76, + LIB9P_TYP_Runlinkat = 77, +#endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e - LIB9P_TYP_Tsession = 150, - LIB9P_TYP_Rsession = 151, - LIB9P_TYP_Tsread = 152, - LIB9P_TYP_Rsread = 153, - LIB9P_TYP_Tswrite = 154, - LIB9P_TYP_Rswrite = 155, + LIB9P_TYP_Tsession = 150, + LIB9P_TYP_Rsession = 151, + LIB9P_TYP_Tsread = 152, + LIB9P_TYP_Rsread = 153, + LIB9P_TYP_Tswrite = 154, + LIB9P_TYP_Rswrite = 155, #endif /* CONFIG_9P_ENABLE_9P2000_e */ }; /* payload types **************************************************************/ -#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u typedef uint16_t lib9p_tag_t; #define LIB9P_TAG_NOTAG ((lib9p_tag_t)UINT16_C(~0)) typedef uint32_t lib9p_fid_t; #define LIB9P_FID_NOFID ((lib9p_fid_t)UINT32_C(~0)) +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_d { uint32_t len; char *dat; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_s { uint16_t len; char *utf8; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u typedef uint32_t lib9p_dm_t; #define LIB9P_DM_DIR ((lib9p_dm_t)(1<<31)) @@ -142,6 +209,8 @@ typedef uint32_t lib9p_dm_t; #define LIB9P_DM_PERM_MASK ((lib9p_dm_t)(0777)) +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u typedef uint8_t lib9p_qt_t; #define LIB9P_QT_DIR ((lib9p_qt_t)(1<<7)) @@ -157,12 +226,12 @@ typedef uint8_t lib9p_qt_t; #define LIB9P_QT_FILE ((lib9p_qt_t)(0)) -#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ -#if CONFIG_9P_ENABLE_9P2000_u +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u typedef uint32_t lib9p_nuid_t; #define LIB9P_NUID_NONUID ((lib9p_nuid_t)UINT32_C(~0)) -#endif /* CONFIG_9P_ENABLE_9P2000_u */ +#endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u typedef uint8_t lib9p_o_t; @@ -182,6 +251,163 @@ typedef uint8_t lib9p_o_t; #define LIB9P_O_MODE_MASK ((lib9p_o_t)(0b00000011)) #define LIB9P_O_FLAG_MASK ((lib9p_o_t)(0b11111100)) +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +typedef uint64_t lib9p_getattr_t; + +/* unused ((lib9p_getattr_t)(1<<63)) */ +/* unused ((lib9p_getattr_t)(1<<62)) */ +/* unused ((lib9p_getattr_t)(1<<61)) */ +/* unused ((lib9p_getattr_t)(1<<60)) */ +/* unused ((lib9p_getattr_t)(1<<59)) */ +/* unused ((lib9p_getattr_t)(1<<58)) */ +/* unused ((lib9p_getattr_t)(1<<57)) */ +/* unused ((lib9p_getattr_t)(1<<56)) */ +/* unused ((lib9p_getattr_t)(1<<55)) */ +/* unused ((lib9p_getattr_t)(1<<54)) */ +/* unused ((lib9p_getattr_t)(1<<53)) */ +/* unused ((lib9p_getattr_t)(1<<52)) */ +/* unused ((lib9p_getattr_t)(1<<51)) */ +/* unused ((lib9p_getattr_t)(1<<50)) */ +/* unused ((lib9p_getattr_t)(1<<49)) */ +/* unused ((lib9p_getattr_t)(1<<48)) */ +/* unused ((lib9p_getattr_t)(1<<47)) */ +/* unused ((lib9p_getattr_t)(1<<46)) */ +/* unused ((lib9p_getattr_t)(1<<45)) */ +/* unused ((lib9p_getattr_t)(1<<44)) */ +/* unused ((lib9p_getattr_t)(1<<43)) */ +/* unused ((lib9p_getattr_t)(1<<42)) */ +/* unused ((lib9p_getattr_t)(1<<41)) */ +/* unused ((lib9p_getattr_t)(1<<40)) */ +/* unused ((lib9p_getattr_t)(1<<39)) */ +/* unused ((lib9p_getattr_t)(1<<38)) */ +/* unused ((lib9p_getattr_t)(1<<37)) */ +/* unused ((lib9p_getattr_t)(1<<36)) */ +/* unused ((lib9p_getattr_t)(1<<35)) */ +/* unused ((lib9p_getattr_t)(1<<34)) */ +/* unused ((lib9p_getattr_t)(1<<33)) */ +/* unused ((lib9p_getattr_t)(1<<32)) */ +/* unused ((lib9p_getattr_t)(1<<31)) */ +/* unused ((lib9p_getattr_t)(1<<30)) */ +/* unused ((lib9p_getattr_t)(1<<29)) */ +/* unused ((lib9p_getattr_t)(1<<28)) */ +/* unused ((lib9p_getattr_t)(1<<27)) */ +/* unused ((lib9p_getattr_t)(1<<26)) */ +/* unused ((lib9p_getattr_t)(1<<25)) */ +/* unused ((lib9p_getattr_t)(1<<24)) */ +/* unused ((lib9p_getattr_t)(1<<23)) */ +/* unused ((lib9p_getattr_t)(1<<22)) */ +/* unused ((lib9p_getattr_t)(1<<21)) */ +/* unused ((lib9p_getattr_t)(1<<20)) */ +/* unused ((lib9p_getattr_t)(1<<19)) */ +/* unused ((lib9p_getattr_t)(1<<18)) */ +/* unused ((lib9p_getattr_t)(1<<17)) */ +/* unused ((lib9p_getattr_t)(1<<16)) */ +/* unused ((lib9p_getattr_t)(1<<15)) */ +/* unused ((lib9p_getattr_t)(1<<14)) */ +#define LIB9P_GETATTR_DATA_VERSION ((lib9p_getattr_t)(1<<13)) +#define LIB9P_GETATTR_GEN ((lib9p_getattr_t)(1<<12)) +#define LIB9P_GETATTR_BTIME ((lib9p_getattr_t)(1<<11)) +#define LIB9P_GETATTR_BLOCKS ((lib9p_getattr_t)(1<<10)) +#define LIB9P_GETATTR_SIZE ((lib9p_getattr_t)(1<<9)) +#define LIB9P_GETATTR_INO ((lib9p_getattr_t)(1<<8)) +#define LIB9P_GETATTR_CTIME ((lib9p_getattr_t)(1<<7)) +#define LIB9P_GETATTR_MTIME ((lib9p_getattr_t)(1<<6)) +#define LIB9P_GETATTR_ATIME ((lib9p_getattr_t)(1<<5)) +#define LIB9P_GETATTR_RDEV ((lib9p_getattr_t)(1<<4)) +#define LIB9P_GETATTR_GID ((lib9p_getattr_t)(1<<3)) +#define LIB9P_GETATTR_UID ((lib9p_getattr_t)(1<<2)) +#define LIB9P_GETATTR_NLINK ((lib9p_getattr_t)(1<<1)) +#define LIB9P_GETATTR_MODE ((lib9p_getattr_t)(1<<0)) + +#define LIB9P_GETATTR_BASIC ((lib9p_getattr_t)(0x000007ff)) +#define LIB9P_GETATTR_ALL ((lib9p_getattr_t)(0x00003fff)) + +typedef uint32_t lib9p_setattr_t; + +/* unused ((lib9p_setattr_t)(1<<31)) */ +/* unused ((lib9p_setattr_t)(1<<30)) */ +/* unused ((lib9p_setattr_t)(1<<29)) */ +/* unused ((lib9p_setattr_t)(1<<28)) */ +/* unused ((lib9p_setattr_t)(1<<27)) */ +/* unused ((lib9p_setattr_t)(1<<26)) */ +/* unused ((lib9p_setattr_t)(1<<25)) */ +/* unused ((lib9p_setattr_t)(1<<24)) */ +/* unused ((lib9p_setattr_t)(1<<23)) */ +/* unused ((lib9p_setattr_t)(1<<22)) */ +/* unused ((lib9p_setattr_t)(1<<21)) */ +/* unused ((lib9p_setattr_t)(1<<20)) */ +/* unused ((lib9p_setattr_t)(1<<19)) */ +/* unused ((lib9p_setattr_t)(1<<18)) */ +/* unused ((lib9p_setattr_t)(1<<17)) */ +/* unused ((lib9p_setattr_t)(1<<16)) */ +/* unused ((lib9p_setattr_t)(1<<15)) */ +/* unused ((lib9p_setattr_t)(1<<14)) */ +/* unused ((lib9p_setattr_t)(1<<13)) */ +/* unused ((lib9p_setattr_t)(1<<12)) */ +/* unused ((lib9p_setattr_t)(1<<11)) */ +/* unused ((lib9p_setattr_t)(1<<10)) */ +/* unused ((lib9p_setattr_t)(1<<9)) */ +#define LIB9P_SETATTR_MTIME_SET ((lib9p_setattr_t)(1<<8)) +#define LIB9P_SETATTR_ATIME_SET ((lib9p_setattr_t)(1<<7)) +#define LIB9P_SETATTR_CTIME ((lib9p_setattr_t)(1<<6)) +#define LIB9P_SETATTR_MTIME ((lib9p_setattr_t)(1<<5)) +#define LIB9P_SETATTR_ATIME ((lib9p_setattr_t)(1<<4)) +#define LIB9P_SETATTR_SIZE ((lib9p_setattr_t)(1<<3)) +#define LIB9P_SETATTR_GID ((lib9p_setattr_t)(1<<2)) +#define LIB9P_SETATTR_UID ((lib9p_setattr_t)(1<<1)) +#define LIB9P_SETATTR_MODE ((lib9p_setattr_t)(1<<0)) + + +typedef uint8_t lib9p_lock_type_t; +#define LIB9P_LOCK_TYPE_RDLCK ((lib9p_lock_type_t)UINT8_C(0)) +#define LIB9P_LOCK_TYPE_WRLCK ((lib9p_lock_type_t)UINT8_C(1)) +#define LIB9P_LOCK_TYPE_UNLCK ((lib9p_lock_type_t)UINT8_C(2)) + +typedef uint32_t lib9p_lock_flags_t; + +/* unused ((lib9p_lock_flags_t)(1<<31)) */ +/* unused ((lib9p_lock_flags_t)(1<<30)) */ +/* unused ((lib9p_lock_flags_t)(1<<29)) */ +/* unused ((lib9p_lock_flags_t)(1<<28)) */ +/* unused ((lib9p_lock_flags_t)(1<<27)) */ +/* unused ((lib9p_lock_flags_t)(1<<26)) */ +/* unused ((lib9p_lock_flags_t)(1<<25)) */ +/* unused ((lib9p_lock_flags_t)(1<<24)) */ +/* unused ((lib9p_lock_flags_t)(1<<23)) */ +/* unused ((lib9p_lock_flags_t)(1<<22)) */ +/* unused ((lib9p_lock_flags_t)(1<<21)) */ +/* unused ((lib9p_lock_flags_t)(1<<20)) */ +/* unused ((lib9p_lock_flags_t)(1<<19)) */ +/* unused ((lib9p_lock_flags_t)(1<<18)) */ +/* unused ((lib9p_lock_flags_t)(1<<17)) */ +/* unused ((lib9p_lock_flags_t)(1<<16)) */ +/* unused ((lib9p_lock_flags_t)(1<<15)) */ +/* unused ((lib9p_lock_flags_t)(1<<14)) */ +/* unused ((lib9p_lock_flags_t)(1<<13)) */ +/* unused ((lib9p_lock_flags_t)(1<<12)) */ +/* unused ((lib9p_lock_flags_t)(1<<11)) */ +/* unused ((lib9p_lock_flags_t)(1<<10)) */ +/* unused ((lib9p_lock_flags_t)(1<<9)) */ +/* unused ((lib9p_lock_flags_t)(1<<8)) */ +/* unused ((lib9p_lock_flags_t)(1<<7)) */ +/* unused ((lib9p_lock_flags_t)(1<<6)) */ +/* unused ((lib9p_lock_flags_t)(1<<5)) */ +/* unused ((lib9p_lock_flags_t)(1<<4)) */ +/* unused ((lib9p_lock_flags_t)(1<<3)) */ +/* unused ((lib9p_lock_flags_t)(1<<2)) */ +#define LIB9P_LOCK_FLAGS_RECLAIM ((lib9p_lock_flags_t)(1<<1)) +#define LIB9P_LOCK_FLAGS_BLOCK ((lib9p_lock_flags_t)(1<<0)) + + +typedef uint8_t lib9p_lock_status_t; +#define LIB9P_LOCK_STATUS_SUCCESS ((lib9p_lock_status_t)UINT8_C(0)) +#define LIB9P_LOCK_STATUS_BLOCKED ((lib9p_lock_status_t)UINT8_C(1)) +#define LIB9P_LOCK_STATUS_ERROR ((lib9p_lock_status_t)UINT8_C(2)) +#define LIB9P_LOCK_STATUS_GRACE ((lib9p_lock_status_t)UINT8_C(3)) + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Tflush { lib9p_tag_t tag; uint16_t oldtag; @@ -196,19 +422,84 @@ struct lib9p_msg_Rwrite { uint32_t count; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rclunk { lib9p_tag_t tag; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rremove { lib9p_tag_t tag; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rwstat { lib9p_tag_t tag; }; #endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Rlerror { + lib9p_tag_t tag; + uint32_t ecode; +}; + +struct lib9p_msg_Rstatfs { + lib9p_tag_t tag; + uint32_t type; + uint32_t bsize; + uint64_t blocks; + uint64_t bfree; + uint64_t bavail; + uint64_t files; + uint64_t ffree; + uint64_t fsid; + uint32_t namelen; +}; + +struct lib9p_msg_Rrename { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Rsetattr { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Rxattrwalk { + lib9p_tag_t tag; + uint64_t attr_size; +}; + +struct lib9p_msg_Rxattrcreate { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Rreaddir { + lib9p_tag_t tag; + uint32_t count; + uint8_t *data; +}; + +struct lib9p_msg_Rfsync { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Rlink { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Rrenameat { + lib9p_tag_t tag; +}; + +struct lib9p_msg_Runlinkat { + lib9p_tag_t tag; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e struct lib9p_msg_Tsession { lib9p_tag_t tag; @@ -225,7 +516,7 @@ struct lib9p_msg_Rswrite { }; #endif /* CONFIG_9P_ENABLE_9P2000_e */ -#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Tread { lib9p_tag_t tag; lib9p_fid_t fid; @@ -243,11 +534,46 @@ struct lib9p_msg_Tremove { lib9p_fid_t fid; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Tstat { lib9p_tag_t tag; lib9p_fid_t fid; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Tstatfs { + lib9p_tag_t tag; + lib9p_fid_t fid; +}; + +struct lib9p_msg_Tlopen { + lib9p_tag_t tag; + lib9p_fid_t fid; + uint32_t flags; +}; + +struct lib9p_msg_Treadlink { + lib9p_tag_t tag; + lib9p_fid_t fid; +}; + +struct lib9p_msg_Treaddir { + lib9p_tag_t tag; + lib9p_fid_t fid; + uint64_t offset; + uint32_t count; +}; + +struct lib9p_msg_Tfsync { + lib9p_tag_t tag; + lib9p_fid_t fid; + uint32_t datasync; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rread { lib9p_tag_t tag; struct lib9p_d data; @@ -260,7 +586,7 @@ struct lib9p_msg_Twrite { struct lib9p_d data; }; -#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ #if CONFIG_9P_ENABLE_9P2000_e struct lib9p_msg_Rsread { lib9p_tag_t tag; @@ -268,7 +594,7 @@ struct lib9p_msg_Rsread { }; #endif /* CONFIG_9P_ENABLE_9P2000_e */ -#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Tversion { lib9p_tag_t tag; uint32_t max_msg_size; @@ -281,6 +607,8 @@ struct lib9p_msg_Rversion { struct lib9p_s version; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rerror { lib9p_tag_t tag; struct lib9p_s ename; @@ -289,6 +617,8 @@ struct lib9p_msg_Rerror { #endif /* CONFIG_9P_ENABLE_9P2000_u */ }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Twalk { lib9p_tag_t tag; lib9p_fid_t fid; @@ -297,7 +627,77 @@ struct lib9p_msg_Twalk { struct lib9p_s *wname; }; -#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Trename { + lib9p_tag_t tag; + lib9p_fid_t fid; + lib9p_fid_t dfid; + struct lib9p_s name; +}; + +struct lib9p_msg_Rreadlink { + lib9p_tag_t tag; + struct lib9p_s target; +}; + +struct lib9p_msg_Txattrwalk { + lib9p_tag_t tag; + lib9p_fid_t fid; + lib9p_fid_t newfid; + struct lib9p_s name; +}; + +struct lib9p_msg_Txattrcreate { + lib9p_tag_t tag; + lib9p_fid_t fid; + struct lib9p_s name; + uint64_t attr_size; + uint32_t flags; +}; + +struct lib9p_msg_Tgetlock { + lib9p_tag_t tag; + lib9p_fid_t fid; + uint8_t type; + uint64_t start; + uint64_t length; + uint32_t proc_id; + struct lib9p_s client_id; +}; + +struct lib9p_msg_Rgetlock { + lib9p_tag_t tag; + uint8_t type; + uint64_t start; + uint64_t length; + uint32_t proc_id; + struct lib9p_s client_id; +}; + +struct lib9p_msg_Tlink { + lib9p_tag_t tag; + lib9p_fid_t dfid; + lib9p_fid_t fid; + struct lib9p_s name; +}; + +struct lib9p_msg_Trenameat { + lib9p_tag_t tag; + lib9p_fid_t olddirfid; + struct lib9p_s oldname; + lib9p_fid_t newdirfid; + struct lib9p_s newname; +}; + +struct lib9p_msg_Tunlinkat { + lib9p_tag_t tag; + lib9p_fid_t dirfd; + struct lib9p_s name; + uint32_t flags; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ #if CONFIG_9P_ENABLE_9P2000_e struct lib9p_msg_Tsread { lib9p_tag_t tag; @@ -315,7 +715,7 @@ struct lib9p_msg_Tswrite { }; #endif /* CONFIG_9P_ENABLE_9P2000_e */ -#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_qid { lib9p_qt_t type; uint32_t vers; @@ -327,9 +727,9 @@ struct lib9p_msg_Tauth { lib9p_fid_t afid; struct lib9p_s uname; struct lib9p_s aname; -#if CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u lib9p_nuid_t n_uid; -#endif /* CONFIG_9P_ENABLE_9P2000_u */ +#endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ }; struct lib9p_msg_Tattach { @@ -338,11 +738,42 @@ struct lib9p_msg_Tattach { lib9p_fid_t afid; struct lib9p_s uname; struct lib9p_s aname; -#if CONFIG_9P_ENABLE_9P2000_u +#if CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u lib9p_nuid_t n_uid; -#endif /* CONFIG_9P_ENABLE_9P2000_u */ +#endif /* CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_u */ }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Tlcreate { + lib9p_tag_t tag; + lib9p_fid_t fid; + struct lib9p_s name; + uint32_t flags; + uint32_t mode; + lib9p_nuid_t gid; +}; + +struct lib9p_msg_Tsymlink { + lib9p_tag_t tag; + lib9p_fid_t fid; + struct lib9p_s name; + struct lib9p_s symtgt; + lib9p_nuid_t gid; +}; + +struct lib9p_msg_Tmknod { + lib9p_tag_t tag; + lib9p_fid_t dfid; + struct lib9p_s name; + uint32_t mode; + uint32_t major; + uint32_t minor; + lib9p_nuid_t gid; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Topen { lib9p_tag_t tag; lib9p_fid_t fid; @@ -357,6 +788,46 @@ struct lib9p_msg_Tcreate { lib9p_o_t mode; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Tgetattr { + lib9p_tag_t tag; + lib9p_fid_t fid; + lib9p_getattr_t request_mask; +}; + +struct lib9p_msg_Tsetattr { + lib9p_tag_t tag; + lib9p_fid_t fid; + lib9p_setattr_t valid; + uint32_t mode; + lib9p_nuid_t uid; + lib9p_nuid_t gid; + uint64_t filesize; + uint64_t atime_sec; + uint64_t atime_nsec; + uint64_t mtime_sec; + uint64_t mtime_nsec; +}; + +struct lib9p_msg_Tlock { + lib9p_tag_t tag; + lib9p_fid_t fid; + lib9p_lock_type_t type; + lib9p_lock_flags_t flags; + uint64_t start; + uint64_t length; + uint32_t proc_id; + struct lib9p_s client_id; +}; + +struct lib9p_msg_Rlock { + lib9p_tag_t tag; + lib9p_lock_status_t status; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_stat { uint16_t kern_type; uint32_t kern_dev; @@ -377,6 +848,8 @@ struct lib9p_stat { #endif /* CONFIG_9P_ENABLE_9P2000_u */ }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rauth { lib9p_tag_t tag; struct lib9p_qid aqid; @@ -393,6 +866,8 @@ struct lib9p_msg_Rwalk { struct lib9p_qid *wqid; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_L || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Ropen { lib9p_tag_t tag; struct lib9p_qid qid; @@ -405,6 +880,61 @@ struct lib9p_msg_Rcreate { uint32_t iounit; }; +#endif /* CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u */ +#if CONFIG_9P_ENABLE_9P2000_L +struct lib9p_msg_Rlopen { + lib9p_tag_t tag; + struct lib9p_qid qid; + uint32_t iounit; +}; + +struct lib9p_msg_Rlcreate { + lib9p_tag_t tag; + struct lib9p_qid qid; + uint32_t iounit; +}; + +struct lib9p_msg_Rsymlink { + lib9p_tag_t tag; + struct lib9p_qid qid; +}; + +struct lib9p_msg_Rmknod { + lib9p_tag_t tag; + struct lib9p_qid qid; +}; + +struct lib9p_msg_Rgetattr { + lib9p_tag_t tag; + uint64_t valid; + struct lib9p_qid qid; + uint32_t mode; + lib9p_nuid_t uid; + lib9p_nuid_t gid; + uint64_t nlink; + uint64_t rdev; + uint64_t filesize; + uint64_t blksize; + uint64_t blocks; + uint64_t atime_sec; + uint64_t atime_nsec; + uint64_t mtime_sec; + uint64_t mtime_nsec; + uint64_t ctime_sec; + uint64_t ctime_nsec; + uint64_t btime_sec; + uint64_t btime_nsec; + uint64_t gen; + uint64_t data_version; +}; + +struct lib9p_msg_Tmkdir { + lib9p_tag_t tag; + struct lib9p_qid qid; +}; + +#endif /* CONFIG_9P_ENABLE_9P2000_L */ +#if CONFIG_9P_ENABLE_9P2000 || CONFIG_9P_ENABLE_9P2000_e || CONFIG_9P_ENABLE_9P2000_u struct lib9p_msg_Rstat { lib9p_tag_t tag; struct lib9p_stat stat; |