Lines Matching +full:0 +full:- +full:127
1 #! @PATH_PERL@ -w
3 # John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
20 my $dodns = $opts->{numeric} ? 0 : 1;
21 my $max_hosts = $opts->{'max-hosts'};
22 my $host = shift || $opts->{host};
23 my $nb_host = 0;
42 last if $info{stratum} == 0 || $info{stratum} == 1 ||
44 last if $info{refid} =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
49 last if $next_host =~ /^127\.127\.\d{1,3}\.\d{1,3}$/;
53 return 0;
58 my ($rootdelay, $rootdisp, $info) = (0, 0);
60 $info = ntp_read_vars(0, [], $host);
62 return if not exists $info->{stratum};
64 if (not (exists $info->{offset} && looks_like_number($info->{offset}))) {
65 $info->{offset} = "NaN";
67 $info->{offset} /= 1000;
68 if (not (exists $info->{rootdisp} && looks_like_number($info->{rootdisp}))) {
69 $info->{rootdisp} = "NaN";
71 if (not (exists $info->{rootdelay} && looks_like_number($info->{rootdelay}))) {
72 $info->{rootdelay} = "NaN";
74 $info->{syncdistance} = ($info->{rootdisp} + ($info->{rootdelay} / 2)) / 1000;
85 return $info->{srcadr};