> On Mar 16, 2020, at 11:22, Aran Reeks <cdtreeks@gmail.com> wrote:
>
> Hi Ben,
>
> Thanks for the feedback, I wasn't aware of net_get_interfaces, but that's really helpful and agree that post your patch, implementing a get_network_mac_addr() function (or similar name) would be amazing.
>
net_get_interfaces() returns an array that looks like this, so patching this wouldn’t introduce a new method but, rather, modify this array to include a key named “mac,” which (I think) it already does on Windows but not on Linux.
[
"lo" => [
"unicast" => [
[
"flags" => 65609,
"family" => 17,
],
[
"flags" => 65609,
"family" => 2,
"address" => "127.0.0.1",
"netmask" => "255.0.0.0",
],
],
"up" => true,
],
"tunl0" => [
"unicast" => [
[
"flags" => 128,
"family" => 17,
],
],
"up" => false,
],
"ip6tnl0" => [
"unicast" => [
[
"flags" => 128,
"family" => 17,
],
],
"up" => false,
],
"eth0" => [
"unicast" => [
[
"flags" => 69699,
"family" => 17,
],
[
"flags" => 69699,
"family" => 2,
"address" => "172.17.0.2",
"netmask" => "255.255.0.0",
"broadcast" => "172.17.255.255",
],
],
"up" => true,
],
]