use Exporter qw(import);
-our @EXPORT_OK = qw(GenerateMonitoredFiles FilePositions);
+our @EXPORT_OK = qw(GenerateMonitoredFiles DetectIPProtocolVersion FilePositions);
use Net::IP;
}
}
+#
+## DetectIPProtocolVersion function.
+#
+## Wrapper function for determining the used protocol version (4/6)
+## for a given IP address.
+#
+sub DetectIPProtocolVersion ($) {
+ my $address = shift;
+
+ # Call external perl module to detect the used IP protocol version.
+ my $version = &Net::IP::ip_get_version($address);
+
+ # Return the detected version.
+ return $version;
+}
+
#
## Function for fileposition initialization.
#