Net-Address-Ethernet - Re: Fails on SunOS with non-fully-qualified NODENAME

Posted on Fri Jul 14 18:40:45 2006 by cmv in response to 2611 (See the whole thread of 3)
Re: Fails on SunOS with non-fully-qualified NODENAME
Martin- A quick followup on changing Net::Address::Ethernet to use Net::Domain for the hostname, based on my trial modifications of your module:

1.) Depending on configuration, you'll want to do an arp on BOTH the fully qualified and non-fully qualified domain name. The Net::Domain package has both the hostname and hostfqdn calls, which should provide both.

2.) I think you'll want to change your code to try one first, and if that fails, then try the other. On my implementation, I noticed that you saw the STDERR error message when arp fails. I don't know if you want to try and hide that or not.

3.) My implementation went something like this:
my @as = qx{ $ARP hostname }; if($?) { @as = qx{ $ARP hostfqdn }; }

Hope this helps. -Craig
Direct Responses: 2626 | Write a response