Skip to content

Commit

Permalink
Add a "mac" field to the luv_interface_addresses().
Browse files Browse the repository at this point in the history
  • Loading branch information
brimworks committed Aug 17, 2015
1 parent 73bd9dc commit 2b7eb0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ static int luv_interface_addresses(lua_State* L) {
lua_pushboolean(L, interfaces[i].is_internal);
lua_setfield(L, -2, "internal");

lua_pushlstring(L, interfaces[i].phys_addr, sizeof(interfaces[i].phys_addr));
lua_setfield(L, -2, "mac");

if (interfaces[i].address.address4.sin_family == AF_INET) {
uv_ip4_name(&interfaces[i].address.address4,ip, sizeof(ip));
} else if (interfaces[i].address.address4.sin_family == AF_INET6) {
Expand Down

0 comments on commit 2b7eb0b

Please sign in to comment.