MINOR: istbuf: add ist2buf() function

Purpose of this function is to build a <struct buffer> from a <struct
ist>.
diff --git a/include/common/istbuf.h b/include/common/istbuf.h
index 9b6ce7c..a533c71 100644
--- a/include/common/istbuf.h
+++ b/include/common/istbuf.h
@@ -139,6 +139,19 @@
 	return b_putblk(b, ist.ptr, ist.len);
 }
 
+/* builds and return a <struct buffer> based on <ist>
+ */
+static inline struct buffer ist2buf(const struct ist ist)
+{
+	struct buffer buf;
+
+	buf.area = ist.ptr;
+	buf.size = ist.len;
+	buf.data = ist.len;
+	buf.head = 0;
+	return buf;
+}
+
 #endif /* _COMMON_ISTBUF_H */
 
 /*