Skip to content

Commit 79fd5f7

Browse files
vsomeip 2.10.0
1 parent 5c43d51 commit 79fd5f7

File tree

86 files changed

+2838
-981
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2838
-981
lines changed

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Changes
22
=======
33

4+
v2.10.0
5+
- Add register_async_subscription_handler to application interface
6+
- Ensure faster stopping of UDP and TCP endpoints
7+
- StopSubscribe eventgroup entries of StopSubscribe/Subscribe
8+
eventgroup entry sequences in incoming SD messages are now
9+
completely handled in the service discovery module
10+
411
v2.9.5
512
- Change magic cookie behaviour to only send a magic cookie every 10
613
seconds instead of in front of every SOME/IP message

CMakeLists.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ cmake_minimum_required (VERSION 2.8.12)
77
project (vsomeip)
88

99
set (VSOMEIP_MAJOR_VERSION 2)
10-
set (VSOMEIP_MINOR_VERSION 9)
11-
set (VSOMEIP_PATCH_VERSION 5)
10+
set (VSOMEIP_MINOR_VERSION 10)
11+
set (VSOMEIP_PATCH_VERSION 0)
1212
set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})
1313
set (PACKAGE_VERSION ${VSOMEIP_VERSION}) # Used in documentatin/doxygen.in
1414
set (CMAKE_VERBOSE_MAKEFILE off)
@@ -447,6 +447,25 @@ if((${TEST_IP_MASTER} STREQUAL ${TEST_IP_DEFAULT_VALUE}) OR
447447
"-DTEST_IP_MASTER=10.0.3.1 -DTEST_IP_SLAVE=10.0.3.125")
448448
endif()
449449

450+
SET(TEST_UID_DEFAULT_VALUE "123456789")
451+
SET(TEST_UID "${TEST_UID_DEFAULT_VALUE}" CACHE STRING
452+
"The User ID of the user running the test: Needed for security")
453+
SET(TEST_GID_DEFAULT_VALUE "123456789")
454+
SET(TEST_GID "${TEST_GID_DEFAULT_VALUE}" CACHE STRING
455+
"The Group ID of the user running the test: Needed for security")
456+
457+
SET(TEST_SECURITY "ON" CACHE BOOL
458+
"Controls whether security tests should run or not")
459+
460+
if((${TEST_UID} STREQUAL ${TEST_UID_DEFAULT_VALUE}) OR
461+
(${TEST_GID} STREQUAL ${TEST_GID_DEFAULT_VALUE}))
462+
message(WARNING "TEST_UID and/or TEST_GID isn't set. "
463+
"Security Tests are not runnable "
464+
"Please specify them for example "
465+
"-DTEST_UID=1000 -DTEST_GID=1000")
466+
SET(TEST_SECURITY "OFF")
467+
endif()
468+
450469
add_custom_target(build_tests)
451470
add_dependencies(build_tests vsomeip)
452471
add_dependencies(build_tests vsomeip-sd)

daemon/vsomeipd.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@
2222
#endif
2323

2424
static std::shared_ptr<vsomeip::application> its_application;
25+
26+
#ifndef VSOMEIP_ENABLE_SIGNAL_HANDLING
2527
static vsomeip::routing_state_e routing_state = vsomeip::routing_state_e::RS_RUNNING;
2628
static bool stop_application = false;
2729
static bool stop_sighandler = false;
2830
static std::condition_variable_any sighandler_condition;
2931
static std::recursive_mutex sighandler_mutex;
32+
#endif
3033

3134
#ifndef VSOMEIP_ENABLE_SIGNAL_HANDLING
3235
/*

documentation/vsomeipUserGuide

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,36 @@ service instance.
572572
The list of client ports to be used for unreliable (UDP) communication to the given
573573
service instance.
574574

575+
+
576+
Additionally there is the possibility to configure mappings between ranges of client
577+
ports and ranges of remote service ports.
578+
(If a client port is configured for a specific service / instance, the port range mapping is ignored)
579+
580+
** `reliable_remote_ports`
581+
+
582+
Specifies a range of reliable remote service ports
583+
584+
** `unreliable_remote_ports`
585+
+
586+
Specifies a range of unreliable remote service ports
587+
588+
** `reliable_client_ports`
589+
+
590+
Specifies the range of reliable client ports to be mapped to the reliable_remote_ports range
591+
592+
** `unreliable_client_ports`
593+
+
594+
Specifies the range of unreliable client ports to be mapped to the unreliable_remote_ports range
595+
596+
597+
** `first`
598+
+
599+
Specifies the lower bound of a port range
600+
601+
** `last`
602+
+
603+
Specifies the upper bound of a port range
604+
575605
* `payload-sizes` (array)
576606
+
577607
Array to limit the maximum allowed payload sizes per IP and port. If not

implementation/configuration/include/client.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ namespace vsomeip {
1616
namespace cfg {
1717

1818
struct client {
19+
// ports for specific service / instance
1920
service_t service_;
2021
instance_t instance_;
21-
2222
std::map<bool, std::set<uint16_t> > ports_;
23+
24+
// client port ranges mapped to remote port ranges
25+
std::map<bool, std::pair<uint16_t, uint16_t> > remote_ports_;
26+
std::map<bool, std::pair<uint16_t, uint16_t> > client_ports_;
2327
};
2428

2529
} // namespace cfg

implementation/configuration/include/configuration.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class configuration {
6363

6464
virtual bool is_someip(service_t _service, instance_t _instance) const = 0;
6565

66-
virtual bool get_client_port(
67-
service_t _service, instance_t _instance, bool _reliable,
68-
std::map<bool, std::set<uint16_t> > &_used, uint16_t &_port) const = 0;
66+
virtual bool get_client_port(service_t _service, instance_t _instance,
67+
uint16_t _remote_port, bool _reliable,
68+
std::map<bool, std::set<uint16_t> > &_used_client_ports, uint16_t &_client_port) const = 0;
6969

7070
virtual std::set<std::pair<service_t, instance_t> > get_remote_services() const = 0;
7171

implementation/configuration/include/configuration_impl.hpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <mutex>
1212
#include <vector>
1313
#include <unordered_set>
14+
#include <list>
1415

1516
#include <boost/property_tree/ptree.hpp>
1617

@@ -76,8 +77,9 @@ class configuration_impl:
7677

7778
VSOMEIP_EXPORT bool is_someip(service_t _service, instance_t _instance) const;
7879

79-
VSOMEIP_EXPORT bool get_client_port(service_t _service, instance_t _instance, bool _reliable,
80-
std::map<bool, std::set<uint16_t> > &_used, uint16_t &_port) const;
80+
VSOMEIP_EXPORT bool get_client_port(service_t _service, instance_t _instance,
81+
uint16_t _remote_port, bool _reliable,
82+
std::map<bool, std::set<uint16_t> > &_used_client_ports, uint16_t &_client_port) const;
8183

8284
VSOMEIP_EXPORT const std::string & get_routing_host() const;
8385

@@ -201,7 +203,9 @@ class configuration_impl:
201203

202204
void load_clients(const element &_element);
203205
void load_client(const boost::property_tree::ptree &_tree);
206+
204207
std::set<uint16_t> load_client_ports(const boost::property_tree::ptree &_tree);
208+
std::pair<uint16_t, uint16_t> load_client_port_range(const boost::property_tree::ptree &_tree);
205209

206210
void load_watchdog(const element &_element);
207211

@@ -212,7 +216,8 @@ class configuration_impl:
212216
void load_policy(const boost::property_tree::ptree &_tree);
213217

214218
servicegroup *find_servicegroup(const std::string &_name) const;
215-
std::shared_ptr<client> find_client(service_t _service, instance_t _instance) const;
219+
std::shared_ptr<client> find_client(service_t _service,
220+
instance_t _instance, uint16_t _remote_port, bool _reliable) const;
216221
std::shared_ptr<service> find_service(service_t _service, instance_t _instance) const;
217222
std::shared_ptr<eventgroup> find_eventgroup(service_t _service,
218223
instance_t _instance, eventgroup_t _eventgroup) const;
@@ -222,6 +227,7 @@ class configuration_impl:
222227
bool is_mandatory(const std::string &_name) const;
223228
bool is_remote(std::shared_ptr<service> _service) const;
224229
bool is_internal_service(service_t _service, instance_t _instance) const;
230+
bool is_in_port_range(uint16_t _port, std::pair<uint16_t, uint16_t> _port_range) const;
225231

226232
void set_mandatory(const std::string &_input);
227233
void trim(std::string &_s);
@@ -256,9 +262,7 @@ class configuration_impl:
256262
std::map<instance_t,
257263
std::shared_ptr<service> > > services_;
258264

259-
std::map<service_t,
260-
std::map<instance_t,
261-
std::shared_ptr<client> > > clients_;
265+
std::list< std::shared_ptr<client> > clients_;
262266

263267
std::string routing_host_;
264268

implementation/configuration/include/e2e.hpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// License, v. 2.0. If a copy of the MPL was not distributed with this
44
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
55

6-
#ifndef CONFIGURATION_INCLUDE_E2E_HPP_
7-
#define CONFIGURATION_INCLUDE_E2E_HPP_
6+
#ifndef VSOMEIP_CFG_E2E_HPP_
7+
#define VSOMEIP_CFG_E2E_HPP_
88

99
#include <string>
1010
#include <vector>
@@ -14,7 +14,6 @@
1414
namespace vsomeip {
1515
namespace cfg {
1616

17-
1817
struct e2e {
1918

2019
e2e() :
@@ -64,8 +63,7 @@ struct e2e {
6463
uint16_t counter_offset;
6564
};
6665

66+
} // namespace cfg
67+
} // namespace vsomeip
6768

68-
69-
}
70-
}
71-
#endif /* CONFIGURATION_INCLUDE_E2E_HPP_ */
69+
#endif // VSOMEIP_CFG_E2E_HPP_

implementation/configuration/include/internal.hpp.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@
106106
#define VSOMEIP_REQUEST_SERVICE_COMMAND_SIZE 17
107107
#define VSOMEIP_RELEASE_SERVICE_COMMAND_SIZE 11
108108
#define VSOMEIP_STOP_OFFER_SERVICE_COMMAND_SIZE 16
109-
#define VSOMEIP_SUBSCRIBE_COMMAND_SIZE 18
110-
#define VSOMEIP_SUBSCRIBE_ACK_COMMAND_SIZE 17
111-
#define VSOMEIP_SUBSCRIBE_NACK_COMMAND_SIZE 17
109+
#define VSOMEIP_SUBSCRIBE_COMMAND_SIZE 19
110+
#define VSOMEIP_SUBSCRIBE_ACK_COMMAND_SIZE 19
111+
#define VSOMEIP_SUBSCRIBE_NACK_COMMAND_SIZE 19
112112
#define VSOMEIP_UNSUBSCRIBE_COMMAND_SIZE 16
113113
#define VSOMEIP_REGISTER_EVENT_COMMAND_SIZE 15
114114
#define VSOMEIP_UNREGISTER_EVENT_COMMAND_SIZE 14

0 commit comments

Comments
 (0)