62Result<void> ValidateTapInterfaceIsUsable(
const std::string& interface_name);
70 std::string_view ipaddr);
72 std::string_view ipaddr);
85bool StartDnsmasq(std::string_view bridge_name, std::string_view gateway,
86 std::string_view dhcp_range);
char * name
Definition: libf2fs.c:1403
Definition: alloc_driver.h:20
std::optional< std::string > GetUserName(uid_t uid)
Definition: alloc_utils.cpp:214
constexpr char kWirelessIp[]
Definition: alloc_utils.h:33
bool DestroyIface(std::string_view name)
Definition: alloc_utils.cpp:198
bool CreateEthernetIface(std::string_view name, std::string_view bridge_name)
Definition: alloc_utils.cpp:71
bool SetupBridgeGateway(std::string_view bridge_name, std::string_view ipaddr)
Definition: alloc_utils.cpp:237
bool DestroyMobileIface(std::string_view name, uint16_t id, std::string_view ipaddr)
Definition: alloc_utils.cpp:132
constexpr int kSocketMode
Definition: alloc_utils.h:39
void CleanupBridgeGateway(std::string_view name, std::string_view ipaddr, const GatewayConfig &config)
Definition: alloc_utils.cpp:271
bool CreateEthernetBridgeIface(std::string_view name, std::string_view ipaddr)
Definition: alloc_utils.cpp:348
bool CreateMobileIface(std::string_view name, uint16_t id, std::string_view ipaddr)
Definition: alloc_utils.cpp:99
Result< std::string > DnsmasqPath()
Definition: alloc_utils.cpp:386
int RunExternalCommand(const std::string &command)
constexpr char kMobileIp[]
Definition: alloc_utils.h:35
constexpr char kEthernetIp[]
Definition: alloc_utils.h:37
Result< std::string > IptablesPath()
Definition: alloc_utils.cpp:378
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30
bool CreateTap(std::string_view name)
Definition: alloc_utils.cpp:156
bool DestroyEthernetIface(std::string_view name)
Definition: alloc_utils.cpp:152
bool DestroyBridge(std::string_view name)
Definition: alloc_utils.cpp:223
void CleanupEthernetIface(std::string_view name)
Definition: alloc_utils.cpp:154
bool DestroyEthernetBridgeIface(std::string_view name, std::string_view ipaddr)
Definition: alloc_utils.cpp:367
constexpr uint32_t kMaxIfaceNameId
Definition: alloc_utils.h:45
bool StopDnsmasq(std::string_view name)
Definition: alloc_utils.cpp:322
bool StartDnsmasq(std::string_view bridge_name, std::string_view gateway, std::string_view dhcp_range)
Definition: alloc_utils.cpp:294
Definition: alloc_utils.h:48
bool has_gateway
Definition: alloc_utils.h:49
bool has_dnsmasq
Definition: alloc_utils.h:50
bool has_iptable
Definition: alloc_utils.h:51