From e5145b878f9de35676085409878a66899d2ee4f2 Mon Sep 17 00:00:00 2001 From: Angelo Mantellini Date: Wed, 30 Jan 2019 12:11:34 +0100 Subject: [HICN-18] first commit of libtransport for windows Change-Id: I3a43b22194aa13ae5de1746e3d4bd9a275070261 Signed-off-by: Angelo Mantellini --- libtransport/AUTHORS | 0 libtransport/CMakeLists.txt | 3 + libtransport/README.md | 0 libtransport/cmake/Modules/Android.cmake | 0 .../cmake/Modules/DefaultConfiguration.cmake | 0 libtransport/cmake/Modules/Ios.cmake | 0 libtransport/cmake/Modules/Packaging.cmake | 0 libtransport/cmake/Modules/TestMacros.cmake | 0 libtransport/src/hicn/transport/CMakeLists.txt | 0 libtransport/src/hicn/transport/config.h.in | 0 .../src/hicn/transport/core/CMakeLists.txt | 0 .../src/hicn/transport/core/content_object.cc | 2 + .../transport/core/hicn_forwarder_interface.cc | 1 - libtransport/src/hicn/transport/core/interest.cc | 2 + libtransport/src/hicn/transport/core/name.h | 2 + libtransport/src/hicn/transport/core/packet.cc | 2 + .../src/hicn/transport/core/pending_interest.cc | 14 ++-- .../src/hicn/transport/core/pending_interest.h | 8 +- libtransport/src/hicn/transport/core/portal.h | 35 ++++---- libtransport/src/hicn/transport/core/prefix.cc | 4 + .../src/hicn/transport/core/socket_connector.cc | 12 ++- .../src/hicn/transport/core/socket_connector.h | 2 +- .../src/hicn/transport/core/test/CMakeLists.txt | 0 .../hicn/transport/core/vpp_forwarder_interface.cc | 15 ++-- .../src/hicn/transport/errors/CMakeLists.txt | 0 libtransport/src/hicn/transport/errors/errors.h | 0 .../errors/invalid_ip_address_exception.h | 0 .../errors/malformed_ahpacket_exception.h | 0 .../transport/errors/malformed_name_exception.h | 0 .../transport/errors/malformed_packet_exception.h | 0 .../transport/errors/not_implemented_exception.h | 0 .../hicn/transport/errors/null_pointer_exception.h | 0 .../src/hicn/transport/errors/runtime_exception.h | 0 .../hicn/transport/errors/tokenizer_exception.h | 0 .../src/hicn/transport/http/CMakeLists.txt | 0 libtransport/src/hicn/transport/http/callbacks.h | 0 .../src/hicn/transport/http/client_connection.cc | 0 .../src/hicn/transport/http/client_connection.h | 0 .../src/hicn/transport/http/default_values.h | 0 libtransport/src/hicn/transport/http/facade.h | 0 libtransport/src/hicn/transport/http/message.h | 4 + libtransport/src/hicn/transport/http/request.cc | 0 libtransport/src/hicn/transport/http/request.h | 0 libtransport/src/hicn/transport/http/response.cc | 0 libtransport/src/hicn/transport/http/response.h | 0 .../src/hicn/transport/http/server_acceptor.cc | 0 .../src/hicn/transport/http/server_acceptor.h | 0 .../src/hicn/transport/http/server_publisher.cc | 0 .../src/hicn/transport/http/server_publisher.h | 0 .../src/hicn/transport/interfaces/CMakeLists.txt | 0 .../hicn/transport/interfaces/async_transport.h | 3 + .../transport/interfaces/full_duplex_socket.cc | 20 +++-- .../hicn/transport/interfaces/full_duplex_socket.h | 0 .../transport/interfaces/publication_options.h | 0 .../transport/interfaces/rtc_socket_consumer.cc | 3 +- .../transport/interfaces/rtc_socket_consumer.h | 0 .../transport/interfaces/rtc_socket_producer.cc | 1 - .../transport/interfaces/rtc_socket_producer.h | 0 .../src/hicn/transport/interfaces/socket.h | 0 .../hicn/transport/interfaces/socket_consumer.h | 0 .../interfaces/socket_options_default_values.h | 0 .../transport/interfaces/socket_options_keys.h | 0 .../hicn/transport/interfaces/socket_producer.cc | 5 +- .../hicn/transport/interfaces/socket_producer.h | 0 .../src/hicn/transport/portability/CMakeLists.txt | 6 ++ .../src/hicn/transport/portability/c_portability.h | 0 .../src/hicn/transport/portability/portability.h | 4 + .../hicn/transport/portability/win_portability.h | 38 +++++++++ .../src/hicn/transport/protocols/CMakeLists.txt | 0 libtransport/src/hicn/transport/protocols/cbr.cc | 0 libtransport/src/hicn/transport/protocols/cbr.h | 0 .../src/hicn/transport/protocols/consumer.conf | 0 .../hicn/transport/protocols/download_observer.h | 0 .../src/hicn/transport/protocols/protocol.cc | 0 .../src/hicn/transport/protocols/protocol.h | 0 libtransport/src/hicn/transport/protocols/raaqm.cc | 0 libtransport/src/hicn/transport/protocols/raaqm.h | 0 .../hicn/transport/protocols/raaqm_data_path.cc | 13 ++- .../src/hicn/transport/protocols/raaqm_data_path.h | 7 +- .../hicn/transport/protocols/rate_estimation.cc | 97 +++++++++++----------- .../src/hicn/transport/protocols/rate_estimation.h | 11 ++- libtransport/src/hicn/transport/protocols/rtc.h | 0 .../src/hicn/transport/protocols/rtc_data_path.cc | 0 .../hicn/transport/protocols/test/CMakeLists.txt | 0 .../protocols/test/test_transport_producer.cc | 0 libtransport/src/hicn/transport/protocols/vegas.h | 0 .../transport/protocols/vegas_rto_estimator.cc | 0 .../hicn/transport/protocols/vegas_rto_estimator.h | 0 .../src/hicn/transport/utils/CMakeLists.txt | 0 libtransport/src/hicn/transport/utils/array.h | 0 .../src/hicn/transport/utils/branch_prediction.h | 7 +- .../src/hicn/transport/utils/content_store.cc | 0 .../src/hicn/transport/utils/content_store.h | 0 .../src/hicn/transport/utils/conversions.h | 0 .../src/hicn/transport/utils/crypto_hash.h | 0 .../src/hicn/transport/utils/crypto_hash_type.h | 0 .../src/hicn/transport/utils/crypto_hasher.h | 0 .../src/hicn/transport/utils/crypto_suite.h | 0 .../src/hicn/transport/utils/daemonizator.cc | 0 .../src/hicn/transport/utils/daemonizator.h | 0 .../src/hicn/transport/utils/deadline_timer.h | 0 libtransport/src/hicn/transport/utils/endianess.h | 5 ++ .../hicn/transport/utils/epoll_event_reactor.cc | 0 .../src/hicn/transport/utils/epoll_event_reactor.h | 0 .../src/hicn/transport/utils/event_reactor.h | 0 .../src/hicn/transport/utils/event_thread.h | 0 .../src/hicn/transport/utils/fd_deadline_timer.h | 0 libtransport/src/hicn/transport/utils/hash.h | 0 libtransport/src/hicn/transport/utils/identity.h | 0 libtransport/src/hicn/transport/utils/key_id.h | 0 libtransport/src/hicn/transport/utils/linux.h | 0 libtransport/src/hicn/transport/utils/literals.h | 0 libtransport/src/hicn/transport/utils/membuf.cc | 3 + libtransport/src/hicn/transport/utils/membuf.h | 3 +- libtransport/src/hicn/transport/utils/min_filter.h | 0 .../src/hicn/transport/utils/object_pool.h | 4 +- .../src/hicn/transport/utils/ring_buffer.h | 0 .../src/hicn/transport/utils/sharable_vector.h | 0 libtransport/src/hicn/transport/utils/signer.cc | 2 + libtransport/src/hicn/transport/utils/signer.h | 0 libtransport/src/hicn/transport/utils/socket.h | 0 libtransport/src/hicn/transport/utils/spinlock.h | 2 +- .../src/hicn/transport/utils/stream_buffer.h | 0 .../src/hicn/transport/utils/string_tokenizer.cc | 0 .../src/hicn/transport/utils/string_tokenizer.h | 0 libtransport/src/hicn/transport/utils/test.h | 0 libtransport/src/hicn/transport/utils/uri.cc | 0 libtransport/src/hicn/transport/utils/uri.h | 0 libtransport/src/hicn/transport/utils/verifier.cc | 2 + libtransport/src/hicn/transport/utils/verifier.h | 0 130 files changed, 219 insertions(+), 123 deletions(-) mode change 100755 => 100644 libtransport/AUTHORS mode change 100755 => 100644 libtransport/CMakeLists.txt mode change 100755 => 100644 libtransport/README.md mode change 100755 => 100644 libtransport/cmake/Modules/Android.cmake mode change 100755 => 100644 libtransport/cmake/Modules/DefaultConfiguration.cmake mode change 100755 => 100644 libtransport/cmake/Modules/Ios.cmake mode change 100755 => 100644 libtransport/cmake/Modules/Packaging.cmake mode change 100755 => 100644 libtransport/cmake/Modules/TestMacros.cmake mode change 100755 => 100644 libtransport/src/hicn/transport/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/config.h.in mode change 100755 => 100644 libtransport/src/hicn/transport/core/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/core/test/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/errors/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/errors/errors.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/invalid_ip_address_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/malformed_ahpacket_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/malformed_name_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/malformed_packet_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/not_implemented_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/null_pointer_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/runtime_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/errors/tokenizer_exception.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/http/callbacks.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/client_connection.cc mode change 100755 => 100644 libtransport/src/hicn/transport/http/client_connection.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/default_values.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/facade.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/message.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/request.cc mode change 100755 => 100644 libtransport/src/hicn/transport/http/request.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/response.cc mode change 100755 => 100644 libtransport/src/hicn/transport/http/response.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/server_acceptor.cc mode change 100755 => 100644 libtransport/src/hicn/transport/http/server_acceptor.h mode change 100755 => 100644 libtransport/src/hicn/transport/http/server_publisher.cc mode change 100755 => 100644 libtransport/src/hicn/transport/http/server_publisher.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/async_transport.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/full_duplex_socket.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/publication_options.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket_consumer.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket_options_default_values.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket_options_keys.h mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket_producer.cc mode change 100755 => 100644 libtransport/src/hicn/transport/interfaces/socket_producer.h mode change 100755 => 100644 libtransport/src/hicn/transport/portability/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/portability/c_portability.h mode change 100755 => 100644 libtransport/src/hicn/transport/portability/portability.h create mode 100644 libtransport/src/hicn/transport/portability/win_portability.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/cbr.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/cbr.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/consumer.conf mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/download_observer.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/protocol.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/protocol.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/raaqm.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/raaqm.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/raaqm_data_path.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/raaqm_data_path.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/rate_estimation.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/rate_estimation.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/rtc.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/rtc_data_path.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/test/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/test/test_transport_producer.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/vegas.h mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/vegas_rto_estimator.cc mode change 100755 => 100644 libtransport/src/hicn/transport/protocols/vegas_rto_estimator.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/CMakeLists.txt mode change 100755 => 100644 libtransport/src/hicn/transport/utils/array.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/branch_prediction.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/content_store.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/content_store.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/conversions.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/crypto_hash.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/crypto_hash_type.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/crypto_hasher.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/crypto_suite.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/daemonizator.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/daemonizator.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/deadline_timer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/endianess.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/epoll_event_reactor.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/epoll_event_reactor.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/event_reactor.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/event_thread.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/fd_deadline_timer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/hash.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/identity.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/key_id.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/linux.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/literals.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/membuf.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/membuf.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/min_filter.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/object_pool.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/ring_buffer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/sharable_vector.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/signer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/socket.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/spinlock.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/stream_buffer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/string_tokenizer.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/string_tokenizer.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/test.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/uri.cc mode change 100755 => 100644 libtransport/src/hicn/transport/utils/uri.h mode change 100755 => 100644 libtransport/src/hicn/transport/utils/verifier.h (limited to 'libtransport') diff --git a/libtransport/AUTHORS b/libtransport/AUTHORS old mode 100755 new mode 100644 diff --git a/libtransport/CMakeLists.txt b/libtransport/CMakeLists.txt old mode 100755 new mode 100644 index 097ab03ab..c5cb95260 --- a/libtransport/CMakeLists.txt +++ b/libtransport/CMakeLists.txt @@ -59,6 +59,7 @@ if ((BUILD_MEMIF_CONNECTOR OR BUILD_VPP_PLUGIN) AND "${CMAKE_SYSTEM_NAME}" STREQ ) endif () +include(WindowsMacros) include(IosMacros) find_package_wrapper(Libparc REQUIRED) find_package_wrapper(Asio REQUIRED) @@ -102,6 +103,7 @@ list(APPEND LIBRARIES ${VPP_LIBRARIES} ${ANDROID_LIBRARIES} ${OPENSSL_LIBRARIES} + ${WINDOWS_LIBRARIES} ) # Include dirs -- Order does matter! @@ -111,6 +113,7 @@ list(APPEND LIBTRANSPORT_INCLUDE_DIRS ${LIBPARC_INCLUDE_DIRS} ${CMAKE_THREADS_INCLUDE_DIRS} ${ASIO_INCLUDE_DIRS} + ${WINDOWS_INCLUDE_DIRS} ) add_subdirectory(${TRANSPORT_ROOT_PATH}) \ No newline at end of file diff --git a/libtransport/README.md b/libtransport/README.md old mode 100755 new mode 100644 diff --git a/libtransport/cmake/Modules/Android.cmake b/libtransport/cmake/Modules/Android.cmake old mode 100755 new mode 100644 diff --git a/libtransport/cmake/Modules/DefaultConfiguration.cmake b/libtransport/cmake/Modules/DefaultConfiguration.cmake old mode 100755 new mode 100644 diff --git a/libtransport/cmake/Modules/Ios.cmake b/libtransport/cmake/Modules/Ios.cmake old mode 100755 new mode 100644 diff --git a/libtransport/cmake/Modules/Packaging.cmake b/libtransport/cmake/Modules/Packaging.cmake old mode 100755 new mode 100644 diff --git a/libtransport/cmake/Modules/TestMacros.cmake b/libtransport/cmake/Modules/TestMacros.cmake old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/CMakeLists.txt b/libtransport/src/hicn/transport/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/config.h.in b/libtransport/src/hicn/transport/config.h.in old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/core/CMakeLists.txt b/libtransport/src/hicn/transport/core/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/core/content_object.cc b/libtransport/src/hicn/transport/core/content_object.cc index dc2056582..4cd5623c4 100644 --- a/libtransport/src/hicn/transport/core/content_object.cc +++ b/libtransport/src/hicn/transport/core/content_object.cc @@ -18,7 +18,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include } diff --git a/libtransport/src/hicn/transport/core/hicn_forwarder_interface.cc b/libtransport/src/hicn/transport/core/hicn_forwarder_interface.cc index 1d82ff0b0..e8b38cd7b 100644 --- a/libtransport/src/hicn/transport/core/hicn_forwarder_interface.cc +++ b/libtransport/src/hicn/transport/core/hicn_forwarder_interface.cc @@ -15,7 +15,6 @@ #include - #define ADDR_INET 1 #define ADDR_INET6 2 #define ADD_ROUTE 3 diff --git a/libtransport/src/hicn/transport/core/interest.cc b/libtransport/src/hicn/transport/core/interest.cc index ff4a5bb34..4ea0c4419 100644 --- a/libtransport/src/hicn/transport/core/interest.cc +++ b/libtransport/src/hicn/transport/core/interest.cc @@ -18,7 +18,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include } diff --git a/libtransport/src/hicn/transport/core/name.h b/libtransport/src/hicn/transport/core/name.h index b0da15026..b2f913986 100644 --- a/libtransport/src/hicn/transport/core/name.h +++ b/libtransport/src/hicn/transport/core/name.h @@ -24,7 +24,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include }; diff --git a/libtransport/src/hicn/transport/core/packet.cc b/libtransport/src/hicn/transport/core/packet.cc index 69cbb3cb3..dd150d723 100644 --- a/libtransport/src/hicn/transport/core/packet.cc +++ b/libtransport/src/hicn/transport/core/packet.cc @@ -19,7 +19,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include } diff --git a/libtransport/src/hicn/transport/core/pending_interest.cc b/libtransport/src/hicn/transport/core/pending_interest.cc index a2df9ba44..73bc41e87 100644 --- a/libtransport/src/hicn/transport/core/pending_interest.cc +++ b/libtransport/src/hicn/transport/core/pending_interest.cc @@ -34,10 +34,10 @@ PendingInterest::PendingInterest(Interest::Ptr &&interest, on_interest_timeout_callback_(), received_(false) {} -PendingInterest::PendingInterest(Interest::Ptr &&interest, - const OnContentObjectCallback &&on_content_object, - const OnInterestTimeoutCallback &&on_interest_timeout, - std::unique_ptr &&timer) +PendingInterest::PendingInterest( + Interest::Ptr &&interest, const OnContentObjectCallback &&on_content_object, + const OnInterestTimeoutCallback &&on_interest_timeout, + std::unique_ptr &&timer) : interest_(std::move(interest)), timer_(std::move(timer)), on_content_object_callback_(std::move(on_content_object)), @@ -60,7 +60,8 @@ const OnContentObjectCallback &PendingInterest::getOnDataCallback() const { return on_content_object_callback_; } -void PendingInterest::setOnDataCallback(const OnContentObjectCallback &on_content_object) { +void PendingInterest::setOnDataCallback( + const OnContentObjectCallback &on_content_object) { PendingInterest::on_content_object_callback_ = on_content_object; } @@ -68,7 +69,8 @@ const OnInterestTimeoutCallback &PendingInterest::getOnTimeoutCallback() const { return on_interest_timeout_callback_; } -void PendingInterest::setOnTimeoutCallback(const OnInterestTimeoutCallback &on_interest_timeout) { +void PendingInterest::setOnTimeoutCallback( + const OnInterestTimeoutCallback &on_interest_timeout) { PendingInterest::on_interest_timeout_callback_ = on_interest_timeout; } diff --git a/libtransport/src/hicn/transport/core/pending_interest.h b/libtransport/src/hicn/transport/core/pending_interest.h index 58b51db79..9a26c7b2b 100644 --- a/libtransport/src/hicn/transport/core/pending_interest.h +++ b/libtransport/src/hicn/transport/core/pending_interest.h @@ -34,8 +34,9 @@ class RawSocketInterface; template class Portal; -typedef std::function OnContentObjectCallback; -typedef std::function OnInterestTimeoutCallback; +typedef std::function + OnContentObjectCallback; +typedef std::function OnInterestTimeoutCallback; typedef std::function TimerCallback; class PendingInterest { @@ -77,7 +78,8 @@ class PendingInterest { const OnInterestTimeoutCallback &getOnTimeoutCallback() const; - void setOnTimeoutCallback(const OnInterestTimeoutCallback &on_interest_timeout); + void setOnTimeoutCallback( + const OnInterestTimeoutCallback &on_interest_timeout); private: Interest::Ptr interest_; diff --git a/libtransport/src/hicn/transport/core/portal.h b/libtransport/src/hicn/transport/core/portal.h index 58406bbde..0932b56c6 100644 --- a/libtransport/src/hicn/transport/core/portal.h +++ b/libtransport/src/hicn/transport/core/portal.h @@ -127,9 +127,7 @@ class Portal { forwarder_interface_.connect(is_consumer); } - ~Portal() { - stopEventsLoop(true); - } + ~Portal() { stopEventsLoop(true); } TRANSPORT_ALWAYS_INLINE bool interestIsPending(const Name &name) { auto it = pending_interest_hash_table_.find(name); @@ -153,10 +151,10 @@ class Portal { std::placeholders::_1, name)); } - TRANSPORT_ALWAYS_INLINE void sendInterest(Interest::Ptr &&interest, - const OnContentObjectCallback &&on_content_object_callback, - const OnInterestTimeoutCallback &&on_interest_timeout_callback) { - + TRANSPORT_ALWAYS_INLINE void sendInterest( + Interest::Ptr &&interest, + const OnContentObjectCallback &&on_content_object_callback, + const OnInterestTimeoutCallback &&on_interest_timeout_callback) { const Name name(interest->getName(), true); // Send it @@ -168,9 +166,8 @@ class Portal { std::make_unique(io_service_)); pending_interest_hash_table_[name]->startCountdown( - std::bind(&Portal::timerHandler, - this, std::placeholders::_1, name)); - + std::bind(&Portal::timerHandler, this, + std::placeholders::_1, name)); } TRANSPORT_ALWAYS_INLINE void timerHandler(const std::error_code &ec, @@ -187,9 +184,9 @@ class Portal { std::unique_ptr ptr = std::move(it->second); pending_interest_hash_table_.erase(it); - if(ptr->getOnTimeoutCallback() != UNSET_CALLBACK){ - ptr->on_interest_timeout_callback_(std::move(ptr->getInterest())); - }else if (consumer_callback_) { + if (ptr->getOnTimeoutCallback() != UNSET_CALLBACK) { + ptr->on_interest_timeout_callback_(std::move(ptr->getInterest())); + } else if (consumer_callback_) { consumer_callback_->onTimeout(std::move(ptr->getInterest())); } } @@ -231,7 +228,7 @@ class Portal { clear(); - if(kill_connection) { + if (kill_connection) { connector_.close(); } @@ -310,11 +307,11 @@ class Portal { interest_ptr->setReceived(); pending_interest_hash_table_.erase(content_object->getName()); - if(interest_ptr->getOnDataCallback() != UNSET_CALLBACK){ - interest_ptr->on_content_object_callback_( - std::move(interest_ptr->getInterest()), - std::move(content_object)); - }else if (consumer_callback_) { + if (interest_ptr->getOnDataCallback() != UNSET_CALLBACK) { + interest_ptr->on_content_object_callback_( + std::move(interest_ptr->getInterest()), + std::move(content_object)); + } else if (consumer_callback_) { consumer_callback_->onContentObject( std::move(interest_ptr->getInterest()), std::move(content_object)); diff --git a/libtransport/src/hicn/transport/core/prefix.cc b/libtransport/src/hicn/transport/core/prefix.cc index 69c2b845a..575bcc2ed 100644 --- a/libtransport/src/hicn/transport/core/prefix.cc +++ b/libtransport/src/hicn/transport/core/prefix.cc @@ -17,9 +17,13 @@ #include #include +#ifndef _WIN32 extern "C" { #include } +#else +#include +#endif #include #include diff --git a/libtransport/src/hicn/transport/core/socket_connector.cc b/libtransport/src/hicn/transport/core/socket_connector.cc index 704d3badb..84a843f14 100644 --- a/libtransport/src/hicn/transport/core/socket_connector.cc +++ b/libtransport/src/hicn/transport/core/socket_connector.cc @@ -13,6 +13,9 @@ * limitations under the License. */ +#ifdef _WIN32 +#include +#endif #include #include #include @@ -130,7 +133,8 @@ void SocketConnector::doWrite() { if (!output_buffer_.empty()) { doWrite(); } - } else if (ec.value() == static_cast(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { @@ -149,7 +153,8 @@ void SocketConnector::doReadBody(std::size_t body_length) { if (TRANSPORT_EXPECT_TRUE(!ec)) { receive_callback_(std::move(read_msg_)); doReadHeader(); - } else if (ec.value() == static_cast(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { @@ -176,7 +181,8 @@ void SocketConnector::doReadHeader() { } else { TRANSPORT_LOGE("Decoding error. Ignoring packet."); } - } else if (ec.value() == static_cast(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { diff --git a/libtransport/src/hicn/transport/core/socket_connector.h b/libtransport/src/hicn/transport/core/socket_connector.h index e014111e2..6eff1aff5 100644 --- a/libtransport/src/hicn/transport/core/socket_connector.h +++ b/libtransport/src/hicn/transport/core/socket_connector.h @@ -19,8 +19,8 @@ #include #include -#include #include +#include #include namespace transport { diff --git a/libtransport/src/hicn/transport/core/test/CMakeLists.txt b/libtransport/src/hicn/transport/core/test/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc index 0335c3829..828e31a0a 100644 --- a/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc +++ b/libtransport/src/hicn/transport/core/vpp_forwarder_interface.cc @@ -45,7 +45,8 @@ VPPForwarderInterface::VPPForwarderInterface(MemifConnector &connector) VPPForwarderInterface::~VPPForwarderInterface() { if (sw_if_index_ != uint32_t(~0) && VPPForwarderInterface::memif_api_) { - int ret = memif_binary_api_delete_memif(VPPForwarderInterface::memif_api_, sw_if_index_); + int ret = memif_binary_api_delete_memif(VPPForwarderInterface::memif_api_, + sw_if_index_); if (ret < 0) { TRANSPORT_LOGE("Error deleting memif with sw idx %u.", sw_if_index_); @@ -82,7 +83,7 @@ uint32_t VPPForwarderInterface::getMemifConfiguration() { memif_output_params_t output_params = {0}; ret = memif_binary_api_create_memif(VPPForwarderInterface::memif_api_, - &input_params, &output_params); + &input_params, &output_params); if (ret < 0) { throw errors::RuntimeException( @@ -105,8 +106,8 @@ void VPPForwarderInterface::consumerConnection() { input.swif = sw_if_index_; - int ret = hicn_binary_api_register_cons_app( - VPPForwarderInterface::hicn_api_, &input, &output); + int ret = hicn_binary_api_register_cons_app(VPPForwarderInterface::hicn_api_, + &input, &output); if (ret < 0) { throw errors::RuntimeException(hicn_binary_api_get_error_string(ret)); @@ -178,7 +179,7 @@ void VPPForwarderInterface::registerRoute(Prefix &prefix) { input.cs_reserved = content_store_reserved_; int ret = hicn_binary_api_register_prod_app( - VPPForwarderInterface::hicn_api_, &input, &output); + VPPForwarderInterface::hicn_api_, &input, &output); if (ret < 0) { throw errors::RuntimeException(hicn_binary_api_get_error_string(ret)); @@ -206,8 +207,8 @@ void VPPForwarderInterface::registerRoute(Prefix &prefix) { params.prefix->prefix_len = addr.prefix_len; params.face_id = face_id_; - int ret = hicn_binary_api_register_route( - VPPForwarderInterface::hicn_api_, ¶ms); + int ret = hicn_binary_api_register_route(VPPForwarderInterface::hicn_api_, + ¶ms); if (ret < 0) { throw errors::RuntimeException(hicn_binary_api_get_error_string(ret)); diff --git a/libtransport/src/hicn/transport/errors/CMakeLists.txt b/libtransport/src/hicn/transport/errors/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/errors.h b/libtransport/src/hicn/transport/errors/errors.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/invalid_ip_address_exception.h b/libtransport/src/hicn/transport/errors/invalid_ip_address_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/malformed_ahpacket_exception.h b/libtransport/src/hicn/transport/errors/malformed_ahpacket_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/malformed_name_exception.h b/libtransport/src/hicn/transport/errors/malformed_name_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/malformed_packet_exception.h b/libtransport/src/hicn/transport/errors/malformed_packet_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/not_implemented_exception.h b/libtransport/src/hicn/transport/errors/not_implemented_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/null_pointer_exception.h b/libtransport/src/hicn/transport/errors/null_pointer_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/runtime_exception.h b/libtransport/src/hicn/transport/errors/runtime_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/errors/tokenizer_exception.h b/libtransport/src/hicn/transport/errors/tokenizer_exception.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/CMakeLists.txt b/libtransport/src/hicn/transport/http/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/callbacks.h b/libtransport/src/hicn/transport/http/callbacks.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/client_connection.cc b/libtransport/src/hicn/transport/http/client_connection.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/client_connection.h b/libtransport/src/hicn/transport/http/client_connection.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/default_values.h b/libtransport/src/hicn/transport/http/default_values.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/facade.h b/libtransport/src/hicn/transport/http/facade.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/message.h b/libtransport/src/hicn/transport/http/message.h old mode 100755 new mode 100644 index 7d4485c90..b2f271bcb --- a/libtransport/src/hicn/transport/http/message.h +++ b/libtransport/src/hicn/transport/http/message.h @@ -15,6 +15,10 @@ #pragma once +#ifdef _WIN32 +#include +#endif + #include #include diff --git a/libtransport/src/hicn/transport/http/request.cc b/libtransport/src/hicn/transport/http/request.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/request.h b/libtransport/src/hicn/transport/http/request.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/response.cc b/libtransport/src/hicn/transport/http/response.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/response.h b/libtransport/src/hicn/transport/http/response.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/server_acceptor.cc b/libtransport/src/hicn/transport/http/server_acceptor.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/server_acceptor.h b/libtransport/src/hicn/transport/http/server_acceptor.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/server_publisher.cc b/libtransport/src/hicn/transport/http/server_publisher.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/http/server_publisher.h b/libtransport/src/hicn/transport/http/server_publisher.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/CMakeLists.txt b/libtransport/src/hicn/transport/interfaces/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/async_transport.h b/libtransport/src/hicn/transport/interfaces/async_transport.h old mode 100755 new mode 100644 index 492b4ec26..2911377a4 --- a/libtransport/src/hicn/transport/interfaces/async_transport.h +++ b/libtransport/src/hicn/transport/interfaces/async_transport.h @@ -20,7 +20,10 @@ #include #include +#ifndef _WIN32 #include +#endif + #include namespace transport { diff --git a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc index e06858cc3..0a091d94e 100644 --- a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc +++ b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.cc @@ -57,21 +57,23 @@ AsyncFullDuplexSocket::AsyncFullDuplexSocket(const Prefix &locator, producer_->setSocketOption(GeneralTransportOptions::OUTPUT_BUFFER_SIZE, uint32_t{150000}); - producer_->setSocketOption( - ProducerCallbacksOptions::CONTENT_PRODUCED, - std::bind(&AsyncFullDuplexSocket::onContentProduced, this, _1, _2, _3)); + ProducerContentCallback producer_callback = + std::bind(&AsyncFullDuplexSocket::onContentProduced, this, _1, _2, _3); + producer_->setSocketOption(ProducerCallbacksOptions::CONTENT_PRODUCED, + producer_callback); producer_->connect(); - consumer_->setSocketOption(ConsumerCallbacksOptions::CONTENT_OBJECT_TO_VERIFY, - (ConsumerContentObjectVerificationCallback)[]( - ConsumerSocket & s, const ContentObject &c) - ->bool { return true; }); + consumer_->setSocketOption( + ConsumerCallbacksOptions::CONTENT_OBJECT_TO_VERIFY, + (ConsumerContentObjectVerificationCallback)[](ConsumerSocket & s, + const ContentObject &c) + ->bool { return true; }); - ConsumerContentCallback callback = + ConsumerContentCallback consumer_callback = std::bind(&AsyncFullDuplexSocket::onContentRetrieved, this, _1, _2, _3); consumer_->setSocketOption(ConsumerCallbacksOptions::CONTENT_RETRIEVED, - callback); + consumer_callback); consumer_->setSocketOption(GeneralTransportOptions::MAX_INTEREST_RETX, uint32_t{4}); diff --git a/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h b/libtransport/src/hicn/transport/interfaces/full_duplex_socket.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/publication_options.h b/libtransport/src/hicn/transport/interfaces/publication_options.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc old mode 100755 new mode 100644 index cc4f478af..ef952a891 --- a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc +++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.cc @@ -22,8 +22,7 @@ namespace interface { RTCConsumerSocket::RTCConsumerSocket(int protocol, asio::io_service &io_service) : ConsumerSocket(protocol, io_service) {} -RTCConsumerSocket::RTCConsumerSocket(int protocol) - : ConsumerSocket(protocol) {} +RTCConsumerSocket::RTCConsumerSocket(int protocol) : ConsumerSocket(protocol) {} RTCConsumerSocket::~RTCConsumerSocket() {} diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_consumer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc index f19502dee..84c80dad7 100644 --- a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc +++ b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.cc @@ -72,7 +72,6 @@ RTCProducerSocket::RTCProducerSocket() prodLabel_ = ((rand() % 255) << 24UL); } - RTCProducerSocket::~RTCProducerSocket() {} void RTCProducerSocket::registerName(Prefix &producer_namespace) { diff --git a/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h b/libtransport/src/hicn/transport/interfaces/rtc_socket_producer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/socket.h b/libtransport/src/hicn/transport/interfaces/socket.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/socket_consumer.h b/libtransport/src/hicn/transport/interfaces/socket_consumer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h b/libtransport/src/hicn/transport/interfaces/socket_options_default_values.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/socket_options_keys.h b/libtransport/src/hicn/transport/interfaces/socket_options_keys.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.cc b/libtransport/src/hicn/transport/interfaces/socket_producer.cc old mode 100755 new mode 100644 index d9204f111..5bd522faf --- a/libtransport/src/hicn/transport/interfaces/socket_producer.cc +++ b/libtransport/src/hicn/transport/interfaces/socket_producer.cc @@ -54,7 +54,6 @@ ProducerSocket::ProducerSocket(asio::io_service &io_service) } ProducerSocket::~ProducerSocket() { - processing_thread_stop_ = true; portal_->stopEventsLoop(true); @@ -78,9 +77,7 @@ void ProducerSocket::serveForever() { } } -void ProducerSocket::stop() { - portal_->stopEventsLoop(); -} +void ProducerSocket::stop() { portal_->stopEventsLoop(); } void ProducerSocket::registerPrefix(const Prefix &producer_namespace) { served_namespaces_.push_back(producer_namespace); diff --git a/libtransport/src/hicn/transport/interfaces/socket_producer.h b/libtransport/src/hicn/transport/interfaces/socket_producer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/portability/CMakeLists.txt b/libtransport/src/hicn/transport/portability/CMakeLists.txt old mode 100755 new mode 100644 index eee973c2d..5ad3c8207 --- a/libtransport/src/hicn/transport/portability/CMakeLists.txt +++ b/libtransport/src/hicn/transport/portability/CMakeLists.txt @@ -22,5 +22,11 @@ list(APPEND SOURCE_FILES "" ) +if(WIN32) + list(APPEND HEADER_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/win_portability.h + ) +endif() + set(SOURCE_FILES ${SOURCE_FILES} PARENT_SCOPE) set(HEADER_FILES ${HEADER_FILES} PARENT_SCOPE) \ No newline at end of file diff --git a/libtransport/src/hicn/transport/portability/c_portability.h b/libtransport/src/hicn/transport/portability/c_portability.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/portability/portability.h b/libtransport/src/hicn/transport/portability/portability.h old mode 100755 new mode 100644 index 7063e1822..1d97a346e --- a/libtransport/src/hicn/transport/portability/portability.h +++ b/libtransport/src/hicn/transport/portability/portability.h @@ -17,6 +17,10 @@ #pragma once +#ifdef _WIN32 +#include +#endif + #include #include diff --git a/libtransport/src/hicn/transport/portability/win_portability.h b/libtransport/src/hicn/transport/portability/win_portability.h new file mode 100644 index 000000000..f1d6e2b0e --- /dev/null +++ b/libtransport/src/hicn/transport/portability/win_portability.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright 2017 Facebook, Inc. + * + * 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. + */ + +#pragma once +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define __ORDER_LITTLE_ENDIAN__ 0x41424344UL +#define __ORDER_BIG_ENDIAN__ 0x44434241UL +#define __BYTE_ORDER__ ('ABCD') +#undef DELETE + +#define HAVE_STRUCT_TIMESPEC +#include \ No newline at end of file diff --git a/libtransport/src/hicn/transport/protocols/CMakeLists.txt b/libtransport/src/hicn/transport/protocols/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/cbr.cc b/libtransport/src/hicn/transport/protocols/cbr.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/cbr.h b/libtransport/src/hicn/transport/protocols/cbr.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/consumer.conf b/libtransport/src/hicn/transport/protocols/consumer.conf old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/download_observer.h b/libtransport/src/hicn/transport/protocols/download_observer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/protocol.cc b/libtransport/src/hicn/transport/protocols/protocol.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/protocol.h b/libtransport/src/hicn/transport/protocols/protocol.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/raaqm.cc b/libtransport/src/hicn/transport/protocols/raaqm.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/raaqm.h b/libtransport/src/hicn/transport/protocols/raaqm.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/raaqm_data_path.cc b/libtransport/src/hicn/transport/protocols/raaqm_data_path.cc old mode 100755 new mode 100644 index f876cf4f8..2e7aa531a --- a/libtransport/src/hicn/transport/protocols/raaqm_data_path.cc +++ b/libtransport/src/hicn/transport/protocols/raaqm_data_path.cc @@ -42,10 +42,9 @@ RaaqmDataPath::RaaqmDataPath(double drop_factor, raw_data_bytes_received_(0), last_raw_data_bytes_received_(0), rtt_samples_(samples_), + last_received_pkt_(std::chrono::steady_clock::now()), average_rtt_(0), - alpha_(ALPHA) { - gettimeofday(&m_last_received_pkt_, 0); -} + alpha_(ALPHA) {} RaaqmDataPath &RaaqmDataPath::insertNewRtt(uint64_t new_rtt) { rtt_ = new_rtt; @@ -59,7 +58,7 @@ RaaqmDataPath &RaaqmDataPath::insertNewRtt(uint64_t new_rtt) { prop_delay_ = rtt_min_; } - gettimeofday(&m_last_received_pkt_, 0); + last_received_pkt_ = std::chrono::steady_clock::now(); return *this; } @@ -144,9 +143,9 @@ bool RaaqmDataPath::newPropagationDelayAvailable() { unsigned int RaaqmDataPath::getPropagationDelay() { return prop_delay_; } bool RaaqmDataPath::isStale() { - struct timeval now; - gettimeofday(&now, 0); - double time = getMicroSeconds(now) - getMicroSeconds(m_last_received_pkt_); + TimePoint now = std::chrono::steady_clock::now(); + auto time = std::chrono::duration_cast(now - last_received_pkt_) + .count(); if (time > 2000000) { return true; } diff --git a/libtransport/src/hicn/transport/protocols/raaqm_data_path.h b/libtransport/src/hicn/transport/protocols/raaqm_data_path.h old mode 100755 new mode 100644 index 6f63940c9..a0b9ec9ca --- a/libtransport/src/hicn/transport/protocols/raaqm_data_path.h +++ b/libtransport/src/hicn/transport/protocols/raaqm_data_path.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -30,6 +30,9 @@ namespace transport { namespace protocol { class RaaqmDataPath { + using TimePoint = std::chrono::steady_clock::time_point; + using Microseconds = std::chrono::microseconds; + public: RaaqmDataPath(double drop_factor, double minimum_drop_probability, unsigned new_timer, unsigned int samples, @@ -219,7 +222,7 @@ class RaaqmDataPath { /** * Time of the last call to the path reporter method */ - struct timeval m_last_received_pkt_; + TimePoint last_received_pkt_; double average_rtt_; double alpha_; diff --git a/libtransport/src/hicn/transport/protocols/rate_estimation.cc b/libtransport/src/hicn/transport/protocols/rate_estimation.cc old mode 100755 new mode 100644 index e313bf9f6..b603ec200 --- a/libtransport/src/hicn/transport/protocols/rate_estimation.cc +++ b/libtransport/src/hicn/transport/protocols/rate_estimation.cc @@ -16,6 +16,8 @@ #include #include +#include + namespace transport { namespace protocol { @@ -31,7 +33,8 @@ void *Timer(void *data) { pthread_mutex_unlock(&(estimator->mutex_)); while (estimator->is_running_) { - usleep(KV * dat_rtt); + std::this_thread::sleep_for( + std::chrono::microseconds((uint64_t)(KV * dat_rtt))); pthread_mutex_lock(&(estimator->mutex_)); @@ -88,8 +91,8 @@ InterRttEstimator::InterRttEstimator(double alpha_arg) { this->win_current_ = 1.0; pthread_mutex_init(&(this->mutex_), NULL); - gettimeofday(&(this->start_time_), 0); - gettimeofday(&(this->begin_batch_), 0); + this->start_time_ = std::chrono::steady_clock::now(); + this->begin_batch_ = std::chrono::steady_clock::now(); } InterRttEstimator::~InterRttEstimator() { @@ -124,10 +127,10 @@ void InterRttEstimator::onRttUpdate(double rtt) { } void InterRttEstimator::onWindowIncrease(double win_current) { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->begin_batch_) + .count(); pthread_mutex_lock(&(this->mutex_)); this->avg_win_ += this->win_current_ * delay; @@ -135,14 +138,14 @@ void InterRttEstimator::onWindowIncrease(double win_current) { this->win_change_ += delay; pthread_mutex_unlock(&(this->mutex_)); - gettimeofday(&(this->begin_batch_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); } void InterRttEstimator::onWindowDecrease(double win_current) { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->begin_batch_) + .count(); pthread_mutex_lock(&(this->mutex_)); this->avg_win_ += this->win_current_ * delay; @@ -150,26 +153,25 @@ void InterRttEstimator::onWindowDecrease(double win_current) { this->win_change_ += delay; pthread_mutex_unlock(&(this->mutex_)); - gettimeofday(&(this->begin_batch_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); } ALaTcpEstimator::ALaTcpEstimator() { this->estimation_ = 0.0; this->observer_ = NULL; - gettimeofday(&(this->start_time_), 0); + this->start_time_ = std::chrono::steady_clock::now(); this->totalSize_ = 0.0; } void ALaTcpEstimator::onStart() { this->totalSize_ = 0.0; - gettimeofday(&(this->start_time_), 0); + this->start_time_ = std::chrono::steady_clock::now(); } void ALaTcpEstimator::onDownloadFinished() { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->start_time_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->start_time_).count(); this->estimation_ = this->totalSize_ * 8 * 1000000 / delay; if (observer_) { observer_->notifyStats(this->estimation_); @@ -189,23 +191,22 @@ SimpleEstimator::SimpleEstimator(double alphaArg, int batching_param) { this->number_of_packets_ = 0; this->base_alpha_ = alphaArg; this->alpha_ = alphaArg; - gettimeofday(&(this->start_time_), 0); - gettimeofday(&(this->begin_batch_), 0); + this->start_time_ = std::chrono::steady_clock::now(); + this->begin_batch_ = std::chrono::steady_clock::now(); } void SimpleEstimator::onStart() { this->estimated_ = false; this->number_of_packets_ = 0; this->total_size_ = 0.0; - gettimeofday(&(this->begin_batch_), 0); - gettimeofday(&(this->start_time_), 0); + this->start_time_ = std::chrono::steady_clock::now(); + this->begin_batch_ = std::chrono::steady_clock::now(); } void SimpleEstimator::onDownloadFinished() { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->start_time_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->start_time_).count(); if (observer_) { observer_->notifyDownloadTime(delay); } @@ -227,8 +228,8 @@ void SimpleEstimator::onDownloadFinished() { } else { if (this->number_of_packets_ >= (int)(75.0 * (double)this->batching_param_ / 100.0)) { - delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + delay = std::chrono::duration_cast(end - this->begin_batch_) + .count(); // Assuming all packets carry max_packet_size_ bytes of data // (8*max_packet_size_ bits); 1000000 factor to convert us to seconds if (this->estimation_) { @@ -247,8 +248,8 @@ void SimpleEstimator::onDownloadFinished() { } this->number_of_packets_ = 0; this->total_size_ = 0.0; - gettimeofday(&(this->begin_batch_), 0); - gettimeofday(&(this->start_time_), 0); + this->start_time_ = std::chrono::steady_clock::now(); + this->begin_batch_ = std::chrono::steady_clock::now(); } void SimpleEstimator::onDataReceived(int packet_size) { @@ -259,10 +260,10 @@ void SimpleEstimator::onRttUpdate(double rtt) { this->number_of_packets_++; if (number_of_packets_ == this->batching_param_) { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->begin_batch_) + .count(); // Assuming all packets carry max_packet_size_ bytes of data // (8*max_packet_size_ bits); 1000000 factor to convert us to seconds if (this->estimation_) { @@ -278,7 +279,7 @@ void SimpleEstimator::onRttUpdate(double rtt) { this->alpha_ = this->base_alpha_; this->number_of_packets_ = 0; this->total_size_ = 0.0; - gettimeofday(&(this->begin_batch_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); } } @@ -295,8 +296,8 @@ BatchingPacketsEstimator::BatchingPacketsEstimator(double alpha_arg, this->max_packet_size_ = 0; this->estimation_ = 0.0; this->win_current_ = 1.0; - gettimeofday(&(this->begin_batch_), 0); - gettimeofday(&(this->start_time_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); + this->start_time_ = std::chrono::steady_clock::now(); } void BatchingPacketsEstimator::onRttUpdate(double rtt) { @@ -327,25 +328,25 @@ void BatchingPacketsEstimator::onRttUpdate(double rtt) { } void BatchingPacketsEstimator::onWindowIncrease(double win_current) { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->begin_batch_) + .count(); this->avg_win_ += this->win_current_ * delay; this->win_current_ = win_current; this->win_change_ += delay; - gettimeofday(&(this->begin_batch_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); } void BatchingPacketsEstimator::onWindowDecrease(double win_current) { - timeval end; - gettimeofday(&end, 0); - double delay = RaaqmDataPath::getMicroSeconds(end) - - RaaqmDataPath::getMicroSeconds(this->begin_batch_); + TimePoint end = std::chrono::steady_clock::now(); + auto delay = + std::chrono::duration_cast(end - this->begin_batch_) + .count(); this->avg_win_ += this->win_current_ * delay; this->win_current_ = win_current; this->win_change_ += delay; - gettimeofday(&(this->begin_batch_), 0); + this->begin_batch_ = std::chrono::steady_clock::now(); } } // end namespace protocol diff --git a/libtransport/src/hicn/transport/protocols/rate_estimation.h b/libtransport/src/hicn/transport/protocols/rate_estimation.h old mode 100755 new mode 100644 index b889efe12..91964ec1d --- a/libtransport/src/hicn/transport/protocols/rate_estimation.h +++ b/libtransport/src/hicn/transport/protocols/rate_estimation.h @@ -15,11 +15,11 @@ #pragma once -#include - #include #include +#include + #define BATCH 50 #define KV 20 #define ALPHA 0.8 @@ -31,6 +31,9 @@ namespace protocol { class IcnRateEstimator { public: + using TimePoint = std::chrono::steady_clock::time_point; + using Microseconds = std::chrono::microseconds; + IcnRateEstimator(){}; virtual ~IcnRateEstimator(){}; @@ -51,8 +54,8 @@ class IcnRateEstimator { this->observer_ = observer; }; IcnObserver *observer_; - struct timeval start_time_; - struct timeval begin_batch_; + TimePoint start_time_; + TimePoint begin_batch_; double base_alpha_; double alpha_; double estimation_; diff --git a/libtransport/src/hicn/transport/protocols/rtc.h b/libtransport/src/hicn/transport/protocols/rtc.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/rtc_data_path.cc b/libtransport/src/hicn/transport/protocols/rtc_data_path.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/test/CMakeLists.txt b/libtransport/src/hicn/transport/protocols/test/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/test/test_transport_producer.cc b/libtransport/src/hicn/transport/protocols/test/test_transport_producer.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/vegas.h b/libtransport/src/hicn/transport/protocols/vegas.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/vegas_rto_estimator.cc b/libtransport/src/hicn/transport/protocols/vegas_rto_estimator.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/protocols/vegas_rto_estimator.h b/libtransport/src/hicn/transport/protocols/vegas_rto_estimator.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/CMakeLists.txt b/libtransport/src/hicn/transport/utils/CMakeLists.txt old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/array.h b/libtransport/src/hicn/transport/utils/array.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/branch_prediction.h b/libtransport/src/hicn/transport/utils/branch_prediction.h old mode 100755 new mode 100644 index b12282fe8..8cbfaca76 --- a/libtransport/src/hicn/transport/utils/branch_prediction.h +++ b/libtransport/src/hicn/transport/utils/branch_prediction.h @@ -18,5 +18,10 @@ #undef TRANSPORT_EXPECT_TRUE #undef TRANSPORT_EXPECT_FALSE +#ifndef _WIN32 #define TRANSPORT_EXPECT_TRUE(x) __builtin_expect((x), 1) -#define TRANSPORT_EXPECT_FALSE(x) __builtin_expect((x), 0) \ No newline at end of file +#define TRANSPORT_EXPECT_FALSE(x) __builtin_expect((x), 0) +#else +#define TRANSPORT_EXPECT_TRUE(x) (x) +#define TRANSPORT_EXPECT_FALSE(x) (x) +#endif \ No newline at end of file diff --git a/libtransport/src/hicn/transport/utils/content_store.cc b/libtransport/src/hicn/transport/utils/content_store.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/content_store.h b/libtransport/src/hicn/transport/utils/content_store.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/conversions.h b/libtransport/src/hicn/transport/utils/conversions.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/crypto_hash.h b/libtransport/src/hicn/transport/utils/crypto_hash.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/crypto_hash_type.h b/libtransport/src/hicn/transport/utils/crypto_hash_type.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/crypto_hasher.h b/libtransport/src/hicn/transport/utils/crypto_hasher.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/crypto_suite.h b/libtransport/src/hicn/transport/utils/crypto_suite.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/daemonizator.cc b/libtransport/src/hicn/transport/utils/daemonizator.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/daemonizator.h b/libtransport/src/hicn/transport/utils/daemonizator.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/deadline_timer.h b/libtransport/src/hicn/transport/utils/deadline_timer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/endianess.h b/libtransport/src/hicn/transport/utils/endianess.h old mode 100755 new mode 100644 index a3ec21c90..d86e764ab --- a/libtransport/src/hicn/transport/utils/endianess.h +++ b/libtransport/src/hicn/transport/utils/endianess.h @@ -17,7 +17,12 @@ #include +#ifndef _WIN32 #include +#else +#include +#endif + #include namespace utils { diff --git a/libtransport/src/hicn/transport/utils/epoll_event_reactor.cc b/libtransport/src/hicn/transport/utils/epoll_event_reactor.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/epoll_event_reactor.h b/libtransport/src/hicn/transport/utils/epoll_event_reactor.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/event_reactor.h b/libtransport/src/hicn/transport/utils/event_reactor.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/event_thread.h b/libtransport/src/hicn/transport/utils/event_thread.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/fd_deadline_timer.h b/libtransport/src/hicn/transport/utils/fd_deadline_timer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/hash.h b/libtransport/src/hicn/transport/utils/hash.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/identity.h b/libtransport/src/hicn/transport/utils/identity.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/key_id.h b/libtransport/src/hicn/transport/utils/key_id.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/linux.h b/libtransport/src/hicn/transport/utils/linux.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/literals.h b/libtransport/src/hicn/transport/utils/literals.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/membuf.cc b/libtransport/src/hicn/transport/utils/membuf.cc old mode 100755 new mode 100644 index 0ab1a6044..e75e85b35 --- a/libtransport/src/hicn/transport/utils/membuf.cc +++ b/libtransport/src/hicn/transport/utils/membuf.cc @@ -18,6 +18,9 @@ * The code in this file if adapated from the IOBuf of folly: * https://github.com/facebook/folly/blob/master/folly/io/IOBuf.h */ +#ifdef _WIN32 +#include +#endif #include diff --git a/libtransport/src/hicn/transport/utils/membuf.h b/libtransport/src/hicn/transport/utils/membuf.h old mode 100755 new mode 100644 index 944237e2b..5a10d4182 --- a/libtransport/src/hicn/transport/utils/membuf.h +++ b/libtransport/src/hicn/transport/utils/membuf.h @@ -35,8 +35,9 @@ #include #include -// Ignore shadowing warnings within this file, so includers can use -Wshadow. +#ifndef _WIN32 TRANSPORT_GNU_DISABLE_WARNING("-Wshadow") +#endif namespace utils { diff --git a/libtransport/src/hicn/transport/utils/min_filter.h b/libtransport/src/hicn/transport/utils/min_filter.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/object_pool.h b/libtransport/src/hicn/transport/utils/object_pool.h old mode 100755 new mode 100644 index c369f7e12..9fda214cd --- a/libtransport/src/hicn/transport/utils/object_pool.h +++ b/libtransport/src/hicn/transport/utils/object_pool.h @@ -47,9 +47,7 @@ class ObjectPool { ObjectPool() : destructor_(false) {} - ~ObjectPool() { - destructor_ = true; - } + ~ObjectPool() { destructor_ = true; } std::pair get() { if (object_pool_.empty()) { diff --git a/libtransport/src/hicn/transport/utils/ring_buffer.h b/libtransport/src/hicn/transport/utils/ring_buffer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/sharable_vector.h b/libtransport/src/hicn/transport/utils/sharable_vector.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/signer.cc b/libtransport/src/hicn/transport/utils/signer.cc index 579b08aff..005236c2e 100644 --- a/libtransport/src/hicn/transport/utils/signer.cc +++ b/libtransport/src/hicn/transport/utils/signer.cc @@ -22,7 +22,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include #include #include diff --git a/libtransport/src/hicn/transport/utils/signer.h b/libtransport/src/hicn/transport/utils/signer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/socket.h b/libtransport/src/hicn/transport/utils/socket.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/spinlock.h b/libtransport/src/hicn/transport/utils/spinlock.h old mode 100755 new mode 100644 index 33e5cda85..009a94454 --- a/libtransport/src/hicn/transport/utils/spinlock.h +++ b/libtransport/src/hicn/transport/utils/spinlock.h @@ -35,7 +35,7 @@ class SpinLock : private std::atomic_flag { SpinLock& spin_lock_; }; - SpinLock() : std::atomic_flag(false) {} + SpinLock() { clear(); } void lock() { // busy-wait diff --git a/libtransport/src/hicn/transport/utils/stream_buffer.h b/libtransport/src/hicn/transport/utils/stream_buffer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/string_tokenizer.cc b/libtransport/src/hicn/transport/utils/string_tokenizer.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/string_tokenizer.h b/libtransport/src/hicn/transport/utils/string_tokenizer.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/test.h b/libtransport/src/hicn/transport/utils/test.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/uri.cc b/libtransport/src/hicn/transport/utils/uri.cc old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/uri.h b/libtransport/src/hicn/transport/utils/uri.h old mode 100755 new mode 100644 diff --git a/libtransport/src/hicn/transport/utils/verifier.cc b/libtransport/src/hicn/transport/utils/verifier.cc index 93efe063a..49cbe3b36 100644 --- a/libtransport/src/hicn/transport/utils/verifier.cc +++ b/libtransport/src/hicn/transport/utils/verifier.cc @@ -21,7 +21,9 @@ #include extern "C" { +#ifndef _WIN32 TRANSPORT_CLANG_DISABLE_WARNING("-Wextern-c-compat") +#endif #include #include #include diff --git a/libtransport/src/hicn/transport/utils/verifier.h b/libtransport/src/hicn/transport/utils/verifier.h old mode 100755 new mode 100644 -- cgit 1.2.3-korg