summaryrefslogtreecommitdiff
path: root/util/net_help.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/net_help.h')
-rw-r--r--util/net_help.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/net_help.h b/util/net_help.h
index 79e2a834931a0..7a33a72035d59 100644
--- a/util/net_help.h
+++ b/util/net_help.h
@@ -471,4 +471,19 @@ int tls_session_ticket_key_cb(void *s, unsigned char* key_name,unsigned char* iv
/** Free memory used for TLS session ticket keys */
void listen_sslctx_delete_ticket_keys(void);
+/**
+ * RPZ format netblock to network byte order address and netblock
+ * example RPZ netblock format dnames:
+ * - 24.10.100.51.198.rpz-ip -> 198.51.100.10/24
+ * - 32.10.zz.db8.2001.rpz-ip -> 2001:db8:0:0:0:0:0:10/32
+ * @param dname: the dname containing RPZ format netblock
+ * @param dnamelen: length of dname
+ * @param addr: where to store sockaddr.
+ * @param addrlen: length of stored sockaddr is returned.
+ * @param net: where to store netmask
+ * @param af: where to store address family.
+ * @return 0 on error.
+ */
+int netblockdnametoaddr(uint8_t* dname, size_t dnamelen,
+ struct sockaddr_storage* addr, socklen_t* addrlen, int* net, int* af);
#endif /* NET_HELP_H */