
Why not leaving the burden of retrieving the MAC address to the user, then?
In my opinion one can provide a "generic" generator, which requires a MAC address; but there should be a set of platform specific generators, which use system calls to get the hardware address. I am not a network expert, but it seems that on Linux you can obtain the MAC address through IOCTL http://www.geekpage.jp/en/programming/linux-network/get-macaddr.php even if this approach couldn't be very reliable http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2007-06/msg00854.html In any case one could look at the ifconfig source http://www.koders.com/c/fidF4E339CD5847BBECCA5405DD6592D79452A56D3E.aspx?s=l... (I am not sure it is the original code :-) For Windows user I found the article http://www.codeguru.com/cpp/i-n/network/networkinformation/article.php/c5451 with a warning http://www.codeguru.com/cpp/i-n/network/networkinformation/comments.php/c545... In any cases, one should add the error checking :-) Manuel Fiorelli