1 /* $NetBSD: main.h,v 1.1.1.1 2012/01/31 21:27:42 kardel Exp $ */ 2 3 #ifndef MAIN_H 4 #define MAIN_H 5 6 #include <l_stdlib.h> 7 #include <ntp_fp.h> 8 #include <ntp.h> 9 #include <ntp_stdlib.h> 10 #include <ntp_unixtime.h> 11 #include <isc/result.h> 12 #include <isc/net.h> 13 #include <stdio.h> 14 15 #include <sntp-opts.h> 16 17 #include "crypto.h" 18 19 void set_li_vn_mode (struct pkt *spkt, char leap, char version, char mode); 20 int sntp_main (int argc, char **argv); 21 int generate_pkt (struct pkt *x_pkt, const struct timeval *tv_xmt, 22 int key_id, struct key *pkt_key); 23 int handle_pkt (int rpktl, struct pkt *rpkt, struct addrinfo *host); 24 void offset_calculation (struct pkt *rpkt, int rpktl, struct timeval *tv_dst, 25 double *offset, double *precision, 26 double *root_dispersion); 27 int on_wire (struct addrinfo *host, struct addrinfo *bcastaddr); 28 int set_time (double offset); 29 30 #endif /* MAIN_H */ 31