summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/auth/fcall.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-04-11 20:23:34 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-04-11 20:23:34 +0200
commit464763202be7bdafa703c8c2ecfe1f4a5142f26f (patch)
tree76487fcd0124776ac366efb1bbcb4b408aea46a9 /sys/src/ape/lib/auth/fcall.h
parent21aee5d8cbd1ebae796cdc58404b8d8902738370 (diff)
ape: add libauth, libbio, libmp and libsec as replacements for openssl
Diffstat (limited to 'sys/src/ape/lib/auth/fcall.h')
-rw-r--r--sys/src/ape/lib/auth/fcall.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/src/ape/lib/auth/fcall.h b/sys/src/ape/lib/auth/fcall.h
new file mode 100644
index 000000000..6da9bbe1d
--- /dev/null
+++ b/sys/src/ape/lib/auth/fcall.h
@@ -0,0 +1,20 @@
+#define VERSION9P "9P2000"
+#define MAXWELEM 16
+
+#define GBIT8(p) ((p)[0])
+#define GBIT16(p) ((p)[0]|((p)[1]<<8))
+#define GBIT32(p) ((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))
+#define GBIT64(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\
+ ((vlong)((p)[4]|((p)[5]<<8)|((p)[6]<<16)|((p)[7]<<24)) << 32))
+
+#define PBIT8(p,v) (p)[0]=(v)
+#define PBIT16(p,v) (p)[0]=(v);(p)[1]=(v)>>8
+#define PBIT32(p,v) (p)[0]=(v);(p)[1]=(v)>>8;(p)[2]=(v)>>16;(p)[3]=(v)>>24
+#define PBIT64(p,v) (p)[0]=(v);(p)[1]=(v)>>8;(p)[2]=(v)>>16;(p)[3]=(v)>>24;\
+ (p)[4]=(v)>>32;(p)[5]=(v)>>40;(p)[6]=(v)>>48;(p)[7]=(v)>>56
+
+#define BIT8SZ 1
+#define BIT16SZ 2
+#define BIT32SZ 4
+#define BIT64SZ 8
+#define QIDSZ (BIT8SZ+BIT32SZ+BIT64SZ)