diff options
author | Cy Schubert <cy@FreeBSD.org> | 2020-05-21 05:01:52 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2020-05-21 05:01:52 +0000 |
commit | 6a53c00e64c4cf911eb00846733d9e6a47b2e7f4 (patch) | |
tree | 60a7720d2d4edfe62b094e2665743e8879ebb911 /util/net_help.h | |
parent | e2fe726866d062155f6b1aae749375475ef19191 (diff) |
Diffstat (limited to 'util/net_help.h')
-rw-r--r-- | util/net_help.h | 15 |
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 */ |