working commit

This commit is contained in:
Олег Бородин
2026-05-20 17:43:25 +02:00
parent ee4cee5809
commit f2c0679255
3 changed files with 16 additions and 1 deletions
+8 -1
View File
@@ -29,7 +29,14 @@ std::expected<void, std::string> TunService::Init(void) {
if (!netprefixRes) {
return std::unexpected(networkRes.error());
};
auto prefix = netprefixRes.value();
auto netaddr = networkRes.value();
auto totalHostsRes = netcapa(netaddr, prefix);
if (!totalHostsRes) {
return std::unexpected(totalHostsRes.error());
};
auto totalNets = totalHostsRes.value() / 4;
uxlogger.Debug(std::format("Total networks: {}", totalNets));
return {};
}