Clock synchronization over the Internet
[Applications]


Detailed Description

A simple TIME protocol client for synchronizing date and time from remote hosts.

This client implements the TCP version of the protocol of RFC 868.

Note:
In the official firmware my own server is contacted. This is for illustration purposes only. The service is not guaranteed and should not be used more often than every ten minutes!


Files

file  clock_sync.c
 TIME client implementation (license: GPLv2).
file  clock_sync.h
 TIME client header (license: GPLv2).

Modules

 Clock synchronization configuration

Typedefs

typedef void(* clock_sync_callback )(enum clock_sync_event evt)
 The type of callback function used for issuing events.

Enumerations

enum  clock_sync_event { CLOCK_SYNC_EVT_ERROR, CLOCK_SYNC_EVT_TIMEOUT, CLOCK_SYNC_EVT_SUCCESS }
 The events generated by the clock synchronization. More...

Functions

bool clock_sync_start (clock_sync_callback callback)
 Starts the clock synchronization.
void clock_sync_abort ()
 Aborts clock synchronization.


Enumeration Type Documentation

The events generated by the clock synchronization.

Enumerator:
CLOCK_SYNC_EVT_ERROR  An error occured during synchronization.

CLOCK_SYNC_EVT_TIMEOUT  A network timeout occured.

CLOCK_SYNC_EVT_SUCCESS  The clock was successfully adjusted.


Function Documentation

bool clock_sync_start ( clock_sync_callback  callback  ) 

Starts the clock synchronization.

Parameters:
[in] callback The callback function called for generated events. May be null.
Returns:
true if clock synchronization was started successfully, false on failure.


Generated on Thu May 22 18:12:37 2008 for mega-eth by  doxygen 1.5.5