diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-16 16:22:55 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-02-16 16:22:55 +0000 |
commit | 947bd90138c8e5a5288a76708cf59349b79ebfe4 (patch) | |
tree | bbe3b19d074098ae29297b27b8934ce5c7f3fee1 /src/libutil/addr.h | |
parent | 3256178a2433f242f69c55f6eaee36ea314b2f1a (diff) | |
download | rspamd-947bd90138c8e5a5288a76708cf59349b79ebfe4.tar.gz rspamd-947bd90138c8e5a5288a76708cf59349b79ebfe4.zip |
Add routine to create inet address from the rdns reply
Diffstat (limited to 'src/libutil/addr.h')
-rw-r--r-- | src/libutil/addr.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libutil/addr.h b/src/libutil/addr.h index f6bbb40ae..afed3f8fc 100644 --- a/src/libutil/addr.h +++ b/src/libutil/addr.h @@ -17,6 +17,7 @@ #define ADDR_H_ #include "config.h" +#include "rdns.h" #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> @@ -60,6 +61,14 @@ rspamd_inet_addr_t * rspamd_inet_address_from_sa (const struct sockaddr *sa, socklen_t slen); /** + * Create new inet address from rdns reply + * @param rep reply element + * @return new ipv4 or ipv6 addr (port is NOT set) + */ +rspamd_inet_addr_t * rspamd_inet_address_from_rnds ( + const struct rdns_reply_entry *rep); + +/** * Parse string with ipv6 address of length `len` to `target` which should be * at least sizeof (in6_addr_t) * @param text input string |