+/****f* silcutil/SilcBufferAPI/silc_buffer_memcmp
+ *
+ * SYNOPSIS
+ *
+ * static inline
+ * SilcBool silc_buffer_memcmp(SilcBuffer buffer,
+ * const unsigned char *data,
+ * SilcUInt32 data_len)
+ *
+ * DESCRIPTION
+ *
+ * Compares the data area of the buffer with the `data'. Returns TRUE
+ * if the data area is identical to `data' or FALSE if they differ.
+ *
+ ***/
+
+static inline
+SilcBool silc_buffer_memcmp(SilcBuffer buffer, const unsigned char *data,
+ SilcUInt32 data_len)
+{
+ if (silc_buffer_len(buffer) != data_len)
+ return FALSE;
+ return memcmp(buffer->data, data, data_len) == 0;
+}
+