SOLA
Loading...
Searching...
No Matches
remove_and_update_neighbor.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_MESSAGE_REMOVE_AND_UPDATE_NEIGHBORS_H_
8#define MINHTON_MESSAGE_REMOVE_AND_UPDATE_NEIGHBORS_H_
9
10#include "minhton/message/message.h"
11#include "minhton/message/remove_neighbor.h"
12#include "minhton/message/update_neighbors.h"
13#include "solanet/serializer/serialize.h"
14
15namespace minhton {
19class MessageRemoveAndUpdateNeighbors : public MinhtonMessage<MessageRemoveAndUpdateNeighbors> {
20public:
28 MessageUpdateNeighbors update_msg,
29 bool should_acknowledge = false);
30
31 MessageRemoveNeighbor getMessageRemoveNeighbor() const;
32 MessageUpdateNeighbors getMessageUpdateNeighbors() const;
33 bool getShouldAcknowledge() const;
34
35 SERIALIZE(header_, remove_msg_, update_msg_, should_acknowledge_);
36
38
39private:
40 friend MinhtonMessage;
41
44
46 bool validateImpl() const;
47
48 MessageRemoveNeighbor remove_msg_;
49
50 MessageUpdateNeighbors update_msg_;
51
52 bool should_acknowledge_ = false;
53};
54} // namespace minhton
55
56#endif
Usage: Used in the leave and response algorithms for updating the routing information.
Definition remove_and_update_neighbor.h:19
Usage: A node is leaving the network. This is a notification to remove the given node from the routin...
Definition remove_neighbor.h:17
Usage: Informing a node about a new or updated neighbor. Used mainly in the join accept and leave pro...
Definition update_neighbors.h:20
Definition message_header.h:24
Definition message.h:28
Definition minhton_watchdog_ns3.cpp:24