[Beowulf] regarding ethernet hardware address

Bogdan Costescu Bogdan.Costescu at iwr.uni-heidelberg.de
Mon Oct 22 03:03:25 PDT 2007

On Sun, 21 Oct 2007, sri harsha wrote:

> In via-rhine.c, which fuction returns the value of the ethernet 
> hardware address.

I don't know what you mean by 'returns the value', but the following 
lines in function rhine_init_one() read the hardware address from the 
EEPROM and fill the structure which will be used by the kernel:

         for (i = 0; i < 6; i++)
                 dev->dev_addr[i] = ioread8(ioaddr + StationAddr + i);

Please note that:
- this is a question best answered on the Linux netdev mailing list
- the answer might be dependent on the kernel version that you are 
looking at (mine is from a 2.6.18-based RHEL kernel)
- if you can't figure this answer out by yourself, you'd probably 
better stay away from kernel programming

If you just want to get the hardware address in user space, you can 
parse the output of 'ifconfig', 'ip' or some other similar utility. If 
the Linux distribution that you use supports sysfs, you can also get 
that informatiion from something like:


Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu at IWR.Uni-Heidelberg.De

More information about the Beowulf mailing list