Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
openapi_sntp.h File Reference
#include "openapi_common.h"

Go to the source code of this file.

Macros

#define OPEN_SECS_PER_MIN   60
 
#define OPEN_SNTP_BUFFER_SIZE   256
 
#define OPEN_SNTP_DATE_STRING_SIZE   21
 

Enumerations

enum  OPEN_SNTP_ADDRESS_TYPE_t { OPEN_SNTP_ADDRESS_UNKNOWN = 0, OPEN_SNTP_ADDRESS_IPV4 = 1, OPEN_SNTP_ADDRESS_IPV6 = 2, OPEN_SNTP_ADDRESS_DNS = 3 }
 OpEN uses this enumeration to define SNTP address types. More...
 
enum  OPEN_SNTP_CLIENT_MODE_t { OPEN_SNTP_CLIENT_DISABLED = 0, OPEN_SNTP_CLIENT_UNICAST = 1, OPEN_SNTP_CLIENT_BROADCAST = 2 }
 OpEN uses this enumeration to define SNTP client modes. More...
 
enum  OPEN_SNTP_PACKET_STATUS_t {
  OPEN_SNTP_STATUS_OTHER = 1, OPEN_SNTP_STATUS_SUCCESS = 2, OPEN_SNTP_STATUS_REQUEST_TIMED_OUT = 3, OPEN_SNTP_STATUS_BAD_DATE_ENCODED = 4,
  OPEN_SNTP_STATUS_VERSION_NOT_SUPPORTED = 5, OPEN_SNTP_STATUS_SERVER_UNSYNCHRONIZED = 6, OPEN_SNTP_STATUS_KISS_OF_DEATH = 7, OPEN_SNTP_STATUS_KOD_RATE_EXCEEDED = 8
}
 
enum  OPEN_SNTP_SERVER_MODE_t {
  OPEN_SNTP_SERVER_MODE_RESERVED = 0, OPEN_SNTP_SERVER_MODE_SYMMETRIC_ACTIVE = 1, OPEN_SNTP_SERVER_MODE_SYMMETRIC_PASSIVE = 2, OPEN_SNTP_SERVER_MODE_CLIENT = 3,
  OPEN_SNTP_SERVER_MODE_SERVER = 4, OPEN_SNTP_SERVER_MODE_BROADCAST = 5, OPEN_SNTP_SERVER_MODE_RESERVED_CONTROL = 6, OPEN_SNTP_SERVER_MODE_RESERVED_PRIVATE = 7
}
 OpEN uses this enumeration to define SNTP server modes. More...
 
enum  OPEN_SNTP_SUPPORTED_MODE_t { OPEN_SNTP_SUPPORTED_DISABLED = 0, OPEN_SNTP_SUPPORTED_UNICAST = 1, OPEN_SNTP_SUPPORTED_BROADCAST = 2, OPEN_SNTP_SUPPORTED_UNICAST_AND_BROADCAST = 3 }
 OpEN uses this enumeration to define SNTP supported client modes. More...
 

Functions

open_error_t openapiActiveSntpServerAddressTypeGet (openapiClientHandle_t *client_handle, OPEN_SNTP_ADDRESS_TYPE_t *type)
 Get the active SNTP server address type from which last packet is received. More...
 
open_error_t openapiActiveSntpServerIpAddressGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer)
 Get the active SNTP server from which last packet is received. More...
 
open_error_t openapiActiveSntpServerModeGet (openapiClientHandle_t *client_handle, OPEN_SNTP_SERVER_MODE_t *serverMode)
 Get the mode of the SNTP server from which last packet is received. More...
 
open_error_t openapiActiveSntpServerReferenceIdGet (openapiClientHandle_t *client_handle, open_buffdesc *reference)
 Get the SNTP server reference identifier from which last packet is received. More...
 
open_error_t openapiActiveSntpServerStratumGet (openapiClientHandle_t *client_handle, uint32_t *stratum)
 Get the stratum of the SNTP server from which last packet is received. More...
 
open_error_t openapiSntpClientModeGet (openapiClientHandle_t *client_handle, OPEN_SNTP_CLIENT_MODE_t *sntpClientMode)
 Get the SNTP client mode. More...
 
open_error_t openapiSntpClientModeSet (openapiClientHandle_t *client_handle, OPEN_SNTP_CLIENT_MODE_t mode)
 Set the SNTP client mode. More...
 
open_error_t openapiSntpClientSupportedModeGet (openapiClientHandle_t *client_handle, OPEN_SNTP_SUPPORTED_MODE_t *sntpClientSupportedMode)
 Get the SNTP client supported mode. More...
 
open_error_t openapiSntpServerAdd (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
 Add an SNTP server. More...
 
open_error_t openapiSntpServerAddressTypeGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, OPEN_SNTP_ADDRESS_TYPE_t *sntpServerAddrType)
 Get the SNTP server address type. More...
 
open_error_t openapiSntpServerCurrentEntriesGet (openapiClientHandle_t *client_handle, uint32_t *currEntries)
 Get number of SNTP servers configured. More...
 
open_error_t openapiSntpServerDelete (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
 Delete an SNTP server. More...
 
open_error_t openapiSntpServerFirstGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer)
 Get the first SNTP server. More...
 
open_error_t openapiSntpServerLastAttemptStatus (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, OPEN_SNTP_PACKET_STATUS_t *sntpLastAttemptStatus)
 Get the SNTP server last attempt status. More...
 
open_error_t openapiSntpServerLastAttemptTime (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *sntpLastAttemptTime)
 Get the SNTP server last attempt time. More...
 
open_error_t openapiSntpServerLastUpdatedTime (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *sntpLastUpdatedTime)
 Get the SNTP server last updated time. More...
 
open_error_t openapiSntpServerMaxAddrLenGet (openapiClientHandle_t *client_handle, uint32_t *sntpServerAddrLen)
 Get the maximum length of SNTP server address. More...
 
open_error_t openapiSntpServerNextGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, open_buffdesc *nextSntpServer)
 Get the next SNTP server. More...
 
open_error_t openapiSntpServerNumFailedRequests (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint32_t *numFailedRequests)
 Get the SNTP server number of failed requests. More...
 
open_error_t openapiSntpServerNumRequests (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint32_t *numRequests)
 Get the SNTP server number of requests. More...
 
open_error_t openapiSntpServerPortGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverPort)
 Get the SNTP server port. More...
 
open_error_t openapiSntpServerPortSet (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t port)
 Set SNTP server port. More...
 
open_error_t openapiSntpServerPriorityGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverPriority)
 Get the SNTP server priority. More...
 
open_error_t openapiSntpServerPriorityMaxGet (openapiClientHandle_t *client_handle, uint32_t *priorityMax)
 Get the maximum SNTP priority. More...
 
open_error_t openapiSntpServerPrioritySet (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t priority)
 Set priority to the SNTP server. More...
 
open_error_t openapiSntpServerReferenceStringLengthGet (openapiClientHandle_t *client_handle, uint32_t *refStrLen)
 Get the maximum length of the SNTP reference ID string. More...
 
open_error_t openapiSntpServersMaxSupportedGet (openapiClientHandle_t *client_handle, uint32_t *maxSntpServers)
 Get the maximum number of SNTP servers supported. More...
 
open_error_t openapiSntpServerVersionGet (openapiClientHandle_t *client_handle, open_buffdesc *sntpServer, uint16_t *serverVersion)
 Get the SNTP server version. More...
 
open_error_t openapiSntpServerVersionSet (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr, uint16_t version)
 Set SNTP server version. More...