Net-Address-Ethernet - Re: How to handle multiple Ethernet Interfaces?

Posted on Fri Nov 10 23:56:24 2006 by cmv in response to 3479 (See the whole thread of 3)
Re: How to handle multiple Ethernet Interfaces?
Martin- I'm an advocate of changing the existing interface as little as possible. If you agree with this route, here are some thoughts that come to my mind: my $sAddress = get_address; Assigning get_address to a scalar variable would work as it does today, but the definition of which address you get back in a multi-interface system is the first active one that shows up when doing the given command on the given OS. my @sAddress = get_address; Assigning get_address to a list would return an array of all the active interfaces in a multi-interface system. my %sAddress = get_address; Assigning get_address to a hash would return a hash of all the active or inactive interfaces where the hash value is an indicator, or bit flag, such as: sAddress{xx:xx:xx:xx} = 'Active'; sAddress{xx:xx:xx:xx} = 1; You could also put arguments on some of these to give the user more flexibility, such as: my $sAddress = get_address(state=>'Active'); my @sAddress = get_address(state=>'Inactive'); my %sAddress = get_address(state=>0); Just some thoughts. -Craig
Write a response