mapport.h raw

   1  // Copyright (c) 2011-2020 The Limenka developers
   2  // Distributed under the MIT software license, see the accompanying
   3  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
   4  
   5  #ifndef LIMENKA_MAPPORT_H
   6  #define LIMENKA_MAPPORT_H
   7  
   8  static constexpr bool DEFAULT_UPNP = false;
   9  
  10  static constexpr bool DEFAULT_NATPMP = true;
  11  
  12  enum MapPortProtoFlag : unsigned int {
  13      NONE = 0x00,
  14      UPNP = 0x01,
  15      PCP = 0x02,   // PCP with NAT-PMP fallback.
  16  };
  17  
  18  bool MapPortIsProtoEnabled(MapPortProtoFlag);
  19  
  20  void StartMapPort(bool use_upnp, bool use_pcp);
  21  void InterruptMapPort();
  22  void StopMapPort();
  23  
  24  #endif // LIMENKA_MAPPORT_H
  25