47 [[nodiscard]] std::vector<std::pair<port_t, bool>>
scan()
const;
102 [[nodiscard]] std::optional<port_t>
parsePort(
char const *str)
const noexcept;
ports_t m_ports
Target ports.
std::vector< std::pair< port_t, bool > > scan() const
Scans all specified ports on the target IP address.
bool isIPv6(ipaddr_t const &ip) const noexcept
Checks if the given IP address string is a syntactically valid IPv6 address.
static port_t constexpr MIN_PORT
Minimum valid port number.
std::mutex m_mtx
Mutable mutex for thread safety.
bool isPortAccessible(port_t const port) const
Attempts to establish a TCP connection to the specified port. This function incorporates a timeout (T...
std::optional< port_t > parsePort(char const *str) const noexcept
Attempts to parse a C-string into a port_t. It also validates if the parsed number falls within the [...
bool isIPv4(ipaddr_t const &ip) const noexcept
Checks if the given IP address string is a syntactically valid IPv4 address.
static port_t constexpr MAX_PORT
Maximum valid port number.
ipaddr_t m_ip
Target IP address.
int constexpr TIMEOUT_MS
Timeout in milliseconds for socket connection attempts.
std::vector< port_t > ports_t
Vector of ports type.
uint16_t port_t
Port number type.
std::string ipaddr_t
IP address type.