MityDSP Documentation Index
Functions
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]apServerThe server IP address (w.x.y.z)
[out]apTimeReturned time (seconds since 1/1/1900)
[in]apTimeOutTicks to wait for SNTP completion
[out]apDataPointer to storage for SNTP response (may be NULL)
Returns:
Zero if successful, -1 otherwise.

  
Generated on Mon Apr 22 2013 11:33:32 for MityDSP Net by  Doxygen Version 1.8.1.1
Copyright © 2009, Critical Link LLC, All rights reserved.