MityDSP Documentation Index

e:/hudson/workspace/MityDSP MDK Release/trunk/sw/src/net/clients/sntp.c File Reference

This file contains a very basic SNTP client. More...

#include <std.h>
#include <clk.h>
#include <tsk.h>
#include "lwip/sockets.h"
#include "lwip/netdb.h"
#include "sockets_inline.h"
#include "net/clients/sntp.h"

Functions

int SNTPGetTime (const char *apServer, time_t *apTime, struct timeval *apTimeOut, sntpframe *apData)

Detailed Description

This file contains a very basic SNTP client.

o 0 | / Copyright (c) 2006-2007 (CL)---o Critical Link, LLC \ O


Function Documentation

int SNTPGetTime ( const char *  apServer,
time_t *  apTime,
struct timeval *  apTimeOut,
sntpframe apData 
)

This routine is used to issue a request to a time server. The address of the server is provided (dotted IP notation), as well as storage for the resulting time_t value. A timeout (in OS ticks) is also required. Optional storage may also be provided for the entire response from the time server to be returned to the caller.

Parameters:
[in] apServer The server IP address (w.x.y.z)
[out] apTime Returned time (seconds since 1/1/1900)
[in] apTimeOut Ticks to wait for SNTP completion
[out] apData Pointer to storage for SNTP response (may be NULL)
Returns:
Zero if successful, -1 otherwise.

  
Generated on Fri Sep 23 16:34:01 2011 for MityDSP Net by  Doxygen Version 1.6.1
Copyright © 2009, Critical Link LLC, All rights reserved.