in reply to mac to IP address?
I am not aware of a nice perl way to do it, but a very nasty hack could be (on *NIX systems):
my $arp = `/usr/sbin/arp -a`; my $mac = "aa.bb.cc.dd.ee.ff"; if($arp =~ m/\(([\d\.]+)\) at $mac/) { print "$1\n"; }
Update: please do note that the MAC address needs to be in the arp cache for this approach.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: mac to IP address?
by coec (Chaplain) on Jan 23, 2004 at 02:40 UTC | |
by Anonymous Monk on Jan 23, 2004 at 02:54 UTC | |
by Anonymous Monk on Jan 24, 2004 at 17:43 UTC | |
|
Re: Re: mac to IP address?
by cleverett (Friar) on Jan 23, 2004 at 06:52 UTC | |
by iburrell (Chaplain) on Jan 26, 2004 at 21:43 UTC |