aboutsummaryrefslogtreecommitdiff
path: root/src/mapport.h
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2020-02-23 02:12:19 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-01-07 18:07:09 +0200
commita39f7336a3b493d46a4486c4c94fdca1b3151370 (patch)
tree4adf1ae61b5b02f5081b5dbcee09b64503b0947f /src/mapport.h
parent28acffd9d53ec437e908abb8c84497a4f41b91ed (diff)
net: Add -natpmp command line option
Diffstat (limited to 'src/mapport.h')
-rw-r--r--src/mapport.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mapport.h b/src/mapport.h
index 2cdde775d3..279d65167f 100644
--- a/src/mapport.h
+++ b/src/mapport.h
@@ -5,12 +5,17 @@
#ifndef BITCOIN_MAPPORT_H
#define BITCOIN_MAPPORT_H
-/** -upnp default */
#ifdef USE_UPNP
-static const bool DEFAULT_UPNP = USE_UPNP;
+static constexpr bool DEFAULT_UPNP = USE_UPNP;
#else
-static const bool DEFAULT_UPNP = false;
-#endif
+static constexpr bool DEFAULT_UPNP = false;
+#endif // USE_UPNP
+
+#ifdef USE_NATPMP
+static constexpr bool DEFAULT_NATPMP = USE_NATPMP;
+#else
+static constexpr bool DEFAULT_NATPMP = false;
+#endif // USE_NATPMP
enum MapPortProtoFlag : unsigned int {
NONE = 0x00,
@@ -18,7 +23,7 @@ enum MapPortProtoFlag : unsigned int {
NAT_PMP = 0x02,
};
-void StartMapPort(bool use_upnp);
+void StartMapPort(bool use_upnp, bool use_natpmp);
void InterruptMapPort();
void StopMapPort();