Bitcoin Core 28.99.0
P2P Digital Currency
Functions | Variables
mapport.cpp File Reference
#include <mapport.h>
#include <clientversion.h>
#include <common/netif.h>
#include <common/pcp.h>
#include <common/system.h>
#include <logging.h>
#include <net.h>
#include <netaddress.h>
#include <netbase.h>
#include <random.h>
#include <util/thread.h>
#include <util/threadinterrupt.h>
#include <atomic>
#include <cassert>
#include <chrono>
#include <functional>
#include <string>
#include <thread>
Include dependency graph for mapport.cpp:

Go to the source code of this file.

Functions

static bool ProcessPCP ()
 
static void ThreadMapPort ()
 
void StartThreadMapPort ()
 
static void DispatchMapPort ()
 
static void MapPortProtoSetEnabled (MapPortProtoFlag proto, bool enabled)
 
void StartMapPort (bool use_pcp)
 
void InterruptMapPort ()
 
void StopMapPort ()
 

Variables

static CThreadInterrupt g_mapport_interrupt
 
static std::thread g_mapport_thread
 
static std::atomic_uint g_mapport_enabled_protos {MapPortProtoFlag::NONE}
 
static std::atomic< MapPortProtoFlagg_mapport_current_proto {MapPortProtoFlag::NONE}
 
static constexpr auto PORT_MAPPING_REANNOUNCE_PERIOD {20min}
 
static constexpr auto PORT_MAPPING_RETRY_PERIOD {5min}
 

Function Documentation

◆ DispatchMapPort()

static void DispatchMapPort ( )
static

Definition at line 154 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InterruptMapPort()

void InterruptMapPort ( )

Definition at line 191 of file mapport.cpp.

Here is the caller graph for this function:

◆ MapPortProtoSetEnabled()

static void MapPortProtoSetEnabled ( MapPortProtoFlag  proto,
bool  enabled 
)
static

Definition at line 176 of file mapport.cpp.

Here is the caller graph for this function:

◆ ProcessPCP()

static bool ProcessPCP ( )
static

Definition at line 35 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartMapPort()

void StartMapPort ( bool  use_pcp)

Definition at line 185 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartThreadMapPort()

void StartThreadMapPort ( )

Definition at line 146 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StopMapPort()

void StopMapPort ( )

Definition at line 199 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThreadMapPort()

static void ThreadMapPort ( )
static

Definition at line 126 of file mapport.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_mapport_current_proto

std::atomic<MapPortProtoFlag> g_mapport_current_proto {MapPortProtoFlag::NONE}
static

Definition at line 29 of file mapport.cpp.

◆ g_mapport_enabled_protos

std::atomic_uint g_mapport_enabled_protos {MapPortProtoFlag::NONE}
static

Definition at line 28 of file mapport.cpp.

◆ g_mapport_interrupt

CThreadInterrupt g_mapport_interrupt
static

Definition at line 26 of file mapport.cpp.

◆ g_mapport_thread

std::thread g_mapport_thread
static

Definition at line 27 of file mapport.cpp.

◆ PORT_MAPPING_REANNOUNCE_PERIOD

constexpr auto PORT_MAPPING_REANNOUNCE_PERIOD {20min}
staticconstexpr

Definition at line 32 of file mapport.cpp.

◆ PORT_MAPPING_RETRY_PERIOD

constexpr auto PORT_MAPPING_RETRY_PERIOD {5min}
staticconstexpr

Definition at line 33 of file mapport.cpp.