aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c')
-rw-r--r--src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c b/src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c
new file mode 100644
index 0000000..a729b03
--- /dev/null
+++ b/src/libtipidee/tipidee_fcgi_beginrequest_body_unpack.c
@@ -0,0 +1,14 @@
+/* ISC license. */
+
+#include <string.h>
+
+#include <skalibs/uint16.h>
+
+#include <tipidee/fcgi.h>
+
+void tipidee_fcgi_beginrequest_body_unpack (char const *s, fcgi_beginrequest_body *bd)
+{
+ uint16_unpack_big(s, &bd->role) ; s += 2 ;
+ bd->flags = *s++ ;
+ memcpy((char *)bd->reserved, s, 5) ; s += 5 ;
+}