mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
18 lines
367 B
C++
18 lines
367 B
C++
#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;
|
|
}
|