---
title: llarp::routing::IMessage

---

# llarp::routing::IMessage





Inherited by [llarp::routing::CloseExitMessage](Classes/structllarp_1_1routing_1_1CloseExitMessage.md), [llarp::routing::DHTMessage](Classes/structllarp_1_1routing_1_1DHTMessage.md), [llarp::routing::DataDiscardMessage](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md), [llarp::routing::GrantExitMessage](Classes/structllarp_1_1routing_1_1GrantExitMessage.md), [llarp::routing::ObtainExitMessage](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md), [llarp::routing::PathConfirmMessage](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md), [llarp::routing::PathLatencyMessage](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md), [llarp::routing::PathTransferMessage](Classes/structllarp_1_1routing_1_1PathTransferMessage.md), [llarp::routing::RejectExitMessage](Classes/structllarp_1_1routing_1_1RejectExitMessage.md), [llarp::routing::TransferTrafficMessage](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md), [llarp::routing::UpdateExitMessage](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md), [llarp::routing::UpdateExitVerifyMessage](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md), [llarp::service::ProtocolFrame](Classes/structllarp_1_1service_1_1ProtocolFrame.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[IMessage](Classes/structllarp_1_1routing_1_1IMessage.md#function-imessage)**() =default |
| virtual | **[~IMessage](Classes/structllarp_1_1routing_1_1IMessage.md#function-~imessage)**() =default |
| virtual bool | **[BEncode](Classes/structllarp_1_1routing_1_1IMessage.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const =0 |
| virtual bool | **[DecodeKey](Classes/structllarp_1_1routing_1_1IMessage.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) =0 |
| virtual bool | **[HandleMessage](Classes/structllarp_1_1routing_1_1IMessage.md#function-handlemessage)**([IMessageHandler](Classes/structllarp_1_1routing_1_1IMessageHandler.md) * h, [AbstractRouter](Classes/structllarp_1_1AbstractRouter.md) * r) const =0 |
| virtual void | **[Clear](Classes/structllarp_1_1routing_1_1IMessage.md#function-clear)**() =0 |
| bool | **[operator<](Classes/structllarp_1_1routing_1_1IMessage.md#function-operator<)**(const [IMessage](Classes/structllarp_1_1routing_1_1IMessage.md) & other) const |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [PathID_t](Classes/structllarp_1_1PathID__t.md) | **[from](Classes/structllarp_1_1routing_1_1IMessage.md#variable-from)**  |
| uint64_t | **[S](Classes/structllarp_1_1routing_1_1IMessage.md#variable-s)**  |
| uint64_t | **[version](Classes/structllarp_1_1routing_1_1IMessage.md#variable-version)**  |

## Public Functions Documentation

### function IMessage

```cpp
IMessage() =default
```


### function ~IMessage

```cpp
virtual ~IMessage() =default
```


### function BEncode

```cpp
virtual bool BEncode(
    llarp_buffer_t * buf
) const =0
```


**Reimplemented by**: [llarp::routing::ObtainExitMessage::BEncode](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md#function-bencode), [llarp::routing::GrantExitMessage::BEncode](Classes/structllarp_1_1routing_1_1GrantExitMessage.md#function-bencode), [llarp::routing::RejectExitMessage::BEncode](Classes/structllarp_1_1routing_1_1RejectExitMessage.md#function-bencode), [llarp::routing::UpdateExitVerifyMessage::BEncode](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md#function-bencode), [llarp::routing::UpdateExitMessage::BEncode](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md#function-bencode), [llarp::routing::CloseExitMessage::BEncode](Classes/structllarp_1_1routing_1_1CloseExitMessage.md#function-bencode), [llarp::routing::DataDiscardMessage::BEncode](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md#function-bencode), [llarp::routing::DHTMessage::BEncode](Classes/structllarp_1_1routing_1_1DHTMessage.md#function-bencode), [llarp::routing::PathConfirmMessage::BEncode](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md#function-bencode), [llarp::routing::PathLatencyMessage::BEncode](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md#function-bencode), [llarp::routing::PathTransferMessage::BEncode](Classes/structllarp_1_1routing_1_1PathTransferMessage.md#function-bencode), [llarp::routing::TransferTrafficMessage::BEncode](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md#function-bencode), [llarp::service::ProtocolFrame::BEncode](Classes/structllarp_1_1service_1_1ProtocolFrame.md#function-bencode)


### function DecodeKey

```cpp
virtual bool DecodeKey(
    const llarp_buffer_t & key,
    llarp_buffer_t * buf
) =0
```


**Reimplemented by**: [llarp::routing::DataDiscardMessage::DecodeKey](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md#function-decodekey), [llarp::routing::TransferTrafficMessage::DecodeKey](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md#function-decodekey), [llarp::routing::ObtainExitMessage::DecodeKey](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md#function-decodekey), [llarp::routing::GrantExitMessage::DecodeKey](Classes/structllarp_1_1routing_1_1GrantExitMessage.md#function-decodekey), [llarp::routing::RejectExitMessage::DecodeKey](Classes/structllarp_1_1routing_1_1RejectExitMessage.md#function-decodekey), [llarp::routing::UpdateExitVerifyMessage::DecodeKey](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md#function-decodekey), [llarp::routing::UpdateExitMessage::DecodeKey](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md#function-decodekey), [llarp::routing::CloseExitMessage::DecodeKey](Classes/structllarp_1_1routing_1_1CloseExitMessage.md#function-decodekey), [llarp::routing::DHTMessage::DecodeKey](Classes/structllarp_1_1routing_1_1DHTMessage.md#function-decodekey), [llarp::routing::PathConfirmMessage::DecodeKey](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md#function-decodekey), [llarp::routing::PathLatencyMessage::DecodeKey](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md#function-decodekey), [llarp::routing::PathTransferMessage::DecodeKey](Classes/structllarp_1_1routing_1_1PathTransferMessage.md#function-decodekey), [llarp::service::ProtocolFrame::DecodeKey](Classes/structllarp_1_1service_1_1ProtocolFrame.md#function-decodekey)


### function HandleMessage

```cpp
virtual bool HandleMessage(
    IMessageHandler * h,
    AbstractRouter * r
) const =0
```


**Reimplemented by**: [llarp::routing::PathTransferMessage::HandleMessage](Classes/structllarp_1_1routing_1_1PathTransferMessage.md#function-handlemessage), [llarp::routing::ObtainExitMessage::HandleMessage](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md#function-handlemessage), [llarp::routing::GrantExitMessage::HandleMessage](Classes/structllarp_1_1routing_1_1GrantExitMessage.md#function-handlemessage), [llarp::routing::RejectExitMessage::HandleMessage](Classes/structllarp_1_1routing_1_1RejectExitMessage.md#function-handlemessage), [llarp::routing::UpdateExitVerifyMessage::HandleMessage](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md#function-handlemessage), [llarp::routing::UpdateExitMessage::HandleMessage](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md#function-handlemessage), [llarp::routing::CloseExitMessage::HandleMessage](Classes/structllarp_1_1routing_1_1CloseExitMessage.md#function-handlemessage), [llarp::routing::DataDiscardMessage::HandleMessage](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md#function-handlemessage), [llarp::routing::DHTMessage::HandleMessage](Classes/structllarp_1_1routing_1_1DHTMessage.md#function-handlemessage), [llarp::routing::PathConfirmMessage::HandleMessage](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md#function-handlemessage), [llarp::routing::PathLatencyMessage::HandleMessage](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md#function-handlemessage), [llarp::routing::TransferTrafficMessage::HandleMessage](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md#function-handlemessage), [llarp::service::ProtocolFrame::HandleMessage](Classes/structllarp_1_1service_1_1ProtocolFrame.md#function-handlemessage)


### function Clear

```cpp
virtual void Clear() =0
```


**Reimplemented by**: [llarp::routing::ObtainExitMessage::Clear](Classes/structllarp_1_1routing_1_1ObtainExitMessage.md#function-clear), [llarp::routing::GrantExitMessage::Clear](Classes/structllarp_1_1routing_1_1GrantExitMessage.md#function-clear), [llarp::routing::RejectExitMessage::Clear](Classes/structllarp_1_1routing_1_1RejectExitMessage.md#function-clear), [llarp::routing::UpdateExitVerifyMessage::Clear](Classes/structllarp_1_1routing_1_1UpdateExitVerifyMessage.md#function-clear), [llarp::routing::UpdateExitMessage::Clear](Classes/structllarp_1_1routing_1_1UpdateExitMessage.md#function-clear), [llarp::routing::CloseExitMessage::Clear](Classes/structllarp_1_1routing_1_1CloseExitMessage.md#function-clear), [llarp::routing::DataDiscardMessage::Clear](Classes/structllarp_1_1routing_1_1DataDiscardMessage.md#function-clear), [llarp::routing::DHTMessage::Clear](Classes/structllarp_1_1routing_1_1DHTMessage.md#function-clear), [llarp::routing::PathConfirmMessage::Clear](Classes/structllarp_1_1routing_1_1PathConfirmMessage.md#function-clear), [llarp::routing::PathLatencyMessage::Clear](Classes/structllarp_1_1routing_1_1PathLatencyMessage.md#function-clear), [llarp::routing::PathTransferMessage::Clear](Classes/structllarp_1_1routing_1_1PathTransferMessage.md#function-clear), [llarp::routing::TransferTrafficMessage::Clear](Classes/structllarp_1_1routing_1_1TransferTrafficMessage.md#function-clear), [llarp::service::ProtocolFrame::Clear](Classes/structllarp_1_1service_1_1ProtocolFrame.md#function-clear)


### function operator<

```cpp
inline bool operator<(
    const IMessage & other
) const
```


## Public Attributes Documentation

### variable from

```cpp
PathID_t from;
```


### variable S

```cpp
uint64_t S {0};
```


### variable version

```cpp
uint64_t version = llarp::constants::proto_version;
```


-------------------------------

Updated on 2023-01-24 at 18:23:42 +0000