summaryrefslogtreecommitdiff
path: root/lib9p/include
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-02 12:44:41 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-02 12:44:41 -0600
commit50cfe77ace4caa424352a163f90bbf7a684b60d6 (patch)
treeeec52aca00a7dada9335cef9f3f6555b4039c851 /lib9p/include
parentada828fc3eaf9891e1bbb6503106d36ef53b6c8a (diff)
more bitfield
Diffstat (limited to 'lib9p/include')
-rw-r--r--lib9p/include/lib9p/_types.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib9p/include/lib9p/_types.h b/lib9p/include/lib9p/_types.h
index cd1ded5..b904318 100644
--- a/lib9p/include/lib9p/_types.h
+++ b/lib9p/include/lib9p/_types.h
@@ -17,7 +17,18 @@ enum lib9p_version {
const char *lib9p_version_str(enum lib9p_version);
-/* non-message structs ********************************************************/
+/* non-message types **********************************************************/
+
+typedef uint8_t lib9p_qt_t;
+#define LIB9P_QT_DIR ((lib9p_qt_t)(1<<7))
+#define LIB9P_QT_APPEND ((lib9p_qt_t)(1<<6))
+#define LIB9P_QT_EXCL ((lib9p_qt_t)(1<<5))
+#define LIB9P_QT__PLAN9_MOUNT ((lib9p_qt_t)(1<<4))
+#define LIB9P_QT_AUTH ((lib9p_qt_t)(1<<3))
+#define LIB9P_QT_TMP ((lib9p_qt_t)(1<<2))
+#define LIB9P_QT_SYMLINK ((lib9p_qt_t)(1<<1))
+#define LIB9P_QT__UNUSED_0 ((lib9p_qt_t)(1<<0))
+#define LIB9P_QT_FILE ((lib9p_qt_t)(0))
struct lib9p_d {
uint32_t len;
@@ -30,9 +41,9 @@ struct lib9p_s {
};
struct lib9p_qid {
- lib9p_qid_type_t type;
- uint32_t vers;
- uint64_t path;
+ lib9p_qt_t type;
+ uint32_t vers;
+ uint64_t path;
};
struct lib9p_stat {