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