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