summaryrefslogtreecommitdiff
path: root/print-ntp.c
diff options
context:
space:
mode:
authorpeppe <g1pi@libero.it>2012-11-12 21:59:56 -0800
committerGuy Harris <guy@alum.mit.edu>2012-11-12 21:59:56 -0800
commit5e15e5929466ea340285186a2089a9e4b0d00978 (patch)
treefa446d3804248d09f0631e012e8d52dbbfd62b3a /print-ntp.c
parent87b0154b8a2d621c04f12fba3bf1843297de5d7c (diff)
downloadtcpdump-5e15e5929466ea340285186a2089a9e4b0d00978.tar.gz
The peer polling interval is an exponent; treat it as such.
RFC 1119 says Peer Poll Interval (peer.ppoll, pkt.ppoll): This is a signed integer indicating the minimum interval between messages sent by the peer, in seconds as a power of two. For instance, a alue of six indicates a minimum interval of 64 seconds. so print both the raw value and 2^{raw value}, showing the latter. Patch from Debian bug 686276. Reviewed-By: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'print-ntp.c')
-rw-r--r--print-ntp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/print-ntp.c b/print-ntp.c
index d56f02a2..b814cb57 100644
--- a/print-ntp.c
+++ b/print-ntp.c
@@ -117,7 +117,7 @@ ntp_print(register const u_char *cp, u_int length)
tok2str(ntp_stratum_values, (bp->stratum >=2 && bp->stratum<=15) ? "secondary reference" : "reserved", bp->stratum));
TCHECK(bp->ppoll);
- printf(", poll %us", bp->ppoll);
+ printf(", poll %u (%us)", bp->ppoll, 1 << bp->ppoll);
/* Can't TCHECK bp->precision bitfield so bp->distance + 0 instead */
TCHECK2(bp->root_delay, 0);