initial commit
This commit is contained in:
17
third_party/libhv/unittest/ifconfig_test.cpp
vendored
Executable file
17
third_party/libhv/unittest/ifconfig_test.cpp
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ifconfig.h"
|
||||
|
||||
int main() {
|
||||
std::vector<ifconfig_t> ifcs;
|
||||
ifconfig(ifcs);
|
||||
for (auto& item : ifcs) {
|
||||
printf("%s\nip: %s\nmask: %s\nbroadcast: %s\nmac: %s\n\n",
|
||||
item.name,
|
||||
item.ip,
|
||||
item.mask,
|
||||
item.broadcast,
|
||||
item.mac);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user