From: Kyle Schmitt Date: 2008-08-02T00:13:40+09:00 Subject: Re: Determining MAC address On Fri, Aug 1, 2008 at 9:03 AM, Glen Holcomb wrote: > What would be the best (clean, cross-platform) way of determining the MAC > address of a host when you have the hostname and IP address? > > -- > "Hey brother Christian with your high and mighty errand, Your actions speak > so loud, I can't hear a word you're saying." > > -Greg Graffin (Bad Religion) > There is an older project net-proto floating around. The same guy did a sys/admin and sys/net library. One of those may give you the information. It would be probably be easier to check for OS type, and then call and parse the output of ifconfig on real oses, and ipconfig on everything else. Both ifconfig and ipconfig can give you the mac address, and it won't take much slicing and dicing of the text to do it. --Kyle