summaryrefslogtreecommitdiff
path: root/implementation/e2e_protection/include/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'implementation/e2e_protection/include/e2e')
-rw-r--r--implementation/e2e_protection/include/e2e/profile/e2e_provider.hpp3
-rw-r--r--implementation/e2e_protection/include/e2e/profile/e2e_provider_impl.hpp3
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile01/checker.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile01/profile_01.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp10
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile04/profile_04.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile04/protector.hpp11
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_interface/checker.hpp2
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp4
-rw-r--r--implementation/e2e_protection/include/e2e/profile/profile_interface/protector.hpp2
14 files changed, 26 insertions, 23 deletions
diff --git a/implementation/e2e_protection/include/e2e/profile/e2e_provider.hpp b/implementation/e2e_protection/include/e2e/profile/e2e_provider.hpp
index 41d7487..51e42e1 100644
--- a/implementation/e2e_protection/include/e2e/profile/e2e_provider.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/e2e_provider.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
@@ -37,4 +37,3 @@ public:
} // namespace vsomeip_v3
#endif // VSOMEIP_V3_E2E_PROVIDER_HPP
-
diff --git a/implementation/e2e_protection/include/e2e/profile/e2e_provider_impl.hpp b/implementation/e2e_protection/include/e2e/profile/e2e_provider_impl.hpp
index 62db2e2..631f87f 100644
--- a/implementation/e2e_protection/include/e2e/profile/e2e_provider_impl.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/e2e_provider_impl.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
@@ -71,4 +71,3 @@ private:
} // namespace vsomeip_v3
#endif // VSOMEIP_V3_E2E_PROVIDER_IMPL_HPP
-
diff --git a/implementation/e2e_protection/include/e2e/profile/profile01/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile01/checker.hpp
index 4184996..8f97113 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile01/checker.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile01/checker.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile01/profile_01.hpp b/implementation/e2e_protection/include/e2e/profile/profile01/profile_01.hpp
index 54b2d5c..097d9f5 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile01/profile_01.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile01/profile_01.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp
index 13bd524..7e37993 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile01/protector.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp
index c16eb10..2ed3ebd 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile04/checker.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2020-2021 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/.
@@ -6,6 +6,8 @@
#ifndef VSOMEIP_V3_E2E_PROFILE04_CHECKER_HPP
#define VSOMEIP_V3_E2E_PROFILE04_CHECKER_HPP
+#include <map>
+
#include "../profile04/profile_04.hpp"
#include "../profile_interface/checker.hpp"
@@ -20,14 +22,14 @@ public:
// [SWS_E2E_00389] initialize state
explicit profile_04_checker(const profile_config &_config) :
- config_(_config), counter_(0xffff) {}
+ 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(uint16_t _received_counter) const;
+ bool verify_counter(instance_t _instance, uint16_t _received_counter);
bool read_16(const e2e_buffer &_buffer, uint16_t &_data, size_t _index) const;
bool read_32(const e2e_buffer &_buffer, uint32_t &_data, size_t _index) const;
@@ -35,7 +37,7 @@ private:
std::mutex check_mutex_;
profile_config config_;
- uint16_t counter_;
+ std::map<instance_t, uint16_t> counter_;
};
} // namespace profile_04
diff --git a/implementation/e2e_protection/include/e2e/profile/profile04/profile_04.hpp b/implementation/e2e_protection/include/e2e/profile/profile04/profile_04.hpp
index 88be05c..11a7ee7 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile04/profile_04.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile04/profile_04.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2020-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile04/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile04/protector.hpp
index fd4a6e7..eab0a9a 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile04/protector.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile04/protector.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2020 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2020-2021 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/.
@@ -6,7 +6,9 @@
#ifndef VSOMEIP_V3_E2E_PROFILE04_PROTECTOR_HPP
#define VSOMEIP_V3_E2E_PROFILE04_PROTECTOR_HPP
+#include <map>
#include <mutex>
+
#include "../profile04/profile_04.hpp"
#include "../profile_interface/protector.hpp"
@@ -19,20 +21,21 @@ public:
protector(void) = delete;
explicit protector(const profile_config &_config)
- : config_(_config), counter_(0) {};
+ : config_(_config) {}
void protect(e2e_buffer &_buffer, instance_t _instance) override final;
private:
bool verify_inputs(e2e_buffer &_buffer);
- void increment_counter();
+ uint16_t get_counter(instance_t _instance) const;
+ void increment_counter(instance_t _instance);
void write_16(e2e_buffer &_buffer, uint16_t _data, size_t _index);
void write_32(e2e_buffer &_buffer, uint32_t _data, size_t _index);
private:
profile_config config_;
- uint16_t counter_;
+ std::map<instance_t, uint16_t> counter_;
std::mutex protect_mutex_;
};
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
index e233205..94d5456 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/checker.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp
index 244989d..0a97ff1 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/profile_custom.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp
index a2ec5d1..2396b5a 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_custom/protector.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_interface/checker.hpp b/implementation/e2e_protection/include/e2e/profile/profile_interface/checker.hpp
index 12cb6b7..1bdf447 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_interface/checker.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_interface/checker.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp b/implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp
index 5fa018c..5079e7e 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_interface/profile_interface.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.
@@ -12,7 +12,7 @@ namespace vsomeip_v3 {
namespace e2e {
namespace profile_interface {
-typedef uint8_t check_status_t;
+using check_status_t = std::uint8_t;
enum generic_check_status : check_status_t { E2E_OK, E2E_WRONG_CRC, E2E_ERROR};
diff --git a/implementation/e2e_protection/include/e2e/profile/profile_interface/protector.hpp b/implementation/e2e_protection/include/e2e/profile/profile_interface/protector.hpp
index 4b02971..20c63d5 100644
--- a/implementation/e2e_protection/include/e2e/profile/profile_interface/protector.hpp
+++ b/implementation/e2e_protection/include/e2e/profile/profile_interface/protector.hpp
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
+// Copyright (C) 2014-2021 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/.