diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-19 17:28:09 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-19 20:51:51 +0000 |
commit | 4f885f95f90764a70821546100dbf8980267b812 (patch) | |
tree | 83ebdd9b503864af57967c01c7d12d67fb88317e /src/libutil/addr.h | |
parent | 97efd226102375efb9a4e770d0d5823aa7d4fdfa (diff) | |
download | rspamd-4f885f95f90764a70821546100dbf8980267b812.tar.gz rspamd-4f885f95f90764a70821546100dbf8980267b812.zip |
[Minor] Core: Add sockaddr access utility
Diffstat (limited to 'src/libutil/addr.h')
-rw-r--r-- | src/libutil/addr.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/addr.h b/src/libutil/addr.h index 389cd1e97..3aa24bb1c 100644 --- a/src/libutil/addr.h +++ b/src/libutil/addr.h @@ -140,6 +140,14 @@ uint16_t rspamd_inet_address_get_port (const rspamd_inet_addr_t *addr); */ gint rspamd_inet_address_get_af (const rspamd_inet_addr_t *addr); +/** + * Returns sockaddr and size for this address + * @param addr + * @param sz + * @return + */ +struct sockaddr* rspamd_inet_address_get_sa (const rspamd_inet_addr_t *addr, + socklen_t *sz); /** * Makes a radix key from inet address |