index e76211965a416d4e06d6fa93bdfbcc3e1d32b2e9..6f0907feee2c2e5243e61e2c37ce47419a7539b2 100644 (file)
sdb_proto_marshal(char *buf, size_t buf_len, uint32_t code,
uint32_t msg_len, const char *msg);
+/*
+ * sdb_proto_unmarshal_header:
+ * Read and decode a message header from the specified string buffer.
+ *
+ * Returns:
+ * - 0 on success
+ * - a negative value else
+ */
+int
+sdb_proto_unmarshal_header(sdb_strbuf_t *buf,
+ uint32_t *code, uint32_t *msg_len);
+
uint32_t
sdb_proto_get_int(sdb_strbuf_t *buf, size_t offset);