PIVX Core  5.6.99
P2P Digital Currency
mapport.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin Core developers
2 // Copyright (c) 2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef PIVX_MAPPORT_H
7 #define PIVX_MAPPORT_H
8 
9 #ifdef USE_UPNP
10 static constexpr bool DEFAULT_UPNP = USE_UPNP;
11 #else
12 static constexpr bool DEFAULT_UPNP = false;
13 #endif // USE_UPNP
14 
15 #ifdef USE_NATPMP
16 static constexpr bool DEFAULT_NATPMP = USE_NATPMP;
17 #else
18 static constexpr bool DEFAULT_NATPMP = false;
19 #endif // USE_NATPMP
20 
21 enum MapPortProtoFlag : unsigned int {
22  NONE = 0x00,
23  UPNP = 0x01,
24  NAT_PMP = 0x02,
25 };
26 
27 void StartMapPort(bool use_upnp, bool use_natpmp);
28 void InterruptMapPort();
29 void StopMapPort();
30 
31 #endif // PIVX_MAPPORT_H
void StartMapPort(bool use_upnp, bool use_natpmp)
Definition: mapport.cpp:327
void StopMapPort()
Definition: mapport.cpp:335
MapPortProtoFlag
Definition: mapport.h:21
@ UPNP
Definition: mapport.h:23
@ NAT_PMP
Definition: mapport.h:24
@ NONE
Definition: mapport.h:22
void InterruptMapPort()
Definition: mapport.cpp:331
#define USE_UPNP
Definition: pivx-config.h:431
#define USE_NATPMP
Definition: pivx-config.h:424