"Fossies" - the Fresh Open Source Software Archive

Member "chrony-3.5/srcparams.h" (10 May 2019, 2392 Bytes) of package /linux/misc/chrony-3.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "srcparams.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.3_vs_3.4.

    1 /*
    2   chronyd/chronyc - Programs for keeping computer clocks accurate.
    3 
    4  **********************************************************************
    5  * Copyright (C) Richard P. Curnow  1997-2002
    6  * 
    7  * This program is free software; you can redistribute it and/or modify
    8  * it under the terms of version 2 of the GNU General Public License as
    9  * published by the Free Software Foundation.
   10  * 
   11  * This program is distributed in the hope that it will be useful, but
   12  * WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   14  * General Public License for more details.
   15  * 
   16  * You should have received a copy of the GNU General Public License along
   17  * with this program; if not, write to the Free Software Foundation, Inc.,
   18  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
   19  * 
   20  **********************************************************************
   21 
   22   =======================================================================
   23 
   24   Header file defining parameters that can be set on a per source basis
   25   */
   26 
   27 #ifndef GOT_SRCPARAMS_H
   28 #define GOT_SRCPARAMS_H
   29 
   30 #include "sources.h"
   31 
   32 typedef enum {
   33   SRC_OFFLINE,
   34   SRC_ONLINE,
   35   SRC_MAYBE_ONLINE,
   36 } SRC_Connectivity;
   37 
   38 typedef struct {
   39   int minpoll;
   40   int maxpoll;
   41   SRC_Connectivity connectivity;
   42   int auto_offline;
   43   int presend_minpoll;
   44   int burst;
   45   int iburst;
   46   int min_stratum;
   47   int poll_target;
   48   int version;
   49   int max_sources;
   50   int min_samples;
   51   int max_samples;
   52   int filter_length;
   53   int interleaved;
   54   int sel_options;
   55   uint32_t authkey;
   56   double max_delay;
   57   double max_delay_ratio;
   58   double max_delay_dev_ratio;
   59   double min_delay;
   60   double asymmetry;
   61   double offset;
   62 } SourceParameters;
   63 
   64 #define SRC_DEFAULT_PORT 123
   65 #define SRC_DEFAULT_MINPOLL 6
   66 #define SRC_DEFAULT_MAXPOLL 10
   67 #define SRC_DEFAULT_PRESEND_MINPOLL 100
   68 #define SRC_DEFAULT_MAXDELAY 3.0
   69 #define SRC_DEFAULT_MAXDELAYRATIO 0.0
   70 #define SRC_DEFAULT_MAXDELAYDEVRATIO 10.0
   71 #define SRC_DEFAULT_MINSTRATUM 0
   72 #define SRC_DEFAULT_POLLTARGET 8
   73 #define SRC_DEFAULT_MAXSOURCES 4
   74 #define SRC_DEFAULT_MINSAMPLES (-1)
   75 #define SRC_DEFAULT_MAXSAMPLES (-1)
   76 #define SRC_DEFAULT_ASYMMETRY 1.0
   77 #define INACTIVE_AUTHKEY 0
   78 
   79 /* Flags for source selection */
   80 #define SRC_SELECT_NOSELECT 0x1
   81 #define SRC_SELECT_PREFER 0x2
   82 #define SRC_SELECT_TRUST 0x4
   83 #define SRC_SELECT_REQUIRE 0x8
   84 
   85 #endif /* GOT_SRCPARAMS_H */