UDP-WG Implementation
Loading...
Searching...
No Matches
wireguard::TransportPacket Class Reference

A WireGuard packet for sending Transport Messages. More...

#include <wireguard.h>

Inheritance diagram for wireguard::TransportPacket:
wireguard::Packet

Public Member Functions

 TransportPacket (const std::string &buffer)
 
crypto::stringoperator[] (const size_t &val)
 
const crypto::stringoperator[] (const size_t &val) const
 
- Public Member Functions inherited from wireguard::Packet
std::string Serialize ()
 Serialize the packet.
 
void Expand (const std::string &buffer, const bool &fill=false)
 Construct a Packet from a std::string.
 

Static Public Member Functions

static udp::packet Create (config &config, const udp::packet &in)
 
static udp::packet Return (config &config, const udp::packet &packet)
 Receive an encrypted WireGuard communication.
 

Static Public Attributes

static constexpr size_t reserved = 0
 
static constexpr size_t receiver = 1
 
static constexpr size_t counter = 2
 
static constexpr size_t packet = 3
 

Additional Inherited Members

- Protected Attributes inherited from wireguard::Packet
std::vector< crypto::stringvalues
 

Detailed Description

A WireGuard packet for sending Transport Messages.

Remarks
See 5.4.6 of the WireGuard Reference

Member Function Documentation

◆ Return()

static udp::packet wireguard::TransportPacket::Return ( config & config,
const udp::packet & packet )
inlinestatic

Receive an encrypted WireGuard communication.

Parameters
bufferThe raw bytes of the UDP data containing our WireGuard payload.
lengthThe size of the buffer
Returns
The data.
Remarks
See 5.4.6 of the Reference.

The documentation for this class was generated from the following file: