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