Skip to content

QuantumGate::Access::Manager::GetAddressAllowed

Karel Donk edited this page Dec 25, 2021 · 1 revision

Checks whether or not a network address is allowed to connect to the instance. Whether or not an address is allowed or not depends on a few things, such as the configured IP Filters and IP Subnet Limits, or the address reputation.

Signature

  1. Result<bool> GetAddressAllowed(const WChar* addr_str, const CheckType check) const noexcept;
  2. Result<bool> GetAddressAllowed(const String& addr_str, const CheckType check) const noexcept;
  3. Result<bool> GetAddressAllowed(const Address& addr, const CheckType check) const noexcept;

Parameters

Name Description
addr_str A QuantumGate::String or pointer to QuantumGate::WChar string containing the address to check for.
addr A QuantumGate::Address containing the address to check for.
check The type of access check to perform. See QuantumGate::Access::CheckType for details.

Return values

Returns a QuantumGate::Result object equal to one of the following QuantumGate::ResultCodes:

Value Description
QuantumGate::ResultCode::Succeeded The operation succeeded.
QuantumGate::ResultCode::AddressInvalid The operation failed because the address is invalid.
QuantumGate::ResultCode::InvalidArgument The operation failed because an invalid argument was passed into the function.

Upon successful completion the result will contain a bool value indicating whether the address is allowed (true) or not (false).

Clone this wiki locally