Changeset 97
- Timestamp:
- Mar 30, 2011, 11:17:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/klask
r96 r97 1186 1186 my $days_to_dead = 365 * 2; 1187 1187 my $format = 'txt'; 1188 my $verbose; 1188 1189 1189 1190 my $ret = GetOptionsFromArray(\@vlan_name, 1190 1191 'day|d=i' => \$days_to_dead, 1191 1192 'format|f=s' => \$format, 1193 'verbose|v' => \$verbose, 1192 1194 ); 1193 1195 … … 1195 1197 txt => \&cmd_ip_free_txt, 1196 1198 html => \&cmd_ip_free_html, 1199 none => sub {}, 1197 1200 ); 1198 1201 $format = 'txt' if not defined $possible_format{$format}; … … 1212 1215 1213 1216 my @ip_list = get_list_ip($vlan); 1214 # my $current_interface = get_current_interface($vlan); 1215 1217 1216 1218 LOOP_ON_IP_ADDRESS: 1217 1219 for my $ip (@ip_list) { … … 1236 1238 $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET) || 'unknown' if defined $packed_ip; 1237 1239 $result_ip{$ip}->{hostname_fq} = $hostname_fq; 1238 1240 1239 1241 $result_ip{$ip}->{vlan} = $vlan; 1242 1243 printf "VERBOSE_1: %-15s %-12s %s\n", $ip, $vlan, $hostname_fq if $verbose; 1240 1244 } 1241 1245 }
Note: See TracChangeset
for help on using the changeset viewer.