2016-03-05 15:25:01 +01:00
|
|
|
|
//
|
|
|
|
|
|
// TallyCode.cs
|
|
|
|
|
|
//
|
|
|
|
|
|
// Author:
|
2016-03-06 00:15:13 +01:00
|
|
|
|
// Carsten Sonne Larsen <cs@innolan.dk>
|
2016-03-05 15:25:01 +01:00
|
|
|
|
//
|
2016-03-06 00:15:13 +01:00
|
|
|
|
// Copyright (c) 2013 Carsten Sonne Larsen
|
2016-03-05 15:25:01 +01:00
|
|
|
|
//
|
|
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
|
|
//
|
|
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
|
|
//
|
|
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
|
// THE SOFTWARE.
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ntp.Analyzer.Objects
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The character in the left margin in the ‘peers’ billboard, called the
|
|
|
|
|
|
/// tally code, shows the fate of each association in the clock selection
|
|
|
|
|
|
/// process. Following is a list of these characters, the pigeon used in
|
|
|
|
|
|
/// the rv command, and a short explanation of the condition revealed.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// Source: man page of ntpq from FreeBSD, dated May 17 2006
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
public enum TallyCode
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is discarded as unreachable, synchronized to this
|
|
|
|
|
|
/// server (synch loop) or outrageous synchronization distance.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Reject,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is discarded by the intersection algorithm as a
|
|
|
|
|
|
/// falseticker.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
FalseTick,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is discarded as not among the first ten peers
|
|
|
|
|
|
/// sorted by synchronization distance and so is probably a
|
|
|
|
|
|
/// poor candidate for further consideration.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Excess,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is discarded by the clustering algorithm as an
|
|
|
|
|
|
/// outlyer.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Outlyer,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is a survivor and a candidate for the combining
|
|
|
|
|
|
/// algorithm.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Candidat,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer is a survivor, but not among the first six peers
|
|
|
|
|
|
/// sorted by synchronization distance. If the association is
|
|
|
|
|
|
/// ephemeral, it may be demobilized to conserve resources.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Selected,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer has been declared the system peer and lends its
|
|
|
|
|
|
/// variables to the system variables.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
SysPeer,
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The peer has been declared the system peer and lends its
|
|
|
|
|
|
/// variables to the system variables. However, the actual sys‐
|
|
|
|
|
|
/// tem synchronization is derived from a pulse-per-second (PPS)
|
|
|
|
|
|
/// signal, either indirectly via the PPS reference clock driver
|
|
|
|
|
|
/// or directly via kernel interface.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
PpsPeer,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|