+sub switch_connect($) {
+ my ($ip) = @_;
+
+# Dump_Log => '/tmp/dumplog-queue',
+ my $conn = new Net::Telnet( Timeout => $nms::config::telnet_timeout,
+ Errmode => 'return',
+ Prompt => '/(es3024|e\d+\-\dsw)>/i');
+ my $ret = $conn->open( Host => $ip);
+ if (!$ret || $ret != 1) {
+ return (undef);
+ }
+ # XXX: Just send the password as text, I did not figure out how to
+ # handle authentication with only password through $conn->login().
+ #$conn->login(»·Prompt => '/password[: ]*$/i',
+ # Name => $password,
+ # Password => $password);
+ $conn->cmd($nms::config::zyxel_password);
+ # Get rid of banner
+ $conn->get;
+ return ($conn);
+}
+