aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/hicn/transport/core/name.h
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2020-01-07 11:46:02 +0100
committerMauro Sardara <msardara@cisco.com>2020-02-21 15:48:18 +0100
commit35058cdfe0134c88f1aa8d23342d1d7b9d39e296 (patch)
tree978ca9c2232ac381c8391b3d1eeb0f875670d5b1 /libtransport/src/hicn/transport/core/name.h
parent0710f1ff754ebf01ae5befabb055349fe472b0c2 (diff)
[HICN-2] Added P2P confidential communication on hICN
P2P confidential communications exploit the TLS 1.3 protocol to let a consumer to establish a secure communication on an hICN name. Currently we don't support the consumer authentication (mutual authentication in TLS) and the 0-rtt session establishment. Change-Id: I2be073847c08a17f28c837d444081920c5e57a07 Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com> Signed-off-by: Olivier Roques <oroques+fdio@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core/name.h')
-rw-r--r--libtransport/src/hicn/transport/core/name.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libtransport/src/hicn/transport/core/name.h b/libtransport/src/hicn/transport/core/name.h
index 35625ddd1..ea72797ad 100644
--- a/libtransport/src/hicn/transport/core/name.h
+++ b/libtransport/src/hicn/transport/core/name.h
@@ -81,7 +81,7 @@ class Name {
bool equals(const Name &name, bool consider_segment = true) const;
- uint32_t getHash32() const;
+ uint32_t getHash32(bool consider_suffix = true) const;
void clear();
@@ -112,10 +112,27 @@ class Name {
std::ostream &operator<<(std::ostream &os, const Name &name);
+template <typename T>
+struct hash {};
+
+template <>
+struct hash<transport::core::Name> {
+ size_t operator()(const transport::core::Name &name) const;
+};
+
+template <typename T>
+struct compare2 {};
+
+template <>
+struct compare2<transport::core::Name> {
+ 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> {