summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/scripts/monitoring/ntp.pl
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2001-08-29 14:35:15 +0000
committerroberto <roberto@FreeBSD.org>2001-08-29 14:35:15 +0000
commit40b8e415eb0f835a9dd7a473ddf134ec67877fd7 (patch)
tree3cfb63f1a112ee17469b17fc1593a88d004ddda6 /contrib/ntp/scripts/monitoring/ntp.pl
parenta5a8dc6136fcee95f261a31609a25669038c3861 (diff)
downloadFreeBSD-src-40b8e415eb0f835a9dd7a473ddf134ec67877fd7.zip
FreeBSD-src-40b8e415eb0f835a9dd7a473ddf134ec67877fd7.tar.gz
Virgin import of ntpd 4.1.0
Diffstat (limited to 'contrib/ntp/scripts/monitoring/ntp.pl')
-rw-r--r--contrib/ntp/scripts/monitoring/ntp.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/ntp/scripts/monitoring/ntp.pl b/contrib/ntp/scripts/monitoring/ntp.pl
index ea9e69c..b23f396 100644
--- a/contrib/ntp/scripts/monitoring/ntp.pl
+++ b/contrib/ntp/scripts/monitoring/ntp.pl
@@ -1,4 +1,4 @@
-#!/local/bin/perl
+#!/usr/bin/perl -w
;#
;# ntp.pl,v 3.1 1993/07/06 01:09:09 jbj Exp
;#
@@ -43,7 +43,7 @@ $keyid=0;
;# N key
;# N2 checksum
-;# first bye of packet
+;# first byte of packet
sub pkt_LI { return ($_[$[] >> 6) & 0x3; }
sub pkt_VN { return ($_[$[] >> 3) & 0x7; }
sub pkt_MODE { return ($_[$[] ) & 0x7; }
@@ -223,6 +223,7 @@ sub PeerSelection
{
&getval(&psw_PSel($_[$[]),*PeerSelection);
}
+
sub PeerEvent
{
&getval(&psw_PCode($_[$[]),*PeerEvent);
@@ -394,14 +395,14 @@ sub handle_packet
$lastseen = 1 if !&pkt_M($r_e_m_op);
if (!defined(%FRAGS))
{
- # (&pkt_M($r_e_m_op) ? " more" : "")."\n";
+ print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
$FRAGS{$offset} = $data;
;# save other info
@FRAGS = ($status,$associd,&pkt_OP($r_e_m_op),$seq,$auth_keyid,$r_e_m_op);
}
else
{
- # (&pkt_M($r_e_m_op) ? " more" : "")."\n";
+ print((&pkt_M($r_e_m_op) ? " more" : "")."\n");
;# add frag to previous - combine on the fly
if (defined($FRAGS{$offset}))
{
OpenPOWER on IntegriCloud