1 /* $NetBSD: utilities.h,v 1.6 2024/08/18 20:47:20 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 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(const struct addrinfo *addr); 24 char *ss_to_str(sockaddr_u *saddr); 25 char *tv_to_str(const struct timeval *tv); 26 const char * hostnameaddr(const char *, const sockaddr_u *); 27 28 #endif /* UTILITIES_H */ 29