getting ethernet physical address
Tarjei Knapstad
tarjeik at chemcon.no
Thu Dec 20 11:55:27 GMT 2001
On 19 Dec 2001, René Märten wrote:
> Am Mit, 2001-12-19 um 15.49 schrieb Loh Yong Khun:
> > hi there,
> >
> > i would like to write a simple program to get the physical address of my
> > network card. can anybody let me know how to achieve that? which class or
> > function should i call? thanks in advance.
> >
> > YK (Loh Yong Khun)
> > <ykloh at lkta.com.my>
> >
>
> Hi YK,
>
> if You mean the MAC Addr, I think it is the simplest way to work with
> QProcess or KProcess. Start a /sbin/ifconfig <NIC> and grep the Stdout
> for "HWaddr":
>
> kcommander:~ # ifconfig | grep HWaddr
> eth0 Link encap:Ethernet HWaddr 00:50:BF:93:6D:82
>
Yup, but this is platform specific, which again means that it's probably
easier to just read this from /proc (if it's there...I didn't check).
Anyone else have a Win/Mac way of doing this? Would be interesting to
know...
--
Tarjei Knapstad
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list