sub custom_duplicate_ipaddr
{
   my %ip2dev;
   my %dev_ctime;
   my $cnt = 0;

   for my $line (adb_result ("mget * * sys ip4addr")) {
      my ($dev, undef, undef, undef, $ip) = split (" ", $line, 5);
      push @{ $ip2dev{$ip} }, $dev;
   }

   for my $line (adb_result ("mtime device *")) {
      my ($dev, undef, $val) = split (" ", $line, 3);
      my ($ctime, $mtime, $utime) = split (",", $val);
      $dev_ctime{$dev} = $ctime;
   }

   for my $ip (nat_sort keys %ip2dev) {
      if (scalar @{ $ip2dev{$ip} } > 1) {
         printf "%s\n", $ip;
         for my $dev (sort { $dev_ctime{$a} <=> $dev_ctime{$b} } @{ $ip2dev{$ip} }) {
            my $ctime = $dev_ctime{$dev};
            printf " %-20s <a href=\"/device-editor?mode=display;device_list=%s\" target=_blank>%s</a>\n",
                   time_simple ($ctime), $dev, $dev;
            $cnt++;
         }
         printf "\n";
      }
   }

   if ($cnt == 0) {
      printf "No duplicates found.\n";
   }
}