in reply to Of Net::Arp and Hashes
Reading the C code, it appears to be doing an insanely overblown grep on /proc/net/arp. On bsd, the code reads the routing table from the system. Neither method actually performs an ARP.
The most likely reason I can see for the behaviour you are seeing is this chunk of code:
if(strlen(mac) > 0) strcpy(mac,"unkown"); else return -1;
The subroutine is supposed to look up an unknown mac, but I read this as exiting without setting the value if your initial guess is of zero length. I'm not good enough at XS to decipher that, but it looks as if your original guess is discarded and an unintialized buffer is passed in instead, so it may not be fixable without altering the code.
Given these two, I'd recommend ditching this module. You might want to look at arp-request.pl in the Net::Packet package.
Updated: Or, just read japhy saying the same thing, but earlier. :-þ Way to blow my 200th node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Of Net::Arp and Hashes
by cmilfo (Hermit) on Jan 13, 2006 at 19:05 UTC |