1
This commit is contained in:
parent
d4531c99b0
commit
3242e762a8
@ -20,7 +20,7 @@ static bool device_exists(const std::string& path)
|
||||
}
|
||||
|
||||
// 获取指定网卡 IPv4
|
||||
static std::string get_ip_address(const std::string& ifname)
|
||||
std::string get_ip_address(const std::string& ifname)
|
||||
{
|
||||
struct ifaddrs* ifaddr = nullptr;
|
||||
if (getifaddrs(&ifaddr) != 0) return "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user