|
Data Structures |
struct | ntp_msg |
| An NTP message, as described in RFC2030 (trailing auth-data ignored). More...
|
Defines |
#define | OFFSET_1900 2208988800U /**< secs between 1900 and the Epoch */ |
| secs between 1900 and the Epoch
|
#define | NTP_FP_SCALE 4294967296.0 /**< NTP fixed-point scaling base */ |
| NTP fixed-point scaling base.
|
#define | NTP_WAIT_MS (5*1000) /**< Wait at most 5 secs for reply */ |
| Wait at most 5 secs for reply.
|
#define | NTP_VERSION 3 /**< Say we're version 3 */ |
| Say we're version 3.
|
#define | NTP_CLIENT 3 /**< Mode for unicast request */ |
| Mode for unicast request.
|
#define | NTP_SERVER 4 /**< Mode for server reply */ |
| Mode for server reply.
|
#define | NTP_AUTHSIZE 20 /**< Size of NTP auth, when present */ |
| Size of NTP auth, when present.
|
#define | NTP_MINSIZE sizeof(struct ntp_msg) |
#define | NTP_MAXSIZE (NTP_MINSIZE + NTP_AUTHSIZE) |
Functions |
| RCSID ("$Id:ntp.c, v 1.16 2005/11/04 20:52:43 cbiere Exp $") |
void | ntp_tm_serialize (guchar dest[8], tm_t *t) |
| Fill 8-byte buffer with NTP's representation of a tm_t time.
|
void | ntp_tm_deserialize (guchar src[8], tm_t *dest) |
| Construct a tm_t time from an NTP timestamp.
|
void | ntp_no_reply (cqueue_t *unused_cq, gpointer unused_udata) |
| Callout queue timeout when no reply is received within a reasonable timeframe.
|
gboolean | ntp_send_probe (const host_addr_t addr) |
gboolean | ntp_send_probes (void) |
void | ntp_probe (void) |
| Send an NTP probe to the local host using the loopback addresses 127.0.0.1 and ::1, waiting for a reply within the next NTP_WAIT_MS ms.
|
void | ntp_got_reply (struct gnutella_socket *s) |
| Got a reply from an NTP daemon.
|
void | ntp_init (void) |
| Initialize the NTP monitoring.
|
void | ntp_close (void) |
| Shutdown the NTP monitoring.
|
Variables |
gpointer | wait_ev = NULL |
| Callout queue waiting event.
|
ntp_msg | __packed__ |
| An NTP message, as described in RFC2030 (trailing auth-data ignored).
|