Re: MAC address for Ethernet interface

Craig Kelley <[email protected]> Fri, 12 Dec 2003 09:01:56 -0700 (MST)
Newsgroups gmane.linux.redhat.devel
Message-ID <[email protected]>
On Fri, 12 Dec 2003, anil  garrepally wrote:

> Is there any system call available for getting the MAC address of
> ethernet interface. I need it in my program.

/sbin/ifconfig eth0 | head -n 1 | awk '{ print $5 }'

--
Craig Kelley  -- [email protected]
Turn In Your Neighbor Today!  http://www.bsa.org/usa/report/report.php
http://www.isu.edu/~kellcrai finger [email protected] for PGP block