summaryrefslogtreecommitdiff
path: root/internal/ntp/types.go
blob: 4e4186e6e383aeb03bb3cc985eda7bebb5ec11a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package ntp

import (
	"github.com/sirupsen/logrus"

	"github.com/authelia/authelia/v4/internal/configuration/schema"
)

// Provider type is the NTP provider.
type Provider struct {
	config *schema.NTP
	log    *logrus.Logger
}

type ntpVersion int

type ntpPacket struct {
	LeapVersionMode       uint8
	Stratum               uint8
	Poll                  int8
	Precision             int8
	RootDelay             uint32
	RootDispersion        uint32
	ReferenceID           uint32
	ReferenceTimeSeconds  uint32
	ReferenceTimeFraction uint32
	OriginTimeSeconds     uint32
	OriginTimeFraction    uint32
	RxTimeSeconds         uint32
	RxTimeFraction        uint32
	TxTimeSeconds         uint32
	TxTimeFraction        uint32
}