From 08233d44a6cfde878d7e10bca38ae935ed1c8fd5 Mon Sep 17 00:00:00 2001 From: Mauro Date: Wed, 30 Jun 2021 07:57:22 +0000 Subject: [HICN-713] Transport Library Major Refactoring 2 Co-authored-by: Luca Muscariello Co-authored-by: Michele Papalini Co-authored-by: Olivier Roques Co-authored-by: Giulio Grassi Signed-off-by: Mauro Sardara Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2 --- libtransport/src/io_modules/loopback/CMakeLists.txt | 6 +----- libtransport/src/io_modules/loopback/local_face.cc | 7 +++---- libtransport/src/io_modules/loopback/local_face.h | 3 +-- libtransport/src/io_modules/loopback/loopback_module.cc | 6 +++--- 4 files changed, 8 insertions(+), 14 deletions(-) (limited to 'libtransport/src/io_modules/loopback') diff --git a/libtransport/src/io_modules/loopback/CMakeLists.txt b/libtransport/src/io_modules/loopback/CMakeLists.txt index ac6dc8068..b5ae0b7f7 100644 --- a/libtransport/src/io_modules/loopback/CMakeLists.txt +++ b/libtransport/src/io_modules/loopback/CMakeLists.txt @@ -11,9 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) - - list(APPEND MODULE_HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/loopback_module.h ) @@ -26,9 +23,8 @@ build_module(loopback_module SHARED SOURCES ${MODULE_SOURCE_FILES} DEPENDS ${DEPENDENCIES} - COMPONENT lib${LIBTRANSPORT} + COMPONENT ${LIBTRANSPORT_COMPONENT} INCLUDE_DIRS ${LIBTRANSPORT_INCLUDE_DIRS} ${LIBTRANSPORT_INTERNAL_INCLUDE_DIRS} - # LIBRARY_ROOT_DIR "vpp_plugins" DEFINITIONS ${COMPILER_DEFINITIONS} COMPILE_OPTIONS ${COMPILE_FLAGS} ) diff --git a/libtransport/src/io_modules/loopback/local_face.cc b/libtransport/src/io_modules/loopback/local_face.cc index a59dab235..b73444330 100644 --- a/libtransport/src/io_modules/loopback/local_face.cc +++ b/libtransport/src/io_modules/loopback/local_face.cc @@ -13,13 +13,12 @@ * limitations under the License. */ +#include +#include #include #include -#include #include -#include - namespace transport { namespace core { @@ -56,7 +55,7 @@ Face &Face::operator=(Face &&other) { } void Face::onPacket(const Packet &packet) { - TRANSPORT_LOGD("Sending content to local socket."); + DLOG_IF(INFO, VLOG_IS_ON(3)) << "Sending content to local socket."; if (Packet::isInterest(packet.data())) { rescheduleOnIoService(packet); diff --git a/libtransport/src/io_modules/loopback/local_face.h b/libtransport/src/io_modules/loopback/local_face.h index 1cbcc2c72..1f4101447 100644 --- a/libtransport/src/io_modules/loopback/local_face.h +++ b/libtransport/src/io_modules/loopback/local_face.h @@ -15,12 +15,11 @@ #pragma once +#include #include #include #include -#include - namespace transport { namespace core { diff --git a/libtransport/src/io_modules/loopback/loopback_module.cc b/libtransport/src/io_modules/loopback/loopback_module.cc index 0bdbf8c8e..f7dd5e7b0 100644 --- a/libtransport/src/io_modules/loopback/loopback_module.cc +++ b/libtransport/src/io_modules/loopback/loopback_module.cc @@ -13,8 +13,8 @@ * limitations under the License. */ +#include #include -#include #include namespace transport { @@ -35,8 +35,8 @@ bool LoopbackModule::isConnected() { return true; } void LoopbackModule::send(Packet &packet) { IoModule::send(packet); - TRANSPORT_LOGD("LoopbackModule: sending from %u to %d", local_id_, - 1 - local_id_); + DLOG_IF(INFO, VLOG_IS_ON(3)) << "LoopbackModule: sending from " << local_id_ + << " to " << 1 - local_id_; local_faces_.at(1 - local_id_)->send(packet); } -- cgit 1.2.3-korg