28 Nov 03:31
Re: [Review] UUID library (mini-)review starts today, November 23rd
Manuel Fiorelli <manuel.fiorelli <at> gmail.com>
2008-11-28 02:31:13 GMT
2008-11-28 02:31:13 GMT
> > 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=link (I am not sure it is the original codeFor 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/c5451/?thread=5453 In any cases, one should add the error checking
Manuel Fiorelli _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
For Windows user I found the article
RSS Feed