+/* Prototypes */
+
+/****f* silcutil/SilcBufferFormatAPI/silc_buffer_format
+ *
+ * SYNOPSIS
+ *
+ * int silc_buffer_format(SilcBuffer dst, ...);
+ *
+ * DESCRIPTION
+ *
+ * Formats a buffer from a variable argument list. Returns -1 on error
+ * and the length of the formatted buffer otherwise.
+ *
+ * EXAMPLE
+ *
+ * ret = silc_buffer_format(buffer,
+ * SILC_STR_INT(intval),
+ * SILC_STR_CHAR(charval),
+ * SILC_STR_INT(intval),
+ * SILC_STR_SHORT(str_len),
+ * SILC_STR_UI_XNSTRING(str, str_len),
+ * SILC_STR_END);
+ * if (ret < 0)
+ * error;
+ *
+ ***/
+int silc_buffer_format(SilcBuffer dst, ...);
+
+/****f* silcutil/SilcBufferFormatAPI/silc_buffer_unformat
+ *
+ * SYNOPSIS
+ *
+ * int silc_buffer_unformat(SilcBuffer src, ...);
+ *
+ * DESCRIPTION
+ *
+ * Unformats a buffer from a variable argument list. Returns -1 on error
+ * and the length of the unformatted buffer otherwise.
+ *
+ * EXAMPLE
+ *
+ * ret = silc_buffer_unformat(buffer,
+ * SILC_STR_INT(&intval),
+ * SILC_STR_CHAR(&charval),
+ * SILC_STR_INT(&intval2),
+ * SILC_STR_UI16_NSTRING_ALLOC(&str, &str_len),
+ * SILC_STR_END);
+ * if (ret < 0)
+ * error;
+ *
+ ***/
+int silc_buffer_unformat(SilcBuffer src, ...);
+
+/****f* silcutil/SilcBufferFormatAPI/silc_buffer_format_vp
+ *
+ * SYNOPSIS
+ *
+ * int silc_buffer_format_vp(SilcBuffer dst, va_list vp);
+ *
+ * DESCRIPTION
+ *
+ * Formats a buffer from a variable argument list indicated by the `ap'.
+ * Returns -1 on error and the length of the formatted buffer otherwise.
+ *
+ ***/
+int silc_buffer_format_vp(SilcBuffer dst, va_list ap);
+
+/****f* silcutil/SilcBufferFormatAPI/silc_buffer_unformat_vp
+ *
+ * SYNOPSIS
+ *
+ * int silc_buffer_unformat_vp(SilcBuffer src, va_list vp);
+ *
+ * DESCRIPTION
+ *
+ * Unformats a buffer from a variable argument list indicated by the `ap'.
+ * Returns -1 on error and the length of the unformatted buffer otherwise.
+ *
+ ***/
+int silc_buffer_unformat_vp(SilcBuffer src, va_list ap);
+
+/****f* silcutil/SilcBufferFormatAPI/silc_buffer_strformat
+ *
+ * SYNOPSIS
+ *
+ * int silc_buffer_strformat(SilcBuffer dst, ...);
+ *
+ * DESCRIPTION
+ *
+ * Formats a buffer from variable argument list of strings. Each
+ * string must be NULL-terminated and the variable argument list must
+ * be end with SILC_STR_END argument. This allows that a string in
+ * the list can be NULL, in which case it is skipped. This automatically
+ * allocates the space for the buffer data but `dst' must be already
+ * allocated by the caller.
+ *
+ * EXAMPLE
+ *
+ * ret = silc_buffer_strformat(buffer, "foo", "bar", SILC_STR_END);
+ * if (ret < 0)
+ * error;
+ *
+ ***/
+int silc_buffer_strformat(SilcBuffer dst, ...);
+
+/* Macros for expanding parameters into variable function argument list.
+ These are passed to silc_buffer_format and silc_buffer_unformat
+ functions. */
+