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