Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.10.0.3
Macros | Enumerations | Functions
NTP Configuration And Status [OPENAPI_NTP]
API Definitions

Macros

#define OPEN_NTP_BUFFER_SIZE   256
 
#define OPEN_NTP_DATE_STRING_SIZE   21
 
#define OPEN_NTP_MAX_KEY_LENGTH   129
 
#define OPEN_NTP_MAX_KEY_NUM   65535
 
#define OPEN_NTP_MAX_SERVERS   8
 
#define OPEN_NTP_MIN_KEY_LENGTH   1
 
#define OPEN_NTP_MIN_KEY_NUM   1
 
#define OPEN_SECS_PER_MIN   60
 
#define OPEN_VRF_MAX_NAME   15
 

Enumerations

enum  OPEN_NTP_ADDRESS_TYPE_t { OPEN_NTP_ADDRESS_UNKNOWN = 0, OPEN_NTP_ADDRESS_IPV4 = 1, OPEN_NTP_ADDRESS_IPV6 = 2, OPEN_NTP_ADDRESS_DNS = 3 }
 OpEN uses this enumeration to define NTP address types. More...
 
enum  OPEN_NTP_MODE_t { OPEN_NTP_DISABLED = 0, OPEN_NTP_UNICAST = 1, OPEN_NTP_BROADCAST = 2 }
 OpEN uses this enumeration to define NTP client modes. More...
 
enum  OPEN_NTP_MSG_AUTH_ALG_t { OPEN_NTP_MSG_AUTH_ALG_NONE = 0, OPEN_NTP_MSG_AUTH_ALG_MD5, OPEN_NTP_MSG_AUTH_ALG_SHA1, OPEN_NTP_MSG_AUTH_ALG_SHA256 }
 
enum  OPEN_NTP_PACKET_STATUS_t {
  OPEN_NTP_STATUS_OTHER = 1, OPEN_NTP_STATUS_SUCCESS = 2, OPEN_NTP_STATUS_REQUEST_TIMED_OUT = 3, OPEN_NTP_STATUS_BAD_DATE_ENCODED = 4,
  OPEN_NTP_STATUS_VERSION_NOT_SUPPORTED = 5, OPEN_NTP_STATUS_SERVER_UNSYNCHRONIZED = 6, OPEN_NTP_STATUS_KISS_OF_DEATH = 7, OPEN_NTP_STATUS_KOD_RATE_EXCEEDED = 8
}
 
enum  OPEN_NTP_SERVER_MODE_t {
  OPEN_NTP_SERVER_MODE_RESERVED = 0, OPEN_NTP_SERVER_MODE_SYMMETRIC_ACTIVE = 1, OPEN_NTP_SERVER_MODE_SYMMETRIC_PASSIVE = 2, OPEN_NTP_SERVER_MODE_CLIENT = 3,
  OPEN_NTP_SERVER_MODE_SERVER = 4, OPEN_NTP_SERVER_MODE_BROADCAST = 5, OPEN_NTP_SERVER_MODE_RESERVED_CONTROL = 6, OPEN_NTP_SERVER_MODE_RESERVED_PRIVATE = 7
}
 OpEN uses this enumeration to define NTP server modes. More...
 
enum  OPEN_NTP_SUPPORTED_MODE_t { OPEN_NTP_SUPPORTED_DISABLED = 0, OPEN_NTP_SUPPORTED_UNICAST = 1, OPEN_NTP_SUPPORTED_BROADCAST = 2, OPEN_NTP_SUPPORTED_UNICAST_AND_BROADCAST = 3 }
 OpEN uses this enumeration to define NTP supported client modes. More...
 

Functions

open_error_t openapiActiveNtpServerAddressTypeGet (openapiClientHandle_t *client_handle, OPEN_NTP_ADDRESS_TYPE_t *type)
 Get the active NTP server address type from which last packet is received.
 
open_error_t openapiActiveNtpServerIpAddressGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer)
 Get the active NTP server from which last packet is received.
 
open_error_t openapiActiveNtpServerModeGet (openapiClientHandle_t *client_handle, OPEN_NTP_SERVER_MODE_t *serverMode)
 Get the mode of the NTP server from which last packet is received.
 
open_error_t openapiActiveNtpServerReferenceIdGet (openapiClientHandle_t *client_handle, open_buffdesc *reference)
 Get the NTP server reference identifier from which last packet is received.
 
open_error_t openapiActiveNtpServerStratumGet (openapiClientHandle_t *client_handle, uint32_t *stratum)
 Get the stratum of the NTP server from which last packet is received.
 
open_error_t openapiNtpAuthenticationModeGet (openapiClientHandle_t *client_handle, OPEN_BOOL_t *mode)
 Get the current authentication mode for this application.
 
open_error_t openapiNtpAuthenticationModeSet (openapiClientHandle_t *client_handle, OPEN_BOOL_t mode)
 Set the current authentication mode for this application.
 
open_error_t openapiNtpAuthTableEntryFirstGet (openapiClientHandle_t *client_handle, uint32_t *keyNumber)
 Get the first NTP auth table entry.
 
open_error_t openapiNtpAuthTableEntryGetNext (openapiClientHandle_t *client_handle, uint32_t *keyNum, uint32_t *nextKeyNum)
 Get the next NTP auth table entry.
 
open_error_t openapiNtpAuthTableKeyAdd (openapiClientHandle_t *client_handle, uint32_t keyNumber, open_buffdesc *keyValue, OPEN_BOOL_t isEncrypted, OPEN_NTP_MSG_AUTH_ALG_t msgAuthAlg)
 Add a new authentication table entry specified by key number.
 
open_error_t openapiNtpAuthTableKeyDelete (openapiClientHandle_t *client_handle, uint32_t keyNumber)
 Delete an authentication table entry specified by key number.
 
open_error_t openapiNtpAuthTableKeyMsgAuthAlgGet (openapiClientHandle_t *client_handle, uint32_t keyNumber, OPEN_NTP_MSG_AUTH_ALG_t *msgAlg)
 Get the message authentication algorithm for the specified authentication key table entry index.
 
open_error_t openapiNtpAuthTableKeyMsgAuthAlgSet (openapiClientHandle_t *client_handle, uint32_t keyNumber, OPEN_NTP_MSG_AUTH_ALG_t msgAlg)
 Set the message authentication algorithm for the specified authentication key table entry index.
 
open_error_t openapiNtpAuthTableKeyTrustedGet (openapiClientHandle_t *client_handle, uint32_t keyNumber, OPEN_BOOL_t *trustedStatus)
 Get a key as trusted or untrusted specified by the authenticate table entry index.
 
open_error_t openapiNtpAuthTableKeyTrustedSet (openapiClientHandle_t *client_handle, uint32_t keyNumber, OPEN_BOOL_t trustedStatus)
 Set a key as trusted or untrusted specified by the authenticate table entry index.
 
open_error_t openapiNtpAuthTableKeyValueGet (openapiClientHandle_t *client_handle, uint32_t keyNumber, open_buffdesc *keyValue)
 Get the key number of the authenticate table entry.
 
open_error_t openapiNtpAuthTableKeyValueSet (openapiClientHandle_t *client_handle, uint32_t keyNumber, open_buffdesc *keyValue, OPEN_BOOL_t isEncrypted)
 Set the key value of the authenticate table entry.
 
open_error_t openapiNtpBroadcastDelayGet (openapiClientHandle_t *client_handle, uint32_t *delay)
 Get the Broadcast delay for the NTP application.
 
open_error_t openapiNtpBroadcastDelaySet (openapiClientHandle_t *client_handle, uint32_t delay)
 Set the Broadcast delay for the NTP application.
 
open_error_t openapiNtpModeGet (openapiClientHandle_t *client_handle, OPEN_NTP_MODE_t *ntpMode)
 Get the NTP mode.
 
open_error_t openapiNtpModeSet (openapiClientHandle_t *client_handle, OPEN_NTP_MODE_t mode)
 Set the NTP mode.
 
open_error_t openapiNtpNotifyPeerList (openapiClientHandle_t *client_handle, open_buffdesc *assocList)
 Notify NTP application to update the peer list.
 
open_error_t openapiNtpServerAdd (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
 Add an NTP server.
 
open_error_t openapiNtpServerAddressTypeGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_NTP_ADDRESS_TYPE_t *ntpServerAddrType)
 Get the NTP server address type.
 
open_error_t openapiNtpServerCurrentEntriesGet (openapiClientHandle_t *client_handle, uint32_t *currEntries)
 Get number of NTP servers configured.
 
open_error_t openapiNtpServerDelete (openapiClientHandle_t *client_handle, open_buffdesc *ipAddr)
 Delete an NTP server.
 
open_error_t openapiNtpServerFirstGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer)
 Get the first NTP server.
 
open_error_t openapiNtpServerMaxAddrLenGet (openapiClientHandle_t *client_handle, uint32_t *ntpServerAddrLen)
 Get the maximum length of NTP server address.
 
open_error_t openapiNtpServerNextGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, open_buffdesc *nextNtpServer)
 Get the next NTP server.
 
open_error_t openapiNtpServerReferenceStringLengthGet (openapiClientHandle_t *client_handle, uint32_t *refStrLen)
 Get the maximum length of the NTP reference ID string.
 
open_error_t openapiNtpServersMaxSupportedGet (openapiClientHandle_t *client_handle, uint32_t *maxNtpServers)
 Get the maximum number of NTP servers supported.
 
open_error_t openapiNtpServerTableAuthKeyGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint32_t *keyIndex)
 Get the authentication key for an NTP server table entry.
 
open_error_t openapiNtpServerTableAuthKeySet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint32_t keyIndex)
 Set the authentication key for the specified NTP server table entry.
 
open_error_t openapiNtpServerTableBurstGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t *burst)
 Get the NTP burst status of the server table entry.
 
open_error_t openapiNtpServerTableBurstSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t burst)
 Set the NTP burst status of the server table entry.
 
open_error_t openapiNtpServerTableIBurstGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t *iburst)
 Get the NTP iburst status of the server table entry.
 
open_error_t openapiNtpServerTableIBurstSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t iburst)
 Set the NTP iburst status of the server table entry.
 
open_error_t openapiNtpServerTableMaxPollGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t *interval)
 Get the server maximum poll interval in seconds as a power of two.
 
open_error_t openapiNtpServerTableMaxPollSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t interval)
 Set the server maximum poll interval in seconds as a power of two.
 
open_error_t openapiNtpServerTableMinPollGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t *interval)
 Get the server minimum poll interval in seconds as a power of two.
 
open_error_t openapiNtpServerTableMinPollSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t interval)
 Set the server minimum poll interval in seconds as a power of two.
 
open_error_t openapiNtpServerTablePreferGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t *prefer)
 Get the NTP prefer status of the server table entry.
 
open_error_t openapiNtpServerTablePreferSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, OPEN_BOOL_t prefer)
 Set the NTP prefer status of the server table entry.
 
open_error_t openapiNtpServerTableVersionGet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t *version)
 Get the NTP version of the server table entry.
 
open_error_t openapiNtpServerTableVersionSet (openapiClientHandle_t *client_handle, open_buffdesc *ntpServer, uint16_t version)
 Set the NTP version of the server table entry.
 
open_error_t openapiNtpSourceInterfaceGet (openapiClientHandle_t *client_handle, uint32_t *intIfNum)
 Get the Source Interface of the NTP application.
 
open_error_t openapiNtpSourceInterfaceSet (openapiClientHandle_t *client_handle, uint32_t intIfNum)
 Set the Source Interface of the NTP application.
 
open_error_t openapiNtpSupportedModeGet (openapiClientHandle_t *client_handle, OPEN_NTP_SUPPORTED_MODE_t *ntpSupportedMode)
 Get the NTP supported mode.
 
open_error_t openapiNtpTimeSet (openapiClientHandle_t *client_handle, uint32_t offset)
 Update the local clock with the correction.
 
open_error_t openapiNtpVrfNameGet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
 Get the VRF name of the NTP server.
 
open_error_t openapiNtpVrfNameSet (openapiClientHandle_t *client_handle, open_buffdesc *vrfName)
 Set the VRF name of the NTP server.
 

Detailed Description

Enumeration Type Documentation

OpEN uses this enumeration to define NTP address types.

Enumerator:
OPEN_NTP_ADDRESS_UNKNOWN 

Address type unknown.

OPEN_NTP_ADDRESS_IPV4 

Address type IPv4.

OPEN_NTP_ADDRESS_IPV6 

Address type IPv6.

OPEN_NTP_ADDRESS_DNS 

Address type DNS.

Definition at line 73 of file openapi_ntp.h.

OpEN uses this enumeration to define NTP client modes.

Enumerator:
OPEN_NTP_DISABLED 

NTP client mode disabled.

OPEN_NTP_UNICAST 

NTP client unicast mode.

OPEN_NTP_BROADCAST 

NTP client broadcast mode.

Definition at line 55 of file openapi_ntp.h.

Enumerator:
OPEN_NTP_STATUS_OTHER 

Other.

OPEN_NTP_STATUS_SUCCESS 

Success.

OPEN_NTP_STATUS_REQUEST_TIMED_OUT 

Request Timed Out.

OPEN_NTP_STATUS_BAD_DATE_ENCODED 

Bad Date Encoded.

OPEN_NTP_STATUS_VERSION_NOT_SUPPORTED 

Version Not Supported.

OPEN_NTP_STATUS_SERVER_UNSYNCHRONIZED 

Server Unsynchronized.

OPEN_NTP_STATUS_KISS_OF_DEATH 

Server Kiss Of Death.

OPEN_NTP_STATUS_KOD_RATE_EXCEEDED 

Kiss of Death as Rate Exceeded.

Definition at line 94 of file openapi_ntp.h.

OpEN uses this enumeration to define NTP server modes.

Enumerator:
OPEN_NTP_SERVER_MODE_RESERVED 

Reserved Mode.

OPEN_NTP_SERVER_MODE_SYMMETRIC_ACTIVE 

Symmetric Active Mode.

OPEN_NTP_SERVER_MODE_SYMMETRIC_PASSIVE 

Symmetric Passive Mode.

OPEN_NTP_SERVER_MODE_CLIENT 

Client Mode.

OPEN_NTP_SERVER_MODE_SERVER 

Server Mode.

OPEN_NTP_SERVER_MODE_BROADCAST 

Broadcast Mode.

OPEN_NTP_SERVER_MODE_RESERVED_CONTROL 

Reserved Control Mode.

OPEN_NTP_SERVER_MODE_RESERVED_PRIVATE 

Reserved Private Mode.

Definition at line 82 of file openapi_ntp.h.

OpEN uses this enumeration to define NTP supported client modes.

Enumerator:
OPEN_NTP_SUPPORTED_DISABLED 

NTP client mode disabled.

OPEN_NTP_SUPPORTED_UNICAST 

NTP client unicast mode.

OPEN_NTP_SUPPORTED_BROADCAST 

NTP client broadcast mode.

OPEN_NTP_SUPPORTED_UNICAST_AND_BROADCAST 

NTP client unicast and broadcast modes.

Definition at line 64 of file openapi_ntp.h.

Function Documentation

open_error_t openapiActiveNtpServerAddressTypeGet ( openapiClientHandle_t client_handle,
OPEN_NTP_ADDRESS_TYPE_t type 
)

Get the active NTP server address type from which last packet is received.

Parameters
[in]client_handleClient handle from registration API
[out]typeNTP server address type
Return values
OPEN_E_NONEif active NTP server address type is returned.
OPEN_E_FAILif failed to get active NTP server type.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiActiveNtpServerIpAddressGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer 
)

Get the active NTP server from which last packet is received.

Parameters
[in]client_handleClient handle from registration API
[out]ntpServerActive NTP server
Return values
OPEN_E_NONEif active NTP server address is returned.
OPEN_E_FAILif there are no active NTP servers .
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_INTERNALif internal error.
Note
Maximum size for ipAddr is determined by calling openapiNtpServerMaxAddrLenGet().

OpEN API Version: 1.23

open_error_t openapiActiveNtpServerModeGet ( openapiClientHandle_t client_handle,
OPEN_NTP_SERVER_MODE_t serverMode 
)

Get the mode of the NTP server from which last packet is received.

Parameters
[in]client_handleClient handle from registration API
[out]serverModeNTP server mode
Return values
OPEN_E_NONEif NTP server mode is returned.
OPEN_E_FAILif failed to get NTP server mode.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiActiveNtpServerReferenceIdGet ( openapiClientHandle_t client_handle,
open_buffdesc reference 
)

Get the NTP server reference identifier from which last packet is received.

Parameters
[in]client_handleClient handle from registration API
[out]referenceReference Identifier of NTP server
Return values
OPEN_E_NONEif reference of the NTP server is returned.
OPEN_E_FAILif failed to get reference of NTP server.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiActiveNtpServerStratumGet ( openapiClientHandle_t client_handle,
uint32_t *  stratum 
)

Get the stratum of the NTP server from which last packet is received.

Parameters
[in]client_handleClient handle from registration API
[out]stratumStratum of the NTP server
Return values
OPEN_E_NONEif stratum of the NTP server is returned.
OPEN_E_FAILif failed to get stratum of NTP server.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpAuthenticationModeGet ( openapiClientHandle_t client_handle,
OPEN_BOOL_t mode 
)

Get the current authentication mode for this application.

Parameters
[in]client_handleClient handle from registration API
[out]modeOPEN_TRUE to enable, OPEN_FALSE to disable
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthenticationModeSet ( openapiClientHandle_t client_handle,
OPEN_BOOL_t  mode 
)

Set the current authentication mode for this application.

Parameters
[in]client_handleClient handle from registration API
[in]modeOPEN_TRUE to enable, OPEN_FALSE to disable
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_INTERNALif internal error.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableEntryFirstGet ( openapiClientHandle_t client_handle,
uint32_t *  keyNumber 
)

Get the first NTP auth table entry.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
Return values
OPEN_E_NONEif first key entry is returned.
OPEN_E_FAILif key does not exist.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableEntryGetNext ( openapiClientHandle_t client_handle,
uint32_t *  keyNum,
uint32_t *  nextKeyNum 
)

Get the next NTP auth table entry.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumkey number
[out]nextKeyNumNext key number
Return values
OPEN_E_NONEif next NTP key num is returned.
OPEN_E_NOT_FOUNDif next NTP key num does not exist.
OPEN_E_FAILif previous NTP key num is invalid.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyAdd ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
open_buffdesc keyValue,
OPEN_BOOL_t  isEncrypted,
OPEN_NTP_MSG_AUTH_ALG_t  msgAuthAlg 
)

Add a new authentication table entry specified by key number.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[in]keyValueASCII key string OPEN_NTP_MIN_KEY_LENGTH- OPEN__NTP_MAX_KEY_LENGTH
[in]isEncryptedwhether the key is encrypted or not
[in]msgAuthAlgMessage authentication algorithm
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_EXISTSif the key is already configured.
OPEN_E_FULLif no more space is available to add the keys.
OPEN_E_INTERNALif internal error.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyDelete ( openapiClientHandle_t client_handle,
uint32_t  keyNumber 
)

Delete an authentication table entry specified by key number.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_INTERNALif internal error.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyMsgAuthAlgGet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
OPEN_NTP_MSG_AUTH_ALG_t *  msgAlg 
)

Get the message authentication algorithm for the specified authentication key table entry index.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[out]msgAuthAlgmessage authentication algorithm
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyMsgAuthAlgSet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
OPEN_NTP_MSG_AUTH_ALG_t  msgAlg 
)

Set the message authentication algorithm for the specified authentication key table entry index.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[in]msgAuthAlgmessage authentication algorithm
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyTrustedGet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
OPEN_BOOL_t trustedStatus 
)

Get a key as trusted or untrusted specified by the authenticate table entry index.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[out]trustedOPEN_TRUE or OPEN_FALSE
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyTrustedSet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
OPEN_BOOL_t  trustedStatus 
)

Set a key as trusted or untrusted specified by the authenticate table entry index.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[in]trustedStatusOPEN_TRUE or OPEN_FALSE
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyValueGet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
open_buffdesc keyValue 
)

Get the key number of the authenticate table entry.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[out]keyValueASCII key string OPEN_NTP_MIN_KEY_LENGTH- OPEN_NTP_MAX_KEY_LENGTH
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpAuthTableKeyValueSet ( openapiClientHandle_t client_handle,
uint32_t  keyNumber,
open_buffdesc keyValue,
OPEN_BOOL_t  isEncrypted 
)

Set the key value of the authenticate table entry.

Parameters
[in]client_handleClient handle from registration API
[in]keyNumberNTP key id, range OPEN_NTP_MIN_KEY_NUM - OPEN_NTP_MAX_KEY_NUM
[in]keyValueASCII key string OPEN_NTP_MIN_KEY_LENGTH- OPEN__NTP_MAX_KEY_LENGTH
[in]isEncryptedwhether the key is encrypted or not
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif key is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpBroadcastDelayGet ( openapiClientHandle_t client_handle,
uint32_t *  delay 
)

Get the Broadcast delay for the NTP application.

Parameters
[in]client_handleClient handle from registration API
[out]delayBroadcast delay in milliseconds
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpBroadcastDelaySet ( openapiClientHandle_t client_handle,
uint32_t  delay 
)

Set the Broadcast delay for the NTP application.

Parameters
[in]client_handleClient handle from registration API
[in]delayBroadcast delay in milliseconds
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpModeGet ( openapiClientHandle_t client_handle,
OPEN_NTP_MODE_t ntpMode 
)

Get the NTP mode.

Parameters
[in]client_handleClient handle from registration API
[out]ntpModeNTP mode
Return values
OPEN_E_NONEif NTP mode is returned.
OPEN_E_FAILif failed to get NTP mode.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpModeSet ( openapiClientHandle_t client_handle,
OPEN_NTP_MODE_t  mode 
)

Set the NTP mode.

Parameters
[in]client_handleClient handle from registration API
[in]modeNTP mode
Return values
OPEN_E_NONEif NTP mode is set successfully.
OPEN_E_FAILif failed to set NTP mode.
OPEN_E_ERRORif invalid NTP mode
OPEN_E_INTERNALif internal error.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
To unconfigure NTP mode, pass the mode as OPEN_NTP_DISABLED.

OpEN API Version: 1.23

open_error_t openapiNtpNotifyPeerList ( openapiClientHandle_t client_handle,
open_buffdesc assocList 
)

Notify NTP application to update the peer list.

Parameters
[in]client_handleClient handle from registration API
[in]assocListassociation ID's List.
Return values
OPEN_E_NONEif assoc list is set successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServerAdd ( openapiClientHandle_t client_handle,
open_buffdesc ipAddr 
)

Add an NTP server.

Parameters
[in]client_handleClient handle from registration API
[in]ipAddrBuff descriptor for IP address of NTP server - DNS, IPV4 and IPv6 addresses
Return values
OPEN_E_NONEif NTP server is added successfully.
OPEN_E_FAILif failed to add NTP server.
OPEN_E_EXISTSif the server is already configured.
OPEN_E_FULLif no more space is available to add the server.
OPEN_E_INTERNALif internal error.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for ipAddr is determined by calling openapiNtpServerMaxAddrLenGet().

OpEN API Version: 1.23

open_error_t openapiNtpServerAddressTypeGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_NTP_ADDRESS_TYPE_t ntpServerAddrType 
)

Get the NTP server address type.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]ntpServerAddrTypeNTP server address type
Return values
OPEN_E_NONEif NTP server address type is returned.
OPEN_E_NOT_FOUNDif NTP server does not exist.
OPEN_E_FAILif failed to get NTP server address type.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServerCurrentEntriesGet ( openapiClientHandle_t client_handle,
uint32_t *  currEntries 
)

Get number of NTP servers configured.

Parameters
[in]client_handleClient handle from registration API
[out]currEntriesNumber of NTP servers configured.
Return values
OPEN_E_NONEif current number of NTP servers is returned.
OPEN_E_FAILif failed to get current number of NTP servers.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServerDelete ( openapiClientHandle_t client_handle,
open_buffdesc ipAddr 
)

Delete an NTP server.

Parameters
[in]client_handleClient handle from registration API
[in]ipAddrBuff Descriptor for IP address of NTP server - DNS, IPV4 and IPv6 addresses
Return values
OPEN_E_NONEif NTP server is deleted successfully.
OPEN_E_FAILif failed to delete NTP server.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for ipAddr is determined by calling openapiNtpServerMaxAddrLenGet().

OpEN API Version: 1.23

open_error_t openapiNtpServerFirstGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer 
)

Get the first NTP server.

Parameters
[in]client_handleClient handle from registration API
[out]ntpServerNTP server
Return values
OPEN_E_NONEif first NTP server is returned.
OPEN_E_FAILif NTP server does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for ipAddr is determined by calling openapiNtpServerMaxAddrLenGet().

OpEN API Version: 1.23

open_error_t openapiNtpServerMaxAddrLenGet ( openapiClientHandle_t client_handle,
uint32_t *  ntpServerAddrLen 
)

Get the maximum length of NTP server address.

Parameters
[in]client_handleClient handle from registration API
[out]ntpServerAddrLenMaximum length of NTP server address
Return values
OPEN_E_NONEif NTP server address length is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServerNextGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
open_buffdesc nextNtpServer 
)

Get the next NTP server.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerPrevious NTP server
[out]nextNtpServerNext NTP server
Return values
OPEN_E_NONEif next NTP server is returned.
OPEN_E_NOT_FOUNDif next NTP server does not exist.
OPEN_E_FAILif previous NTP server is invalid.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for ipAddr is determined by calling openapiNtpServerMaxAddrLenGet().

OpEN API Version: 1.23

open_error_t openapiNtpServerReferenceStringLengthGet ( openapiClientHandle_t client_handle,
uint32_t *  refStrLen 
)

Get the maximum length of the NTP reference ID string.

Parameters
[in]client_handleClient handle from registration API
[out]refStrLenReference ID string length
Return values
OPEN_E_NONEif reference ID string length id returned.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServersMaxSupportedGet ( openapiClientHandle_t client_handle,
uint32_t *  maxNtpServers 
)

Get the maximum number of NTP servers supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxNtpServersMaximum number of NTP servers supported
Return values
OPEN_E_NONEif the maximum number of NTP servers is returned.
OPEN_E_FAILif failed to get maximum number of NTP servers.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpServerTableAuthKeyGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint32_t *  keyIndex 
)

Get the authentication key for an NTP server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]keyIndexindex of authenticate table entry.
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableAuthKeySet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint32_t  keyIndex 
)

Set the authentication key for the specified NTP server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]keyIndexindex of authenticate table entry.
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableBurstGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t burst 
)

Get the NTP burst status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]burstserver burst status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableBurstSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t  burst 
)

Set the NTP burst status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]burstserver burst status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableIBurstGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t iburst 
)

Get the NTP iburst status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]iburstserver iburst status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableIBurstSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t  iburst 
)

Set the NTP iburst status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]iburstserver iburst status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableMaxPollGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t *  interval 
)

Get the server maximum poll interval in seconds as a power of two.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]intervalpower of two of poll interval
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableMaxPollSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t  interval 
)

Set the server maximum poll interval in seconds as a power of two.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]intervalpower of two of poll interval
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableMinPollGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t *  interval 
)

Get the server minimum poll interval in seconds as a power of two.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]intervalpower of two of poll interval
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableMinPollSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t  interval 
)

Set the server minimum poll interval in seconds as a power of two.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]intervalpower of two of poll interval
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTablePreferGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t prefer 
)

Get the NTP prefer status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]preferserver preference status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTablePreferSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
OPEN_BOOL_t  prefer 
)

Set the NTP prefer status of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]preferserver preference status
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableVersionGet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t *  version 
)

Get the NTP version of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[out]versionserver version
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpServerTableVersionSet ( openapiClientHandle_t client_handle,
open_buffdesc ntpServer,
uint16_t  version 
)

Set the NTP version of the server table entry.

Parameters
[in]client_handleClient handle from registration API
[in]ntpServerNTP server
[in]versionserver version
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_NOT_FOUNDif NTP server is not found.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpSourceInterfaceGet ( openapiClientHandle_t client_handle,
uint32_t *  intIfNum 
)

Get the Source Interface of the NTP application.

Parameters
[in]client_handleClient handle from registration API
[out]intIfNumSource Interface number
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpSourceInterfaceSet ( openapiClientHandle_t client_handle,
uint32_t  intIfNum 
)

Set the Source Interface of the NTP application.

Parameters
[in]client_handleClient handle from registration API
[in]intIfNumSource Interface number
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpSupportedModeGet ( openapiClientHandle_t client_handle,
OPEN_NTP_SUPPORTED_MODE_t ntpSupportedMode 
)

Get the NTP supported mode.

Parameters
[in]client_handleClient handle from registration API
[out]ntpSupportedModeNTP supported mode
Return values
OPEN_E_NONEif NTP supported mode is returned.
OPEN_E_FAILif failed to get NTP mode.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpTimeSet ( openapiClientHandle_t client_handle,
uint32_t  offset 
)

Update the local clock with the correction.

Parameters
[in]client_handleClient handle from registration API
[in]offsetthe offset to be applied.
Return values
OPEN_E_NONEif NTP time is set successfully.
OPEN_E_FAILif failed to set NTP time.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.23

open_error_t openapiNtpVrfNameGet ( openapiClientHandle_t client_handle,
open_buffdesc vrfName 
)

Get the VRF name of the NTP server.

Parameters
[in]client_handleClient handle from registration API
[out]vrfNameVRF Name
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23

open_error_t openapiNtpVrfNameSet ( openapiClientHandle_t client_handle,
open_buffdesc vrfName 
)

Set the VRF name of the NTP server.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF Name
Return values
OPEN_E_NONEif success.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FAILotherwise

OpEN API Version: 1.23