Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
ipUtils.hpp
Go to the documentation of this file.
1#ifndef IV_SRC_CORE_IPUTILS_HPP_
2#define IV_SRC_CORE_IPUTILS_HPP_
3
4#include "core/types.hpp"
5
6#include <cstdint>
7#include <optional>
8#include <tuple>
9
10namespace iv::core::ipUtils
11{
12std::optional<std::tuple<uint8_t, uint8_t, uint8_t, uint8_t>>
14
15bool isValidIP(const iv::types::ipAddress &ipAddress);
16
17std::optional<std::string> getNetworkAddress(const iv::types::ipAddress &ipAddress, uint8_t subnetMask);
18
19}// namespace iv::core::ipUtils
20
21#endif//IV_SRC_CORE_IPUTILS_HPP_
Definition ipUtils.cpp:11
std::optional< std::tuple< uint8_t, uint8_t, uint8_t, uint8_t > > extractIPComponents(const iv::types::ipAddress &ipAddress)
Definition ipUtils.cpp:55
bool isValidIP(const iv::types::ipAddress &ipAddress)
Definition ipUtils.cpp:13
std::optional< std::string > getNetworkAddress(const iv::types::ipAddress &ipAddress, uint8_t subnetMask)
Definition ipUtils.cpp:85
std::string ipAddress
Definition types.hpp:40