A Node as discovered by the Zyre protocol.
More...
#include <ZyreNode.h>
|
| const std::string & | GetAddress () const |
| | Get the IP address of the node. More...
|
| |
| const unsigned char * | GetCtr () const |
| | Get the nonce counter of the node. More...
|
| |
| virtual std::string | GetDescription () const override |
| | Get a user-readable description of the node. More...
|
| |
| const unsigned char * | GetKey () const |
| | Get the shared cryptographic key of the node. More...
|
| |
| const unsigned char * | GetPubKey () const |
| | Get the public key of the node. More...
|
| |
| const bool | GetVerified () const |
| | Is the node verified? More...
|
| |
| void | IncrementCtr () const |
| | Increment the nonce counter the node. More...
|
| |
| bool | IsOnline () const override |
| | Is the Node currently online? More...
|
| |
| void | SetCtr (unsigned char *c) const |
| | Set the nonce (counter) More...
|
| |
| void | SetKeys (unsigned char *k, unsigned char *pk) |
| | Set the shared cryptographic key and the public key of the node. More...
|
| |
| void | SetVerified () |
| | Set the verified status of the node. More...
|
| |
| | ZyreNode (const std::string &uuid, const std::string &name, const std::string &deviceClass, const std::string &address) |
| | Construct a new ZyreNode object. More...
|
| |
| | BasicNode (const std::string &uuid, const std::string &name, const std::string &deviceClass) |
| | Construct a new BasicNode object. More...
|
| |
| virtual const std::string & | GetDeviceClass () const override |
| | Get the class of the underlying device. More...
|
| |
| virtual const std::string & | GetName () const override |
| | Returns the (possibly non-unique) name of the node. More...
|
| |
| virtual const std::string & | GetUUID () const override |
| | Get the unique identifier of the node. More...
|
| |
| virtual | ~Node () |
| | Destroy the Node object. More...
|
| |
A Node as discovered by the Zyre protocol.
Definition at line 20 of file ZyreNode.h.
| swarmio::transport::zyre::ZyreNode::ZyreNode |
( |
const std::string & |
uuid, |
|
|
const std::string & |
name, |
|
|
const std::string & |
deviceClass, |
|
|
const std::string & |
address |
|
) |
| |
|
inline |
Construct a new ZyreNode object.
- Parameters
-
| uuid | UUID |
| name | Discoverable name |
| deviceClass | Device class |
| address | IP address |
Definition at line 86 of file ZyreNode.h.
| const std::string& swarmio::transport::zyre::ZyreNode::GetAddress |
( |
| ) |
const |
|
inline |
Get the IP address of the node.
- Returns
- const std::string&
Definition at line 104 of file ZyreNode.h.
| const unsigned char* swarmio::transport::zyre::ZyreNode::GetCtr |
( |
| ) |
const |
|
inline |
Get the nonce counter of the node.
- Returns
- unsigned char&
Definition at line 144 of file ZyreNode.h.
| virtual std::string swarmio::transport::zyre::ZyreNode::GetDescription |
( |
| ) |
const |
|
inlineoverridevirtual |
Get a user-readable description of the node.
- Returns
- std::string
Implements swarmio::Node.
Definition at line 191 of file ZyreNode.h.
| const unsigned char* swarmio::transport::zyre::ZyreNode::GetKey |
( |
| ) |
const |
|
inline |
Get the shared cryptographic key of the node.
- Returns
- const unsigned char&
Definition at line 114 of file ZyreNode.h.
| const unsigned char* swarmio::transport::zyre::ZyreNode::GetPubKey |
( |
| ) |
const |
|
inline |
Get the public key of the node.
- Returns
- const unsigned char&
Definition at line 124 of file ZyreNode.h.
| const bool swarmio::transport::zyre::ZyreNode::GetVerified |
( |
| ) |
const |
|
inline |
Is the node verified?
- Returns
- unsigned char&
Definition at line 154 of file ZyreNode.h.
| void swarmio::transport::zyre::ZyreNode::IncrementCtr |
( |
| ) |
const |
|
inline |
Increment the nonce counter the node.
Definition at line 172 of file ZyreNode.h.
| bool swarmio::transport::zyre::ZyreNode::IsOnline |
( |
| ) |
const |
|
inlineoverridevirtual |
| void swarmio::transport::zyre::ZyreNode::SetCtr |
( |
unsigned char * |
c | ) |
const |
|
inline |
Set the nonce (counter)
Definition at line 181 of file ZyreNode.h.
| void swarmio::transport::zyre::ZyreNode::SetKeys |
( |
unsigned char * |
k, |
|
|
unsigned char * |
pk |
|
) |
| |
|
inline |
Set the shared cryptographic key and the public key of the node.
Definition at line 133 of file ZyreNode.h.
| void swarmio::transport::zyre::ZyreNode::SetOnline |
( |
bool |
online | ) |
|
|
inlineprivate |
Mark the Node as online or offline.
- Parameters
-
Definition at line 71 of file ZyreNode.h.
| void swarmio::transport::zyre::ZyreNode::SetVerified |
( |
| ) |
|
|
inline |
Set the verified status of the node.
Definition at line 163 of file ZyreNode.h.
| std::string swarmio::transport::zyre::ZyreNode::_address |
|
private |
IP address of the node.
Definition at line 52 of file ZyreNode.h.
| unsigned char swarmio::transport::zyre::ZyreNode::_key[32] |
|
private |
| unsigned char swarmio::transport::zyre::ZyreNode::_message_counter[24] |
|
private |
Message counter as nonce and replay attack.
Definition at line 34 of file ZyreNode.h.
| std::atomic<bool> swarmio::transport::zyre::ZyreNode::_online |
|
private |
| unsigned char swarmio::transport::zyre::ZyreNode::_pubkey[32] |
|
private |
| std::atomic<bool> swarmio::transport::zyre::ZyreNode::_verified |
|
private |
| friend swarmio::transport::zyre::ZyreNode::ZyreEndpoint |
|
private |
Only ZyreEdpoint can manage these objects.
Definition at line 28 of file ZyreNode.h.
The documentation for this class was generated from the following file: