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