return @groups;
}
+sub get_custom_group_addresses ($) {
+ my ($group_name) = @_;
+
+ # Array to store the found addresses/networks.
+ my @addresses = ();
+
+ # Loop through the hash of customgroups.
+ foreach my $key (keys %customgrp) {
+ # Skip entries which does not belong to the current processed
+ # group.
+ next unless($customgrp{$key}[0] eq $group_name);
+
+ # Call function to get the configured address of the current processed entry.
+ my @tmp = &get_address($customgrp{$key}[3], $customgrp{$key}[2], "tgt");
+
+ # The result is passed as a nested array, assign it to a better usable variable.
+ my $address = $tmp[0][0];
+
+ # Skip the entry if no address could be determined or it equals to "none".
+ next unless($address);
+ next if ($address eq "none");
+
+ # Normalize addresses of single hosts.
+ $address =~ s|/32||;
+ $address =~ s|/255.255.255.255||;
+
+ # Assign the address to the addresses array.
+ push(@addresses, $address);
+ }
+
+ # Remove any double entries.
+ @addresses = &General::uniq(@addresses);
+
+ # Return the addresses array.
+ return @addresses;
+}
+
return 1;