Main Page   Modules   Related Pages  

NTP
[NET]


Detailed Description

Implementation of the SNTP protocol (RFC 2030).

Define NTP_DEBUG if you would like to turn on NTP debug statements on.

Example

   ntp_init( -5 ); // Set GMT offset to USA eastern standard time.
   ntp_send( resolve(NTP_SERVER) );

Change Log


Compounds

struct  ntp_packet

Typedefs

typedef int(* fnNTPCallback )()
 Callback function used to notify calling program when an NTP response has been recieved.


Functions

void ntp_init (int iTimeZoneOffset)
 Initializes the NTP protocol.

void ntp_initWithCallback (int iTimeZoneOffset, fnNTPCallback fnCallback)
 Initializes the NTP protocol.

void ntp_send (longword lwAddress)
 Sends an NTP request packet.


Typedef Documentation

typedef int(* fnNTPCallback)( )
 

Callback function used to notify calling program when an NTP response has been recieved.

Parameters:
ulTime - Time recieved from the NTP server.
Returns:
The caller can return 1, if it would like to continue setting the time. 0, if it would like to cancel setting the time.


Function Documentation

_ntp_nodebug void ntp_init int  iTimeZoneOffset  ) 
 

Initializes the NTP protocol.

Parameters:
iTimeZoneOffset - Number of hours off of GMT.

_ntp_nodebug void ntp_initWithCallback int  iTimeZoneOffset,
fnNTPCallback  fnCallback
 

Initializes the NTP protocol.

Parameters:
iTimeZoneOffset - Number of hours off of GMT.
fnCallback - Function to call after the packet has been recieved.
See also:
ntp_init

_ntp_nodebug void ntp_send longword  lwAddress  ) 
 

Sends an NTP request packet.

This function is non-blocking and will automatically set the time when the return packet is recieved.

Parameters:
lwAddress - The address of the NTP server (See the rabbit documentation for 'resolve').
See also:
ntp_callback


Generated on Sun May 16 16:37:11 2004 for rabbitlib by doxygen1.3