[LEAPSECS] DNS examples

Rob Seaman seaman at noao.edu
Sat Jan 24 09:27:24 EST 2015


On Jan 24, 2015, at 1:29 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:

> In message <E1YEqBo-0007Gl-00 at www.xplot.org>, Tim Shepard writes:
> 
>> What should "next.leapsec.com" point at after July 1, 2015 in the few
>> weeks before Bulletin C number 50 is issued?
> 
> It should point to C49 until C50 is published.
> 
> And I think it should be bulletin-c.$domain

These are different use cases.

% dig +short bulletin-c.leapsec.com a | grep -v leapsec | ./leapdecode.py
244.20.141.253 -> OK  2015  7  +35 +1

That is, whatever is the most recent IERS Bulletin C, leap second announcement or not.

But latest (got rid of next and prev) is the most recent/pending leap second - and previous is the one before that:

% dig +short latest.leapsec.com a | grep -v leapsec | ./leapdecode.py
244.20.141.253 -> OK  2015  7  +35 +1

and

seaman% dig +short previous.leapsec.com a | grep -v leapsec | ./leapdecode.py
243.204.137.96 -> OK  2012  7  +34 +1

In this version I've updated to PHK's most recent suggestion for the packet format:

> % diff newleap.py leap.py
> 91,92c91,92
> < 	b = w & 0x7f
> < 	w >>= 7	
> ---
> > 	b = w & 0xff
> > 	w >>= 8	
> 108c108
> < 	w <<= 7
> ---
> > 	w <<= 8

(leapdecode just passes the standard input through the updated dec())

That is "1111" + 11 month bits + 7 leap + 2 flags + 8 CRC.  I don't believe the current encoder/decoder actually mandates a signed int for the leaps, so suggest we make that 7 unsigned bits as has been discussed.  Note that the two flag bits can either be interpreted as a 2-bit 2's-complement signed offset or as separate "negative?" and "leap?" bits.  A problem with the signed interpretation is that it would permit expression of a double negative leap second.

Human readability is of value, in which case the pseudo addresses could be rearranged to put the negative flag with the leap bits in the third byte and the leap flag preceding the month bits in the (trailing half of the) first byte and the second byte.  Then TAI-UTC would be readable directly from the third field of the address (as the CRC is from the fourth field).  And actual leap second reports would be sorted into the section of the address space above 248.  (This is similar to representing the flags as signed numbers for months and leaps, except the 11 and 7 bit values would remain pure binary numbers simply preceded by the corresponding flag.)  Something like:

	c48alt.leapsec.com -> 242.9.35.123
	c49alt.leapsec.com -> 250.10.36.123

As shown, I think we also want to index TAI-UTC after the leap.  This is similar to how the IERS table has it, and remaining aligned with that resource may be a strong enough argument.  (Negative leap seconds would also be made pretty obvious as values above 128 in the third byte.)

Have also added a frame forward from leapsec.com to http://hpiers.obspm.fr/iers/bul/bulc/Leap_Second_History.dat for easy browser access.

If there are no strong objections I'll write an encoder/decoder for the rearranged format and update DNS as described.

Rob
--
where

% dig +short bulletin-c.leapsec.com a
c49.leapsec.com.
244.20.141.253

and have only entered the last 10 bulletins, since I suspect we're still evolving:

% dig +short c40.leapsec.com a | ./leapdecode.py
243.168.136.11 -> OK  2011  1  +34 +0
% dig +short c41.leapsec.com a | ./leapdecode.py
243.180.136.170 -> OK  2011  7  +34 +0
% dig +short c42.leapsec.com a | ./leapdecode.py
243.192.136.180 -> OK  2012  1  +34 +0
% dig +short c43.leapsec.com a | ./leapdecode.py
243.204.137.96 -> OK  2012  7  +34 +1
% dig +short c44.leapsec.com a | ./leapdecode.py
243.216.140.235 -> OK  2013  1  +35 +0
% dig +short c45.leapsec.com a | ./leapdecode.py
243.228.140.13 -> OK  2013  7  +35 +0
% dig +short c46.leapsec.com a | ./leapdecode.py
243.240.140.218 -> OK  2014  1  +35 +0
% dig +short c47.leapsec.com a | ./leapdecode.py
243.252.140.151 -> OK  2014  7  +35 +0
% dig +short c48.leapsec.com a | ./leapdecode.py
244.8.140.197 -> OK  2015  1  +35 +0
% dig +short c49.leapsec.com a | ./leapdecode.py
244.20.141.253 -> OK  2015  7  +35 +1



More information about the LEAPSECS mailing list