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