HunterSBuntu
October 24th, 2007, 12:21 AM
Does anyone have any recommendations on how to retrieve a MAC address programmatically?
So far I'm looking at doing a system call to ifconfig, piping that and parsing the output to get the MAC address. I can't help but feel that there should be a more elegant way of getting this info that I may have overlooked.
Are there any other methods that I can use to query network hardware for this sort of information?
So far I'm looking at doing a system call to ifconfig, piping that and parsing the output to get the MAC address. I can't help but feel that there should be a more elegant way of getting this info that I may have overlooked.
Are there any other methods that I can use to query network hardware for this sort of information?