Back to Site
Loading...
Searching...
No Matches
librats::PortMapResult Struct Reference

Result of a port mapping attempt. More...

#include <port_mapping.h>

Collaboration diagram for librats::PortMapResult:
[legend]

Public Attributes

PortMapTransport transport
 Backend that produced this result.
 
PortMapProtocol protocol
 Protocol of the mapping.
 
bool success = false
 Whether the mapping is currently active.
 
uint16_t internal_port = 0
 Local (LAN) port that was mapped.
 
uint16_t external_port = 0
 Public (WAN) port assigned by the router.
 
std::string external_ip
 Discovered public IP (may be empty)
 
std::string error
 Human readable error when !success.
 

Detailed Description

Result of a port mapping attempt.

On success external_port holds the public port the router assigned (which may differ from the requested one) and, when the backend can report it, external_ip holds the discovered public IP address.

Definition at line 50 of file port_mapping.h.

Member Data Documentation

◆ error

std::string librats::PortMapResult::error

Human readable error when !success.

Definition at line 57 of file port_mapping.h.

◆ external_ip

std::string librats::PortMapResult::external_ip

Discovered public IP (may be empty)

Definition at line 56 of file port_mapping.h.

◆ external_port

uint16_t librats::PortMapResult::external_port = 0

Public (WAN) port assigned by the router.

Definition at line 55 of file port_mapping.h.

◆ internal_port

uint16_t librats::PortMapResult::internal_port = 0

Local (LAN) port that was mapped.

Definition at line 54 of file port_mapping.h.

◆ protocol

PortMapProtocol librats::PortMapResult::protocol

Protocol of the mapping.

Definition at line 52 of file port_mapping.h.

◆ success

bool librats::PortMapResult::success = false

Whether the mapping is currently active.

Definition at line 53 of file port_mapping.h.

◆ transport

PortMapTransport librats::PortMapResult::transport

Backend that produced this result.

Definition at line 51 of file port_mapping.h.


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