5#ifndef BITCOIN_NET_PERMISSIONS_H
6#define BITCOIN_NET_PERMISSIONS_H
56 using t =
typename std::underlying_type<NetPermissionFlags>::type;
66 using t =
typename std::underlying_type<NetPermissionFlags>::type;
67 return (
static_cast<t
>(
flags) &
static_cast<t
>(f)) ==
static_cast<t
>(f);
82 using t =
typename std::underlying_type<NetPermissionFlags>::type;
90 static bool TryParse(
const std::string &str,
97 static bool TryParse(
const std::string &str,
A combination of a network address (CNetAddr) and a (TCP) port.
NetPermissionFlags m_flags
static void AddFlag(NetPermissionFlags &flags, NetPermissionFlags f)
static void ClearFlag(NetPermissionFlags &flags, NetPermissionFlags f)
ClearFlag is only called with f == NetPermissionFlags::Implicit.
static std::vector< std::string > ToStrings(NetPermissionFlags flags)
static bool HasFlag(NetPermissionFlags flags, NetPermissionFlags f)
static bool TryParse(const std::string &str, NetWhitebindPermissions &output, bilingual_str &error)
static bool TryParse(const std::string &str, NetWhitelistPermissions &output, ConnectionDirection &output_connection_direction, bilingual_str &error)
bool error(const char *fmt, const Args &...args)
static const bool DEFAULT_WHITELISTFORCERELAY
Default for -whitelistforcerelay.
static const bool DEFAULT_WHITELISTRELAY
Default for -whitelistrelay.
static constexpr NetPermissionFlags operator|(NetPermissionFlags a, NetPermissionFlags b)
@ BypassProofRequestLimits
const std::vector< std::string > NET_PERMISSIONS_DOC