LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Get the MAC address in Linux Device Driver (https://www.linuxquestions.org/questions/programming-9/get-the-mac-address-in-linux-device-driver-774829/)

saurin 12-10-2009 07:44 PM

Get the MAC address in Linux Device Driver
 
Hi,

I want to get the ethernet address (MAC address) in kernel module. How to do that?

Thanks,
Saurin

PTrenholme 12-10-2009 09:05 PM

If you're asking how to write a kernel module that will report a MAC address, look at the source code for some prigran that does that. For example, the program invoked by the ifconfig script reports the MAC address.

I suspect that the MAC address can by found by reading the correct file in the /proc pseudo-files. Almost all system information is available there.


All times are GMT -5. The time now is 12:56 PM.