ucspi-ssl  0.99e
TLS encryption for IPv6 communication
tai.h
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #ifndef TAI_H
4 #define TAI_H
5 
6 #include "uint64.h"
7 
8 struct tai {
9  uint64 x;
10 } ;
11 
12 #define tai_unix(t,u) ((void) ((t)->x = 4611686018427387914ULL + (uint64) (u)))
13 
14 extern int tai_now(struct tai *);
15 
16 #define tai_approx(t) ((double) ((t)->x))
17 
18 extern void tai_add(struct tai *,const struct tai *,const struct tai *);
19 extern void tai_sub(struct tai *,const struct tai *,const struct tai *);
20 #define tai_less(t,u) ((t)->x < (u)->x)
21 #define tai_equal(t,u) ((t)->x == (u)->x)
22 
23 #define TAI_PACK 8
24 extern void tai_pack(char *,const struct tai *);
25 extern void tai_unpack(const char *,struct tai *);
26 
27 extern void tai_uint(struct tai *,unsigned int);
28 
29 #endif
void tai_pack(char *, const struct tai *)
Definition: tai_pack.c:5
void tai_uint(struct tai *, unsigned int)
void tai_unpack(const char *, struct tai *)
void tai_sub(struct tai *, const struct tai *, const struct tai *)
void tai_add(struct tai *, const struct tai *, const struct tai *)
uint64 x
Definition: tai.h:9
Definition: tai.h:8
int tai_now(struct tai *)