-
Notifications
You must be signed in to change notification settings - Fork 699
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notes: - Fix QNX build - Fix missing Stop Offer - Apply extra fixes to QNX environment - Remove key <service, instance> from the offer_commands_ - #478: deleted unused param _use_exclusive_proxy - Fix code smell related to condition variable - #462: Fix IPv6 Service Discovery - Added multicast_mutex to async function that makes use of multicast socket - #479: Allow service_discovery to continue without random_device - Fix availability handler sending false on offer - Set host/port in vsomeip_sec_client_t whenever possible - Use executor_work_guard instead of io_context::work for boost v1.66 and higher - Update Windows build - Added profile 07 as an option for E2E protection - ASIO: use heap-allocation to avoid using garbage data - Fix integer underflow in server_endpoint_impl.cpp - Cleanup prepare_stop_handlers_ - Automatic unsubscribe - Debounce now works without routingmanagerd running - Debouncing: Send last received value after debounce time + X - Fix resource deadlock avoided crash - Use closure instead of callable struct
- Loading branch information
1 parent
70d59ed
commit 02c199d
Showing
91 changed files
with
5,538 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
implementation/e2e_protection/include/e2e/profile/profile07/checker.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (C) 2023 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_E2E_PROFILE07_CHECKER_HPP | ||
#define VSOMEIP_V3_E2E_PROFILE07_CHECKER_HPP | ||
|
||
#include <map> | ||
|
||
#include "../profile07/profile_07.hpp" | ||
#include "../profile_interface/checker.hpp" | ||
|
||
namespace vsomeip_v3 { | ||
namespace e2e { | ||
namespace profile07 { | ||
|
||
class profile_07_checker final : public e2e::profile_interface::checker { | ||
|
||
public: | ||
profile_07_checker(void) = delete; | ||
|
||
// [SWS_E2E_00389] initialize state | ||
explicit profile_07_checker(const profile_config &_config) : | ||
config_(_config) {} | ||
|
||
void check(const e2e_buffer &_buffer, instance_t _instance, | ||
e2e::profile_interface::check_status_t &_generic_check_status) override final; | ||
|
||
private: | ||
bool verify_input(const e2e_buffer &_buffer) const; | ||
bool verify_counter(instance_t _instance, uint32_t _received_counter); | ||
|
||
bool read_32(const e2e_buffer &_buffer, uint32_t &_data, size_t _index) const; | ||
bool read_64(const e2e_buffer &_buffer, uint64_t &_data, size_t _index) const; | ||
|
||
std::mutex check_mutex_; | ||
|
||
profile_config config_; | ||
std::map<instance_t, uint32_t> counter_; | ||
}; | ||
|
||
} // namespace profile_07 | ||
} // namespace e2e | ||
} // namespace vsomeip_v3 | ||
|
||
#endif // VSOMEIP_V3_E2E_PROFILE07_CHECKER_HPP |
63 changes: 63 additions & 0 deletions
63
implementation/e2e_protection/include/e2e/profile/profile07/profile_07.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright (C) 2023 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_E2E_PROFILE07_PROFILE07_HPP | ||
#define VSOMEIP_V3_E2E_PROFILE07_PROFILE07_HPP | ||
|
||
#include <cstdint> | ||
|
||
#include <vsomeip/defines.hpp> | ||
|
||
#include "../../../buffer/buffer.hpp" | ||
|
||
namespace vsomeip_v3 { | ||
namespace e2e { | ||
namespace profile07 { | ||
|
||
const uint8_t PROFILE_07_SIZE_OFFSET = 8; | ||
const uint8_t PROFILE_07_COUNTER_OFFSET = 12; | ||
const uint8_t PROFILE_07_DATAID_OFFSET = 16; | ||
const uint8_t PROFILE_07_CRC_OFFSET = 0; | ||
|
||
struct profile_config; | ||
|
||
class profile_07 { | ||
public: | ||
static uint64_t compute_crc(const profile_config &_config, const e2e_buffer &_buffer); | ||
}; | ||
|
||
// [SWS_E2E_00200] | ||
struct profile_config { | ||
profile_config() = delete; | ||
|
||
profile_config(uint32_t _data_id, size_t _offset, | ||
size_t _min_data_length, size_t _max_data_length, | ||
uint32_t _max_delta_counter) | ||
: data_id_(_data_id), offset_(_offset), | ||
min_data_length_(_min_data_length), max_data_length_(_max_data_length), | ||
max_delta_counter_(_max_delta_counter), | ||
base_(VSOMEIP_SOMEIP_HEADER_SIZE) { | ||
} | ||
profile_config(const profile_config &_config) = default; | ||
profile_config &operator=(const profile_config &_config) = default; | ||
|
||
uint32_t data_id_; | ||
size_t offset_; // This must be configured in bit but as a multiple of 8. | ||
// As we must use it as an index, we do the math once at | ||
// configuration time and use the correct data type here. | ||
// Thus, this value is always the byte where the CRC starts. | ||
size_t min_data_length_; | ||
size_t max_data_length_; | ||
uint32_t max_delta_counter_; | ||
|
||
// SOME/IP base | ||
size_t base_; | ||
}; | ||
|
||
} // namespace profile_07 | ||
} // namespace e2e | ||
} // namespace vsomeip_v3 | ||
|
||
#endif // VSOMEIP_V3_E2E_PROFILE07_PROFILE07_HPP |
Oops, something went wrong.