mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-19 09:25:28 +00:00
f574cd798f
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use - shuffled around some cmake linking to simplify dependency graph - superfluous files removed
32 lines
674 B
C++
32 lines
674 B
C++
#pragma once
|
|
|
|
#include "ip_range.hpp"
|
|
|
|
#include <llarp/util/formattable.hpp>
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace llarp::net
|
|
{
|
|
/// info about a network interface lokinet does not own
|
|
struct InterfaceInfo
|
|
{
|
|
/// human readable name of interface
|
|
std::string name;
|
|
/// interface's index
|
|
int index;
|
|
/// the addresses owned by this interface
|
|
std::vector<IPRange> addrs;
|
|
/// a gateway we can use if it exists
|
|
std::optional<ipaddr_t> gateway;
|
|
|
|
std::string
|
|
ToString() const;
|
|
};
|
|
} // namespace llarp::net
|
|
|
|
template <>
|
|
inline constexpr bool llarp::IsToStringFormattable<llarp::net::InterfaceInfo> = true;
|