summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librabbitmq/amqp_hostcheck.c2
-rw-r--r--librabbitmq/amqp_hostcheck.h16
2 files changed, 13 insertions, 5 deletions
diff --git a/librabbitmq/amqp_hostcheck.c b/librabbitmq/amqp_hostcheck.c
index 8ad2cf7..68e068d 100644
--- a/librabbitmq/amqp_hostcheck.c
+++ b/librabbitmq/amqp_hostcheck.c
@@ -23,7 +23,7 @@
* copyright holder.
*/
-#include "amqp_private.h"
+#include "amqp_hostcheck.h"
#include <string.h>
diff --git a/librabbitmq/amqp_hostcheck.h b/librabbitmq/amqp_hostcheck.h
index 2832933..9415806 100644
--- a/librabbitmq/amqp_hostcheck.h
+++ b/librabbitmq/amqp_hostcheck.h
@@ -26,10 +26,18 @@
* copyright holder.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+/**
+ * Determine whether hostname matches match_pattern.
+ *
+ * match_pattern may include wildcards.
+ *
+ * Match is performed based on the rules set forth in RFC6125 section 6.4.3.
+ * http://tools.ietf.org/html/rfc6125#section-6.4.3
+ *
+ * \param match_pattern RFC6125 compliant pattern
+ * \param hostname hostname to match against
+ * \returns 1 if hostname matches, 0 otherwise.
+ */
int
amqp_hostcheck(const char *match_pattern, const char *hostname);