2010-12-28

erlang 에서 MAC 값 구하기

{ok, [{hwaddr, PL}]}=inet:ifget("eth0", [hwaddr]).
string:join([hd(io_lib:format("~2.16.0B",[X])) || X <- PL], ":").