aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/core/content_object.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/hicn/transport/core/content_object.cc')
-rw-r--r--libtransport/src/hicn/transport/core/content_object.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/libtransport/src/hicn/transport/core/content_object.cc b/libtransport/src/hicn/transport/core/content_object.cc
index 83b545c05..d05239372 100644
--- a/libtransport/src/hicn/transport/core/content_object.cc
+++ b/libtransport/src/hicn/transport/core/content_object.cc
@@ -22,6 +22,7 @@ extern "C" {
TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat")
#endif
#include <hicn/hicn.h>
+#include <hicn/util/ip_address.h>
}
#include <cstring>
@@ -153,7 +154,7 @@ ContentObject &ContentObject::setPathLabel(uint32_t path_label) {
return *this;
}
-void ContentObject::setLocator(const ip_address_t &ip_address) {
+void ContentObject::setLocator(const ip_prefix_t &ip_address) {
if (hicn_data_set_locator(format_, packet_start_, &ip_address) < 0) {
throw errors::RuntimeException("Error setting content object locator");
}
@@ -161,8 +162,8 @@ void ContentObject::setLocator(const ip_address_t &ip_address) {
return;
}
-ip_address_t ContentObject::getLocator() const {
- ip_address_t ip;
+ip_prefix_t ContentObject::getLocator() const {
+ ip_prefix_t ip;
if (hicn_data_get_locator(format_, packet_start_, &ip) < 0) {
throw errors::RuntimeException("Error getting content object locator.");