aboutsummaryrefslogtreecommitdiff
path: root/src/net_permissions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_permissions.h')
-rw-r--r--src/net_permissions.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/net_permissions.h b/src/net_permissions.h
index 962a2159fc..e004067e75 100644
--- a/src/net_permissions.h
+++ b/src/net_permissions.h
@@ -2,12 +2,18 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <netaddress.h>
+
#include <string>
#include <vector>
-#include <netaddress.h>
#ifndef BITCOIN_NET_PERMISSIONS_H
#define BITCOIN_NET_PERMISSIONS_H
+
+struct bilingual_str;
+
+extern const std::vector<std::string> NET_PERMISSIONS_DOC;
+
enum NetPermissionFlags
{
PF_NONE = 0,
@@ -27,6 +33,7 @@ enum NetPermissionFlags
PF_ISIMPLICIT = (1U << 31),
PF_ALL = PF_BLOOMFILTER | PF_FORCERELAY | PF_RELAY | PF_NOBAN | PF_MEMPOOL,
};
+
class NetPermissions
{
public:
@@ -45,17 +52,18 @@ public:
flags = static_cast<NetPermissionFlags>(flags & ~f);
}
};
+
class NetWhitebindPermissions : public NetPermissions
{
public:
- static bool TryParse(const std::string str, NetWhitebindPermissions& output, std::string& error);
+ static bool TryParse(const std::string str, NetWhitebindPermissions& output, bilingual_str& error);
CService m_service;
};
class NetWhitelistPermissions : public NetPermissions
{
public:
- static bool TryParse(const std::string str, NetWhitelistPermissions& output, std::string& error);
+ static bool TryParse(const std::string str, NetWhitelistPermissions& output, bilingual_str& error);
CSubNet m_subnet;
};