util.cpp (ff12acbb8c02d965232e14829518bc6c4d34e53d) | util.cpp (9644479597cc3ec3ca659f458521a4156fc738b0) |
---|---|
1#include "config.h" 2 3#include "util.hpp" 4 5#include "config_parser.hpp" 6#include "types.hpp" 7 8#include <arpa/inet.h> --- 186 unchanged lines hidden (view full) --- 195} 196 197bool isValidPrefix(int family, uint8_t prefix) 198{ 199 return familyVisit( 200 [=]<int f>() noexcept { return isValidPrefix<f>(prefix); }, family); 201} 202 | 1#include "config.h" 2 3#include "util.hpp" 4 5#include "config_parser.hpp" 6#include "types.hpp" 7 8#include <arpa/inet.h> --- 186 unchanged lines hidden (view full) --- 195} 196 197bool isValidPrefix(int family, uint8_t prefix) 198{ 199 return familyVisit( 200 [=]<int f>() noexcept { return isValidPrefix<f>(prefix); }, family); 201} 202 |
203InterfaceList getInterfaces() | 203string_uset getSystemInterfaces() |
204{ | 204{ |
205 InterfaceList interfaces{}; | 205 string_uset interfaces; |
206 struct ifaddrs* ifaddr = nullptr; 207 208 // attempt to fill struct with ifaddrs 209 if (getifaddrs(&ifaddr) == -1) 210 { 211 auto error = errno; 212 log<level::ERR>("Error occurred during the getifaddrs call", 213 entry("ERRNO=%d", error)); --- 326 unchanged lines hidden --- | 206 struct ifaddrs* ifaddr = nullptr; 207 208 // attempt to fill struct with ifaddrs 209 if (getifaddrs(&ifaddr) == -1) 210 { 211 auto error = errno; 212 log<level::ERR>("Error occurred during the getifaddrs call", 213 entry("ERRNO=%d", error)); --- 326 unchanged lines hidden --- |