summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
da2c51a)
You will need IO::Socket::INET6 to use INET6 capability.
Also I have enabled PC92 slugging and set it to 1 minute as default.
Also I have put code in to handle empty first node slots in PC92.
+15Sep07=======================================================================
+1. Add *optional* INET6 connectivity. In order to use this you must load
+IO::Socket::INET6 and its dependencies from CPAN or get the distro's packaged
+versions. I used 'sudo aptitude install libio-socket-inet6-perl' for ubuntu
+(which should work for debian as well), for fedora/rpm based systems
+'sudo yum install perl-IO-Socket-INET6' or near equiv should work. This has
+been done quite simplistically, but it seems to work.
10Sep07=======================================================================
1. Remove warnings for EINPROGRESS etc for Windows perl 5.8.
2. Try to see if using just one lastid is viable in all situations. If it is
10Sep07=======================================================================
1. Remove warnings for EINPROGRESS etc for Windows perl 5.8.
2. Try to see if using just one lastid is viable in all situations. If it is
# thing a node might send - once an hour)
$pc9x_future_age = 5*60; # maximum age in the future ditto
$pc10_dupe_age = 45; # just something to catch duplicate PC10->PC93 conversions
# thing a node might send - once an hour)
$pc9x_future_age = 5*60; # maximum age in the future ditto
$pc10_dupe_age = 45; # just something to catch duplicate PC10->PC93 conversions
-$pc92_slug_changes = 0; # slug any changes going outward for this long
+$pc92_slug_changes = 60; # slug any changes going outward for this long
$last_pc92_slug = 0; # the last time we sent out any delayed add or del PC92s
# incoming talk commands
$last_pc92_slug = 0; # the last time we sent out any delayed add or del PC92s
# incoming talk commands
# this is the main route section
# here is where all the routes are created and destroyed
# this is the main route section
# here is where all the routes are created and destroyed
- my @ent = map {[ _decode_pc92_call($_) ]} grep {$_ && /^[0-7]/} @_[4 .. $#_];
+ # cope with missing duplicate node calls in the first slot for A or D
+ my $me = $_[4] || '';
+ $me ||= _encode_pc92_call($parent) if !$me && ($sort eq 'A' || $sort eq 'D');
+
+ my @ent = map {[ _decode_pc92_call($_) ]} grep {$_ && /^[0-7]/} $me, @_[5 .. $#_];
use DXUtil;
use IO::Select;
use DXUtil;
use IO::Select;
-use vars qw(%rd_callbacks %wt_callbacks %er_callbacks $rd_handles $wt_handles $er_handles $now %conns $noconns $blocking_supported $cnum $total_in $total_out);
+use vars qw(%rd_callbacks %wt_callbacks %er_callbacks $rd_handles $wt_handles $er_handles $now %conns $noconns $blocking_supported $cnum $total_in $total_out $io_socket);
%rd_callbacks = ();
%wt_callbacks = ();
%rd_callbacks = ();
%wt_callbacks = ();
local $^W;
require POSIX; POSIX->import(qw(O_NONBLOCK F_SETFL F_GETFL))
};
local $^W;
require POSIX; POSIX->import(qw(O_NONBLOCK F_SETFL F_GETFL))
};
+
+ eval {
+ local $^W;
+ require IO::Socket::INET6;
+ };
+
+ if ($@) {
+ dbg($@);
+ require IO::Socket;
+ $io_socket = 'IO::Socket::INET';
+ } else {
+ $io_socket = 'IO::Socket::INET6';
+ }
+ $io_socket->import;
+
if ($@ || $main::is_win) {
if ($@ || $main::is_win) {
- $blocking_supported = IO::Socket->can('blocking') ? 2 : 0;
+ $blocking_supported = $io_socket->can('blocking') ? 2 : 0;
- $blocking_supported = IO::Socket->can('blocking') ? 2 : 1;
+ $blocking_supported = $io_socket->can('blocking') ? 2 : 1;
$conn->{sort} = 'Outgoing';
# Create a new internet socket
$conn->{sort} = 'Outgoing';
# Create a new internet socket
- my $sock = IO::Socket::INET->new();
+ my $sock = $io_socket->new();
return undef unless $sock;
my $proto = getprotobyname('tcp');
return undef unless $sock;
my $proto = getprotobyname('tcp');
my $pid;
local $^F = 10000; # make sure it ain't closed on exec
my $pid;
local $^F = 10000; # make sure it ain't closed on exec
- my ($a, $b) = IO::Socket->socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC);
+ my ($a, $b) = $io_socket->socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC);
if ($a && $b) {
$a->autoflush(1);
$b->autoflush(1);
if ($a && $b) {
$a->autoflush(1);
$b->autoflush(1);
my ($pkg, $my_host, $my_port, $login_proc) = @_;
my $self = $pkg->new($login_proc);
my ($pkg, $my_host, $my_port, $login_proc) = @_;
my $self = $pkg->new($login_proc);
- $self->{sock} = IO::Socket::INET->new (
+ $self->{sock} = $io_socket->new (
LocalAddr => "$my_host:$my_port",
# LocalPort => $my_port,
Listen => SOMAXCONN,
LocalAddr => "$my_host:$my_port",
# LocalPort => $my_port,
Listen => SOMAXCONN,
$version = '1.54';
$subversion = '0';
$version = '1.54';
$subversion = '0';