$mode = $line; # set echo mode from cluster
my $term = POSIX::Termios->new;
$term->getattr(fileno($sock));
$mode = $line; # set echo mode from cluster
my $term = POSIX::Termios->new;
$term->getattr(fileno($sock));
$sock = new Net::Telnet (Timeout => $timeout, Port => $port);
$sock->option_callback(\&optioncb);
$sock->output_record_separator('');
$sock = new Net::Telnet (Timeout => $timeout, Port => $port);
$sock->option_callback(\&optioncb);
$sock->output_record_separator('');
- $sock->option_log('option_log');
- $sock->dump_log('dump');
- $sock->option_accept(Wont => TELOPT_ECHO);
+# $sock->option_log('option_log');
+# $sock->dump_log('dump');
+ $sock->option_accept(Dont => TELOPT_ECHO, Wont => TELOPT_ECHO);
$sock->open($host) or die "Can't connect to $host port $port $!";
# } else {
# $sock = IO::Socket::INET->new(PeerAddr => "$host:$port", Proto => 'tcp')
$sock->open($host) or die "Can't connect to $host port $port $!";
# } else {
# $sock = IO::Socket::INET->new(PeerAddr => "$host:$port", Proto => 'tcp')
dbg('connect', "received \"$line\"");
if ($abort && $line =~ /$abort/i) {
dbg('connect', "aborted on /$abort/");
dbg('connect', "received \"$line\"");
if ($abort && $line =~ /$abort/i) {
dbg('connect', "aborted on /$abort/");
$mode = 2; # 1 - \n = \r as EOL, 2 - \n = \n, 0 - transparent
$call = ""; # the callsign being used
$mode = 2; # 1 - \n = \r as EOL, 2 - \n = \n, 0 - transparent
$call = ""; # the callsign being used
$conn = 0; # the connection object for the cluster
$lastbit = ""; # the last bit of an incomplete input line
$mynl = "\n"; # standard terminator
$lasttime = time; # lasttime something happened on the interface
$conn = 0; # the connection object for the cluster
$lastbit = ""; # the last bit of an incomplete input line
$mynl = "\n"; # standard terminator
$lasttime = time; # lasttime something happened on the interface
$buffered = 1; # buffer output
$savenl = ""; # an NL that has been saved from last time
$timeout = 60; # default timeout for connects
$buffered = 1; # buffer output
$savenl = ""; # an NL that has been saved from last time
$timeout = 60; # default timeout for connects
} elsif ($csort eq 'telnet') {
# open(STDIN, "<&$sock");
# open(STDOUT, ">&$sock");
} elsif ($csort eq 'telnet') {
# open(STDIN, "<&$sock");
# open(STDOUT, ">&$sock");
open IN, "$data/offline" or die;
while (<IN>) {
s/\n/\r/og if $mode == 1;
open IN, "$data/offline" or die;
while (<IN>) {
s/\n/\r/og if $mode == 1;