router MAC address lookup on linux

Jussi Kukkonen jhkukkon at cc.hut.fi
Wed Aug 1 03:18:11 PDT 2007


Forgot to mention. The router MAC address is fetched with this beauty:

> popen ("AP_IP=`netstat -rn | grep '^0.0.0.0 ' | awk '{ print $2 }'` &&
grep \"^$AP_IP \" /proc/net/arp | awk '{print $4}' | tr A-Z a-z", "r")

If anyone has a sane method for getting to the same information, please
let me know.

-jussi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/geoclue/attachments/20070801/594bd89e/attachment.pgp 


More information about the GeoClue mailing list