summaryrefslogtreecommitdiffstats
path: root/libtransport/includes
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2020-09-18 17:39:03 +0200
committerMauro Sardara <msardara@cisco.com>2020-09-18 17:41:14 +0200
commit20a773677230374ffa2d5d140f7d46032fb7bc9d (patch)
tree972ba743c7b1cfbbabd38024215af670d4dc2e3c /libtransport/includes
parent22738e6177e9e1348e5a9c23c5a71e1d1ef7246f (diff)
Revert to [HICN-638] Check if systemd is running before enabling hicn-light service
Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I1810d96e001a4e6e097e1efa331b682af750925d
Diffstat (limited to 'libtransport/includes')
-rw-r--r--libtransport/includes/hicn/transport/core/name.h9
-rw-r--r--libtransport/includes/hicn/transport/protocols/CMakeLists.txt20
-rw-r--r--libtransport/includes/hicn/transport/protocols/transport_algorithm.h72
3 files changed, 5 insertions, 96 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> {
diff --git a/libtransport/includes/hicn/transport/protocols/CMakeLists.txt b/libtransport/includes/hicn/transport/protocols/CMakeLists.txt
deleted file mode 100644
index 5d8fc69b2..000000000
--- a/libtransport/includes/hicn/transport/protocols/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2017-2019 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
-
-list(APPEND HEADER_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/transport_algorithm.h
-)
-
-set(HEADER_FILES ${HEADER_FILES} PARENT_SCOPE) \ No newline at end of file
diff --git a/libtransport/includes/hicn/transport/protocols/transport_algorithm.h b/libtransport/includes/hicn/transport/protocols/transport_algorithm.h
deleted file mode 100644
index f5c8cf415..000000000
--- a/libtransport/includes/hicn/transport/protocols/transport_algorithm.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2020 Cisco and/or its affiliates.
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at:
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef transport_algorithm_h
-#define transport_algorithm_h
-
-#include <hicn/header.h>
-#include <stddef.h>
-#include <stdint.h>
-
-/**
- * TransportAlgorithm: class containing the protocol machinery
- */
-#ifdef __cplusplus
-
-#include <hicn/transport/core/content_object.h>
-
-class TransportAlgorithm {
- public:
- virtual ~TransportAlgorithm() = default;
- virtual void reset() = 0;
- virtual uint32_t onContentObject(uint32_t suffix, uint32_t path_label) = 0;
- virtual uint32_t onInterestTimeout(uint32_t suffix) = 0;
- virtual void onInterestSent(uint32_t suffix) = 0;
- virtual void sessionEnd() = 0;
-};
-
-extern "C" {
-
-#else
-typedef void *TransportAlgorithm;
-#endif
-
-typedef void *(allocator_t)(size_t size);
-typedef void *(deallocator_t)(void *ptr);
-
-void transportAlgorithm_Init(allocator_t *allocator,
- deallocator_t *deallocator);
-
-TransportAlgorithm *transportAlgorithm_CreateRaaqm(
- double drop_factor, double minimum_drop_probability, double gamma,
- double beta, uint32_t sample_number, uint32_t interest_lifetime,
- double beta_wifi, double drop_wifi, double beta_lte, double drop_lte,
- unsigned int wifi_delay, unsigned int lte_delay, double max_window,
- double min_window);
-
-void transportAlgorithm_Destroy(TransportAlgorithm *algorithm);
-
-uint32_t transportAlgorithm_OnContentObject(TransportAlgorithm *algorithm,
- uint32_t suffix,
- uint32_t path_label);
-
-uint32_t transportAlgorithm_OnInterestTimeout(TransportAlgorithm *algorithm,
- uint32_t suffix);
-
-#ifdef __cplusplus
-} /* __cplusplus */
-#endif
-
-#endif /* transport_algorithm_h */ \ No newline at end of file