~ubuntu-branches/ubuntu/natty/ntp/natty

« back to all changes in this revision

Viewing changes to ntpdate/ntpdate.h

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-11-30 11:14:31 UTC
  • mfrom: (4.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20101130111431-7r00o0ck9qzwmm9f
Tags: 1:4.2.6.p2+dfsg-1ubuntu1
* Merge from debian unstable, remaining changes are:
  + debian/ntp.conf, debian/ntpdate.default: Change default server to
    ntp.ubuntu.com.
  + debian/ntpdate.ifup: Stop ntp before running ntpdate when an interface
    comes up, then start again afterwards.
  + debian/ntp.init, debian/rules: Only stop when entering single user mode.
  + Add enforcing AppArmor profile (LP: #382905):
    - debian/control: add Conflicts/Replaces on apparmor-profiles <
      2.3.1+1403-0ubuntu10 (since we are now shipping usr.sbin.ntpd) and
      apparmor < 2.3.1+1403-0ubuntu10 (since we are now shipping tunables/ntpd)
    - debian/control: add Suggests on apparmor
    - debian/ntp.dirs: add apparmor directories
    - debian/ntp.preinst: force complain on certain upgrades
    - debian/ntp.postinst: reload apparmor profile
    - debian/ntp.postrm: remove the force-complain file
    - add debian/apparmor-profile*
    - debian/rules: install apparmor-profile and apparmor-profile.tunable
    - debian/README.Debian: add note on AppArmor
  + debian/{control,rules}: add and enable hardened build for PIE
    (Debian bug 542721).
  + debian/apparmor-profile: adjust location of drift files (LP: #456308)
  + debian/rules, debian/ntp.dirs, debian/source_ntp.py: Add apport hook.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
#include "ntp_malloc.h"
6
6
 
7
 
extern void     loadservers     P((char *cfgpath));
 
7
extern void     loadservers     (char *cfgpath);
8
8
 
9
9
/*
10
10
 * The server structure is a much simplified version of the
15
15
 */
16
16
struct server {
17
17
        struct server *next_server;     /* next server in build list */
18
 
        struct sockaddr_storage srcadr; /* address of remote host */
 
18
        sockaddr_u srcadr;              /* address of remote host */
19
19
        u_char version;                 /* version to use */
20
20
        u_char leap;                    /* leap indicator */
21
21
        u_char stratum;                 /* stratum of remote server */
22
22
        s_char precision;               /* server's clock precision */
23
23
        u_char trust;                   /* trustability of the filtered data */
24
24
        u_fp rootdelay;                 /* distance from primary clock */
25
 
        u_fp rootdispersion;            /* peer clock dispersion */
 
25
        u_fp rootdisp;                  /* peer clock dispersion */
26
26
        u_int32 refid;                  /* peer reference ID */
27
27
        l_fp reftime;                   /* time of peer's last update */
28
28
        u_long event_time;              /* time for next timeout */
91
91
/*
92
92
 * Some defaults
93
93
 */
94
 
#define DEFTIMEOUT      5               /* 5 timer increments */
 
94
#define MINTIMEOUT      (2 * TIMER_HZ)  /* 2s min. between packets */
 
95
#define DEFTIMEOUT      MINTIMEOUT      /*   (to the same server) */
95
96
#define DEFSAMPLES      4               /* get 4 samples per server */
96
97
#define DEFPRECISION    (-5)            /* the precision we claim */
97
98
#define DEFMAXPERIOD    60              /* maximum time to wait */