bitcoin/src/mapport.h

31 lines
746 B
C
Raw Normal View History

// Copyright (c) 2011-2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_MAPPORT_H
#define BITCOIN_MAPPORT_H
#ifdef USE_UPNP
2020-02-22 21:12:19 -03:00
static constexpr bool DEFAULT_UPNP = USE_UPNP;
#else
2020-02-22 21:12:19 -03:00
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,
UPNP = 0x01,
2020-02-22 20:34:13 -03:00
NAT_PMP = 0x02,
};
2020-02-22 21:12:19 -03:00
void StartMapPort(bool use_upnp, bool use_natpmp);
void InterruptMapPort();
void StopMapPort();
#endif // BITCOIN_MAPPORT_H