summaryrefslogtreecommitdiff
path: root/src/clock
diff options
context:
space:
mode:
Diffstat (limited to 'src/clock')
-rw-r--r--src/clock/s6-clockadd.c6
-rw-r--r--src/clock/s6-clockview.c4
-rw-r--r--src/clock/s6-sntpclock.c32
-rw-r--r--src/clock/s6-taiclock.c26
-rw-r--r--src/clock/s6-taiclockd.c6
5 files changed, 37 insertions, 37 deletions
diff --git a/src/clock/s6-clockadd.c b/src/clock/s6-clockadd.c
index cd0dcbb..010222f 100644
--- a/src/clock/s6-clockadd.c
+++ b/src/clock/s6-clockadd.c
@@ -11,12 +11,12 @@
int main (int argc, char const *const *argv)
{
- tain_t now, adj ;
+ tain now, adj ;
unsigned int emax = 2000 ;
int flagforce = 0 ;
PROG = "s6-clockadd" ;
{
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "fe:", &l) ;
@@ -39,7 +39,7 @@ int main (int argc, char const *const *argv)
tain_from_millisecs(&now, emax) ;
if (tain_less(&now, &adj))
{
- tain_t tmp = TAIN_ZERO ;
+ tain tmp = TAIN_ZERO ;
tain_sub(&tmp, &tmp, &adj) ;
if (tain_less(&now, &tmp))
{
diff --git a/src/clock/s6-clockview.c b/src/clock/s6-clockview.c
index 3600cce..9b18175 100644
--- a/src/clock/s6-clockview.c
+++ b/src/clock/s6-clockview.c
@@ -9,8 +9,8 @@
int main (void)
{
char buf[TAIN_PACK] ;
- tain_t now, adj ;
- localtmn_t l ;
+ tain now, adj ;
+ localtmn l ;
char fmt[LOCALTMN_FMT] ;
PROG = "s6-clockview" ;
diff --git a/src/clock/s6-sntpclock.c b/src/clock/s6-sntpclock.c
index a171dc4..bc4edfc 100644
--- a/src/clock/s6-sntpclock.c
+++ b/src/clock/s6-sntpclock.c
@@ -23,13 +23,13 @@
static unsigned int verbosity = 1 ;
-int ntp_exchange (int s, ip46_t const *ip, uint16_t port, tain_t *stamps, tain_t const *deadline)
+int ntp_exchange (int s, ip46 const *ip, uint16_t port, tain *stamps, tain const *deadline)
{
char query[48] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ;
char answer[48] = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ;
- tain_t starttime ;
+ tain starttime ;
uint64_t ntpstamp ;
- ip46_t dummyip ;
+ ip46 dummyip ;
uint16_t dummyport ;
ssize_t r ;
tain_copynow(&starttime) ;
@@ -75,17 +75,17 @@ int ntp_exchange (int s, ip46_t const *ip, uint16_t port, tain_t *stamps, tain_t
int main (int argc, char const *const *argv)
{
- tain_t deltamin = TAIN_ZERO ;
- tain_t deltaoffset ;
- tain_t deltamax ;
- tain_t errmax ;
- tain_t timeouttto, throttletto, globaltto ;
- tain_t globaldeadline ;
+ tain deltamin = TAIN_ZERO ;
+ tain deltaoffset ;
+ tain deltamax ;
+ tain errmax ;
+ tain timeouttto, throttletto, globaltto ;
+ tain globaldeadline ;
unsigned int roundtrips = 10 ;
unsigned int i = 0 ;
int sock ;
int flagforce = 0 ;
- ip46_t ipremote ;
+ ip46 ipremote ;
uint16_t portremote = 123 ;
PROG = "s6-sntpclock" ;
@@ -94,7 +94,7 @@ int main (int argc, char const *const *argv)
unsigned int throttle = 0 ;
unsigned int bigtimeout = 10000 ;
unsigned int emax = 100 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "fv:r:t:h:T:e:p:", &l) ;
@@ -135,8 +135,8 @@ int main (int argc, char const *const *argv)
for (; i < roundtrips ; i++)
{
- tain_t stamps[4] ;
- tain_t deadline ;
+ tain stamps[4] ;
+ tain deadline ;
tain_add_g(&deadline, &timeouttto) ;
if (tain_less(&globaldeadline, &deadline)) deadline = globaldeadline ;
if (verbosity >= 3)
@@ -160,14 +160,14 @@ int main (int argc, char const *const *argv)
}
else
{
- tain_t cur, min, max ;
+ tain cur, min, max ;
if (verbosity >= 3)
{
unsigned int j = 0 ;
for (; j < 4 ; j++)
{
uint64_t ntp ;
- localtmn_t l ;
+ localtmn l ;
char fmt[UINT_FMT] ;
char fmtntp[UINT64_XFMT] ;
char fmttaia[TAIN_FMT] ;
@@ -210,7 +210,7 @@ int main (int argc, char const *const *argv)
{
char adj[TAIN_PACK] ;
- tain_t delta ;
+ tain delta ;
if (tain_less(&deltamax, &deltamin)) tain_sub(&delta, &deltamin, &deltamax) ;
else tain_sub(&delta, &deltamax, &deltamin) ;
if (tain_less(&errmax, &delta))
diff --git a/src/clock/s6-taiclock.c b/src/clock/s6-taiclock.c
index f36a047..2bc0470 100644
--- a/src/clock/s6-taiclock.c
+++ b/src/clock/s6-taiclock.c
@@ -25,11 +25,11 @@ static unsigned int verbosity = 1 ;
#define N 28
-int tain_exchange (int s, ip46_t const *ip, uint16_t port, tain_t *serversays, tain_t const *deadline)
+int tain_exchange (int s, ip46 const *ip, uint16_t port, tain *serversays, tain const *deadline)
{
char query[N] = "ctai" ;
char answer[N] ;
- ip46_t dummyip ;
+ ip46 dummyip ;
ssize_t r ;
uint16_t dummyport ;
tain_pack(query+4, &STAMP) ;
@@ -48,15 +48,15 @@ int tain_exchange (int s, ip46_t const *ip, uint16_t port, tain_t *serversays, t
int main (int argc, char const *const *argv)
{
- tain_t deltamin = TAIN_ZERO ;
- tain_t deltaoffset ;
- tain_t deltamax ;
- tain_t errmax ;
- tain_t timeouttto, throttletto, globaltto ;
- tain_t globaldeadline ;
+ tain deltamin = TAIN_ZERO ;
+ tain deltaoffset ;
+ tain deltamax ;
+ tain errmax ;
+ tain timeouttto, throttletto, globaltto ;
+ tain globaldeadline ;
unsigned int roundtrips = 10 ;
unsigned int i = 0 ;
- ip46_t ipremote ;
+ ip46 ipremote ;
int sock ;
int flagforce = 0 ;
uint16_t portremote = 4014 ;
@@ -67,7 +67,7 @@ int main (int argc, char const *const *argv)
unsigned int throttle = 0 ;
unsigned int bigtimeout = 10000 ;
unsigned int emax = 100 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
for (;;)
{
int opt = subgetopt_r(argc, argv, "fv:r:t:h:T:e:p:", &l) ;
@@ -110,7 +110,7 @@ int main (int argc, char const *const *argv)
for (; i < roundtrips ; i++)
{
- tain_t deadline, before, serversays ;
+ tain deadline, before, serversays ;
tain_add_g(&deadline, &timeouttto) ;
if (tain_less(&globaldeadline, &deadline)) deadline = globaldeadline ;
tain_copynow(&before) ;
@@ -127,7 +127,7 @@ int main (int argc, char const *const *argv)
}
else
{
- tain_t cur, min, max ;
+ tain cur, min, max ;
tain_add(&cur, &serversays, &deltaoffset) ;
tain_add(&min, &before, &deltamin) ;
tain_add(&max, &before, &deltamax) ;
@@ -155,7 +155,7 @@ int main (int argc, char const *const *argv)
{
char adj[TAIN_PACK] ;
- tain_t delta ;
+ tain delta ;
if (tain_less(&deltamax, &deltamin)) tain_sub(&delta, &deltamin, &deltamax) ;
else tain_sub(&delta, &deltamax, &deltamin) ;
if (tain_less(&errmax, &delta))
diff --git a/src/clock/s6-taiclockd.c b/src/clock/s6-taiclockd.c
index e76a9c5..7b2a725 100644
--- a/src/clock/s6-taiclockd.c
+++ b/src/clock/s6-taiclockd.c
@@ -16,9 +16,9 @@
int main (int argc, char const *const *argv)
{
int s ;
- ip46_t ip = IP46_ZERO ;
+ ip46 ip = IP46_ZERO ;
uint16_t port = 4014 ;
- subgetopt_t l = SUBGETOPT_ZERO ;
+ subgetopt l = SUBGETOPT_ZERO ;
PROG = "s6-taiclockd" ;
for (;;)
{
@@ -44,7 +44,7 @@ int main (int argc, char const *const *argv)
ssize_t r = socket_recv46(s, packet, 256, &ip, &port) ;
if ((r >= 20) && !memcmp(packet, "ctai", 4))
{
- tain_t now ;
+ tain now ;
packet[0] = 's' ;
if (!tain_wallclock_read(&now)) strerr_diefu1sys(111, "tain_wallclock_read") ;
tain_pack(packet + 4, &now) ;