diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2015-11-08 22:34:08 -0800 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2015-11-08 22:34:08 -0800 |
commit | bd37667a59b8b943102ba0e04160e9541e84cebf (patch) | |
tree | b742aacedd89ee329b8773c8c3ac5fdfb3322ab4 | |
parent | a4989e585a83acfe63cd587a18993006674c3443 (diff) | |
download | rabbitmq-c-bd37667a59b8b943102ba0e04160e9541e84cebf.tar.gz |
Lib: remove useless #includes in amqp_hostcheck.*
Also add some documentation of what the function does.
-rw-r--r-- | librabbitmq/amqp_hostcheck.c | 2 | ||||
-rw-r--r-- | librabbitmq/amqp_hostcheck.h | 16 |
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); |