aboutsummaryrefslogtreecommitdiff
path: root/src/netaddr.cpp
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2019-06-11 14:25:40 -0400
committerDeterminant <[email protected]>2019-06-11 14:25:40 -0400
commitef377f5d85503451a16d50fbc535a7537a28b57f (patch)
treea57d9268a0984107ad7b483c942a992df6e6a6ec /src/netaddr.cpp
parent05ffb2ce9f4a0cbaca05a1d46b040743d661ce25 (diff)
...
Diffstat (limited to 'src/netaddr.cpp')
-rw-r--r--src/netaddr.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/netaddr.cpp b/src/netaddr.cpp
index 109a6ac..1387b84 100644
--- a/src/netaddr.cpp
+++ b/src/netaddr.cpp
@@ -30,6 +30,16 @@ uint32_t netaddr_get_ip(const netaddr_t *self) { return self->ip; }
uint16_t netaddr_get_port(const netaddr_t *self) { return self->port; }
+netaddr_array_t *netaddr_array_new() { return new netaddr_array_t(); }
+netaddr_array_t *netaddr_array_new_from_addrs(const netaddr_t * const *addrs, size_t naddrs) {
+ auto res = new netaddr_array_t();
+ for (size_t i = 0; i < naddrs; i++)
+ (*res)[i] = *addrs[i];
+ return res;
+}
+
+void netaddr_array_free(netaddr_array_t *self) { delete self; }
+
}
#endif