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