diff options
Diffstat (limited to 'libtransport/includes/hicn/transport/core/name.h')
-rw-r--r-- | libtransport/includes/hicn/transport/core/name.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libtransport/includes/hicn/transport/core/name.h b/libtransport/includes/hicn/transport/core/name.h index 46bbd107d..ea72797ad 100644 --- a/libtransport/includes/hicn/transport/core/name.h +++ b/libtransport/includes/hicn/transport/core/name.h @@ -51,6 +51,7 @@ class Name { public: using NameStruct = hicn_name_t; + using Type = hicn_name_type_t; Name(); @@ -80,12 +81,12 @@ class Name { bool equals(const Name &name, bool consider_segment = true) const; - TRANSPORT_ALWAYS_INLINE bool isIp4() { return hicn_name_is_ip4(&name_); } - uint32_t getHash32(bool consider_suffix = true) const; void clear(); + Type getType() const; + uint32_t getSuffix() const; std::shared_ptr<Sockaddr> getAddress() const; @@ -124,14 +125,14 @@ struct compare2 {}; template <> struct compare2<transport::core::Name> { - size_t operator()(const transport::core::Name &name1, - const transport::core::Name &name2) const; + size_t operator()(const transport::core::Name &name1, const transport::core::Name &name2) const; }; } // end namespace core } // end namespace transport + namespace std { template <> struct hash<transport::core::Name> { |