Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ cc_library_shared {

cflags: [
"-DWITHOUT_SYSTEMD",
"-DVSOMEIP_VERSION=\"3.5.10\"",
"-DVSOMEIP_COMPAT_VERSION=\"3.5.10\"",
"-DVSOMEIP_VERSION=\"3.5.11\"",
"-DVSOMEIP_COMPAT_VERSION=\"3.5.11\"",
"-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\"",
"-DUSE_DLT",
],
Expand Down
8 changes: 4 additions & 4 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.5.10\" \
-DVSOMEIP_VERSION=\"3.5.11\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -160,7 +160,7 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.5.10\" \
-DVSOMEIP_VERSION=\"3.5.11\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down Expand Up @@ -207,8 +207,8 @@ LOCAL_CFLAGS := \
-frtti \
-fexceptions \
-DWITHOUT_SYSTEMD \
-DVSOMEIP_VERSION=\"3.5.10\" \
-DVSOMEIP_COMPAT_VERSION=\"3.5.10\" \
-DVSOMEIP_VERSION=\"3.5.11\" \
-DVSOMEIP_COMPAT_VERSION=\"3.5.11\" \
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
-Wno-unused-parameter \
-Wno-non-virtual-dtor \
Expand Down
32 changes: 32 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,5 +1,37 @@
Changes
=======
v3.5.11
- global
- Add basic watchdog to track if stop offers are sent to the
network for externally offered services.
- Fixed issue of cached values not being properly updated.
- Add predicate to condition variables.
- Minor code clean-ups.
- Minor logging improvements.

- endpoint
- Stop servers during suspend to avoid dangling connections.
- set SO_LINGER to 0 on local tcp client endpoints to avoid
sockets in TIME_WAIT state.
- Adapted condition variable for multicast operations.
- Wait for unacknowledged data on all TCP endpoints.
- Update the error handling for local communication to synchronize
IO operations errors and state.

- routing
- Only check ACL and process messages if the address is specified.
- Force client to go to "Initial Wait Phase" when TTL expires.
- Return when receiving a message on an invalid port/instance.
- Prevent race condition on insert_subscription.

- tests
- network tests
- Fix and/or document subscribe_notify_test_one tests,
restart_routing, subscribe_notify_test_diff_clients,
security_test, offered_services_info, multigroup test
- Add boardnet_initial_event test, cached_event test
- Fix reuse address issues in tests

v3.5.10
- global
- Resolve build error when compiling using gcc 9.
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set (VSOMEIP_COMPAT_NAME vsomeip)

set (VSOMEIP_MAJOR_VERSION 3)
set (VSOMEIP_MINOR_VERSION 5)
set (VSOMEIP_PATCH_VERSION 10)
set (VSOMEIP_PATCH_VERSION 11)
set (VSOMEIP_HOTFIX_VERSION 0)

set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})
Expand Down
3 changes: 3 additions & 0 deletions implementation/configuration/include/internal.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
#define LOCAL_TCP_WAIT_SEND_QUEUE_ON_STOP 5
#define LOCAL_UDS_WAIT_SEND_QUEUE_ON_STOP 50

#define VSOMEIP_TCP_CLOSE_SEND_BUFFER_CHECK_PERIOD 10 // ms
#define VSOMEIP_TCP_CLOSE_SEND_BUFFER_RETRIES (100 / VSOMEIP_TCP_CLOSE_SEND_BUFFER_CHECK_PERIOD) // Retry for 100ms

// default TCP parameters, both local and external
#define VSOMEIP_DEFAULT_TCP_USER_TIMEOUT 3000
#define VSOMEIP_DEFAULT_TCP_KEEPIDLE 1
Expand Down
3 changes: 3 additions & 0 deletions implementation/configuration/include/internal_android.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@
#define LOCAL_TCP_WAIT_SEND_QUEUE_ON_STOP 5
#define LOCAL_UDS_WAIT_SEND_QUEUE_ON_STOP 50

#define VSOMEIP_TCP_CLOSE_SEND_BUFFER_CHECK_PERIOD 10 // ms
#define VSOMEIP_TCP_CLOSE_SEND_BUFFER_RETRIES (100 / VSOMEIP_TCP_CLOSE_SEND_BUFFER_CHECK_PERIOD) // Retry for 100ms

// default TCP parameters, both local and external
#define VSOMEIP_DEFAULT_TCP_USER_TIMEOUT 3000
#define VSOMEIP_DEFAULT_TCP_KEEPIDLE 1
Expand Down
1 change: 1 addition & 0 deletions implementation/endpoints/include/asio_tcp_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class asio_tcp_socket final : public tcp_socket {
void close(boost::system::error_code& ec) override { socket_.close(ec); }
void cancel(boost::system::error_code& ec) override { socket_.cancel(ec); }
void shutdown(boost::asio::ip::tcp::socket::shutdown_type st, boost::system::error_code& ec) override { socket_.shutdown(st, ec); }
void io_control(io_control_operation<std::size_t>& icm, boost::system::error_code& ec) override { socket_.io_control(icm, ec); }
void set_option(boost::asio::ip::tcp::no_delay nd, boost::system::error_code& ec) override { socket_.set_option(nd, ec); }
void set_option(boost::asio::ip::tcp::socket::keep_alive ka, boost::system::error_code& ec) override { socket_.set_option(ka, ec); }
void set_option(boost::asio::ip::tcp::socket::linger l, boost::system::error_code& ec) override { socket_.set_option(l, ec); }
Expand Down
2 changes: 1 addition & 1 deletion implementation/endpoints/include/client_endpoint_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class client_endpoint_impl : public endpoint_impl<Protocol>,
virtual void send_queued(std::pair<message_buffer_ptr_t, uint32_t>& _entry) = 0;
virtual void get_configured_times_from_endpoint(service_t _service, method_t _method, std::chrono::nanoseconds* _debouncing,
std::chrono::nanoseconds* _maximum_retention) const = 0;
void shutdown_and_close_socket(bool _recreate_socket);
void shutdown_and_close_socket(bool _recreate_socket, bool _is_error = false);
void shutdown_and_close_socket_unlocked(bool _recreate_socket);
void start_connect_timer();
void start_connecting_timer();
Expand Down
2 changes: 0 additions & 2 deletions implementation/endpoints/include/endpoint_manager_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ class endpoint_manager_base : public std::enable_shared_from_this<endpoint_manag
std::shared_ptr<endpoint> find_local(client_t _client);
std::shared_ptr<endpoint> find_local(service_t _service, instance_t _instance);

std::optional<client_t> update_local(client_t _client, const boost::asio::ip::address& _address, port_t _port);

std::unordered_set<client_t> get_connected_clients() const;

std::shared_ptr<endpoint> create_local_server(const std::shared_ptr<routing_host>& _routing_host);
Expand Down
51 changes: 51 additions & 0 deletions implementation/endpoints/include/io_control_operation.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (C) 2014-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef VSOMEIP_V3_IO_CONTROL_OPERATION_HPP_
#define VSOMEIP_V3_IO_CONTROL_OPERATION_HPP_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
#pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)

#include <boost/asio/detail/config.hpp>
#include <boost/asio/detail/socket_types.hpp>
#include <cstddef>

namespace vsomeip_v3 {

// I/O control operation
template<typename T>
class io_control_operation {
public:
// Default constructor.
io_control_operation(int command) : command_(command), value_(0) { }

// Construct with a specific command value.
io_control_operation(int command, T value) : command_(command), value_(static_cast<boost::asio::detail::ioctl_arg_type>(value)) { }

// Get the name of the IO control command.
int name() const { return command_; }

// Set the value of the I/O control command.
void set(T value) { value_ = static_cast<boost::asio::detail::ioctl_arg_type>(value); }

// Get the current value of the I/O control command.
T get() const { return static_cast<T>(value_); }

// Get the address of the command data.
boost::asio::detail::ioctl_arg_type* data() { return &value_; }

// Get the address of the command data.
const boost::asio::detail::ioctl_arg_type* data() const { return &value_; }

private:
const int command_;
boost::asio::detail::ioctl_arg_type value_;
};

} // namespace vsomeip_v3

#endif // VSOMEIP_V3_IO_CONTROL_OPERATION_HPP_
65 changes: 65 additions & 0 deletions implementation/endpoints/include/local_client_endpoint_impl.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright (C) 2014-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef VSOMEIP_V3_LOCAL_CLIENT_ENDPOINT_IMPL_HPP_
#define VSOMEIP_V3_LOCAL_CLIENT_ENDPOINT_IMPL_HPP_

#include "client_endpoint_impl.hpp"

namespace vsomeip_v3 {

class endpoint_host;

/**
* @brief Parent class for client endpoints employed for local communication, mainly used to define callbacks for asynchronous R/W
* operations and error handling.
*
* @tparam Protocol network protocol.
*/
template<typename Protocol>
class local_client_endpoint_impl : public client_endpoint_impl<Protocol> {
public:
typedef typename Protocol::endpoint endpoint_type;

local_client_endpoint_impl(const std::shared_ptr<endpoint_host>& _endpoint_host, const std::shared_ptr<routing_host>& _routing_host,
const endpoint_type& _local, const endpoint_type& _remote, boost::asio::io_context& _io,
const std::shared_ptr<configuration>& _configuration);
virtual ~local_client_endpoint_impl() = default;

public:
/**
* @brief Callback parameterized for write operations of local communication.
*/
void send_cbk(boost::system::error_code const& _error, std::size_t _bytes, const message_buffer_ptr_t& _sent_msg) override;

/**
* @brief Manages the error handling of both R/W operations and forwards to routing manager the vsomeip protocol layer decisions.
*/
void error_handler();

/**
* @defgroup Virtual functions defined by derived Protocol class.
* @{
*/
virtual void restart(bool _force = false) = 0;
virtual bool is_reliable() const = 0;
virtual void connect() = 0;
virtual void receive() = 0;
virtual void print_status() = 0;

protected:
virtual void send_queued(std::pair<message_buffer_ptr_t, uint32_t>& _entry) = 0;
virtual void get_configured_times_from_endpoint(service_t _service, method_t _method, std::chrono::nanoseconds* _debouncing,
std::chrono::nanoseconds* _maximum_retention) const = 0;

private:
virtual std::string get_remote_information() const = 0;
virtual std::uint32_t get_max_allowed_reconnects() const = 0;
virtual void max_allowed_reconnects_reached() = 0;
/** @} */
};
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#include <vsomeip/defines.hpp>

#include "client_endpoint_impl.hpp"
#include "local_client_endpoint_impl.hpp"

namespace vsomeip_v3 {

typedef client_endpoint_impl<boost::asio::ip::tcp> local_tcp_client_endpoint_base_impl;
typedef local_client_endpoint_impl<boost::asio::ip::tcp> local_tcp_client_endpoint_base_impl;

class local_tcp_client_endpoint_impl : public local_tcp_client_endpoint_base_impl {
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class local_tcp_server_endpoint_impl : public local_tcp_server_endpoint_base_imp
std::string get_path_local() const;
std::string get_path_remote() const;
void handle_recv_buffer_exception(const std::exception& _e);
void shutdown_and_close();
void shutdown_and_close(bool _is_error = false);
void shutdown_and_close_unlocked();

std::mutex socket_mutex_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#include <vsomeip/defines.hpp>

#include "client_endpoint_impl.hpp"
#include "local_client_endpoint_impl.hpp"

namespace vsomeip_v3 {

typedef client_endpoint_impl<boost::asio::local::stream_protocol> local_uds_client_endpoint_base_impl;
typedef local_client_endpoint_impl<boost::asio::local::stream_protocol> local_uds_client_endpoint_base_impl;

class local_uds_client_endpoint_impl : public local_uds_client_endpoint_base_impl {
public:
Expand Down
4 changes: 3 additions & 1 deletion implementation/endpoints/include/tcp_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#define VSOMEIP_V3_TCP_SOCKET_HPP_

#include <boost/asio/ip/tcp.hpp>

#include <functional>
#include "../include/io_control_operation.hpp"

namespace vsomeip_v3 {

Expand Down Expand Up @@ -55,6 +55,8 @@ class tcp_socket : public tcp_base_socket {
virtual boost::asio::ip::tcp::endpoint local_endpoint(boost::system::error_code&) const = 0;
virtual boost::asio::ip::tcp::endpoint remote_endpoint(boost::system::error_code&) const = 0;

virtual void io_control(io_control_operation<std::size_t>&, boost::system::error_code&) = 0;

virtual void set_option(boost::asio::ip::tcp::no_delay, boost::system::error_code&) = 0;
virtual void set_option(boost::asio::ip::tcp::socket::keep_alive, boost::system::error_code&) = 0;
virtual void set_option(boost::asio::ip::tcp::socket::linger, boost::system::error_code&) = 0;
Expand Down
Loading
Loading