summaryrefslogtreecommitdiff
path: root/implementation/endpoints/include/endpoint_impl.hpp
diff options
context:
space:
mode:
authorLutz Bichler <Lutz.Bichler@bmw.de>2014-07-15 15:25:39 +0200
committerLutz Bichler <Lutz.Bichler@bmw.de>2014-07-15 15:25:39 +0200
commite9daa9eaecf84aa69b7c643cc3820eb8f295dc7b (patch)
treea4637f5c8cb9af8c244a43e9163fc843080d61bf /implementation/endpoints/include/endpoint_impl.hpp
parent66cb571f4858df44759e5af8201a3542bcd510be (diff)
downloadvSomeIP-e9daa9eaecf84aa69b7c643cc3820eb8f295dc7b.tar.gz
Re-enabled and adapted implementation of "Magic Cookies".
Created a test program (magic-cookies-test-client) that sends messages with correct (session 1, 3, 6, 7, B, C, D, F) and incorrect payload (session 2, 4, 5, 8, 9, A, E). It is expected that you see responses for the messages with the correct payload while the messages with the incorrect payload have been ignored. The test program needs to be run with VSOMEIP_APPLICATION_NAME=client-sample and VSOMEIP_CONFIGURATION_FILE=vsomeip-magic-cookies-client.xml. The corresponding service (service-sample) must be run with VSOMEIP_APPLICATION_NAME=service-sample and VSOMEIP_CONFIGURATION_FILE=vsomeip-magic-cookies-service.xml. Please note that the IP configuration must be adapted to the local setting.
Diffstat (limited to 'implementation/endpoints/include/endpoint_impl.hpp')
-rw-r--r--implementation/endpoints/include/endpoint_impl.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/implementation/endpoints/include/endpoint_impl.hpp b/implementation/endpoints/include/endpoint_impl.hpp
index 5055f99..5fa054c 100644
--- a/implementation/endpoints/include/endpoint_impl.hpp
+++ b/implementation/endpoints/include/endpoint_impl.hpp
@@ -13,6 +13,7 @@
#include <boost/asio/io_service.hpp>
#include <boost/asio/system_timer.hpp>
+#include "buffer.hpp"
#include "endpoint.hpp"
namespace vsomeip {
@@ -28,7 +29,6 @@ public:
virtual ~endpoint_impl();
void enable_magic_cookies();
- void disable_magic_cookies();
void open_filter(service_t _service);
void close_filter(service_t _service);
@@ -41,12 +41,13 @@ public:
bool is_udp() const;
public: // required
+ virtual bool is_client() const = 0;
virtual void receive() = 0;
virtual void restart() = 0;
-private:
+protected:
virtual bool is_magic_cookie() const;
- bool resync_on_magic_cookie();
+ bool resync_on_magic_cookie(message_buffer_t &_buffer);
protected:
// Reference to service context