[ntp:questions] what is the meaning of dash in the type field of ntpq -p output?

Charles Elliott elliott.ch at verizon.net
Sun Jun 23 10:10:30 UTC 2013


On a Windows 8 machine,
according to the "route print" command,
0.0.0.0 is a valid network address.  It maps to
192.168.0.100 on this machine, which is one of two
interfaces, the other being 192.168.1.100.  Putting

server 0.0.0.0 iburst minpoll 4 maxpoll 5 noselect

in ntp.conf, it displays in ntpq -p as 'p' type and 
as "Unknown clock type" in NTP Time Server Monitor by
Meinberg.

Putting  

server 0.0.0.1 iburst minpoll 4 maxpoll 5 noselect

in the ntp.conf file, in ntpq -p it displays as 'u' clock
type and in the NTP Time Server Monitor by
Meinberg, the type indicator was "Unknown clock type."

Charles Elliott

> -----Original Message-----
> From: questions-bounces+elliott.ch=verizon.net at lists.ntp.org
> [mailto:questions-bounces+elliott.ch=verizon.net at lists.ntp.org] On
> Behalf Of Brian Utterback
> Sent: Saturday, June 22, 2013 10:42 AM
> To: questions at lists.ntp.org
> Subject: [ntp:questions] what is the meaning of dash in the type field
> of ntpq -p output?
> 
> A long standing question that I have been asked is what is the mean of
> a
> dask ("-") in the type field of the output of "ntpq -p". The type field
> is decoded from the destination address. Here is the code that
> determines the type:
> 
>                  ch = (char)(((dummy&0xf0000000)==0xe0000000) ? 'm' :
>                          ((dummy&0x000000ff)==0x000000ff) ? 'b' :
>                          ((dummy&0xffffffff)==0x7f000001) ? 'l' :
>                          ((dummy&0xffffffe0)==0x00000000) ? '-' :
>                          'u');
> 
>  From this we can see that if the first octet of the IP is 224, then it
> is mutlicast. If the last octet is 255, then it is boradcast. If it is
> 127.0.0.1 then is it is localhost. If everything except the last 5 bits
> are zero, then it is the dash. And if it isn't any of these, then it is
> unicast.
> 
> Of course, all of these definitions have problems, but I am totally
> flummoxed by the "-" test. I can't figure out what it is trying to find
> at all. Any ideas?
> 
> --
> blu
> 
> Always code as if the guy who ends up maintaining your code will be a
> violent psychopath who knows where you live. - Martin Golding
> -----------------------------------------------------------------------
> |
> Brian Utterback - Solaris RPE, Oracle Corporation.
> Ph:603-262-3916, Em:brian.utterback at oracle.com
> 
> _______________________________________________
> questions mailing list
> questions at lists.ntp.org
> http://lists.ntp.org/listinfo/questions



More information about the questions mailing list