xref: /freebsd/contrib/ntp/sntp/utilities.h (revision 86c9d9918f1db7cdd968b60f8902466887bcd9e9)
1 #ifndef UTILITIES_H
2 #define UTILITIES_H
3 
4 #include <math.h>
5 #include <stdio.h>
6 #include <stdlib.h>
7 
8 #include "ntp.h"
9 #include "ntp_stdlib.h"
10 #include "lib_strbuf.h"
11 
12 #define HLINE "--------------------------------------------------------------------------------\n"
13 #define PHLINE fprintf(output, HLINE);
14 #define STDLINE printf(HLINE);
15 
16 
17 void pkt_output(struct pkt *dpkg, int pkt_length, FILE *output);
18 void l_fp_output(l_fp *ts, FILE *output);
19 void l_fp_output_bin(l_fp *ts, FILE *output);
20 void l_fp_output_dec(l_fp *ts, FILE *output);
21 
22 char *addrinfo_to_str(const struct addrinfo *addr);
23 char *ss_to_str(sockaddr_u *saddr);
24 char *tv_to_str(const struct timeval *tv);
25 const char * hostnameaddr(const char *, const sockaddr_u *);
26 
27 #endif	/* UTILITIES_H */
28