Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
Network Time Protocol (NTP)

Network Time Protocol (NTP) is a protocol used to synchronize computer clock times in a network.

NTP OpEN API

This document provides a brief description of the NTP OpEN APIs. The NTP OpEN APIs allow processes outside of the EFOS main process (switchdrvr) access to NTP services. It provides the following services:

All 'Set' operations may affect the Switch behavior and configuration.

Example C Application ntp_example

Initialization

In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.

ntp_example

ntp_example.c is a sample application that demonstrates the use of the NTP OpEN APIs. ntp_example is started from the command line and has the following usage syntax:

Usage: ntp_example <test#> <arg1> <arg2> ...

It exercises all the NTP OpEN APIs with appropriate arguments to manage the NTP component in the EFOS main process (switchdrvr).

NTP CLI/API Cross Reference

CLI Command OpEN API Reference
(Config)#
ntp server <ipaddress | ipv6address | host-name>
openapiNtpServerAdd()
(Config)#
no ntp server <ipaddress | ipv6address | host-name>
openapiNtpServerDelete()
(Config)#
ntp server <server-address> [version <number>] [key <key-id>] [minpoll <interval>] [maxpoll <interval>] [prefer] [burst] [iburst]
openapiNtpServerTableVersionSet()
openapiNtpServerTableAuthKeySet()
openapiNtpServerTableMaxPollSet()
openapiNtpServerTableMinPollSet()
openapiNtpServerTablePreferSet()
openapiNtpServerTableBurstSet()
openapiNtpServerTableIBurstSet()
(Config)#
ntp broadcast client
openapiNtpModeSet()
(Config)#
ntp authenticate
openapiNtpAuthenticationModeSet()
(Config)#
ntp broadcastdelay <microseconds>
openapiNtpBroadcastDelaySet()
(Config)#
ntp source-interface <interface-name>
openapiNtpSourceInterfaceSet()
(Config)#
ntp vrf <vrf-name>
openapiNtpVrfNameSet()
(Config)#
ntp authentication-key <key-number> <msg-auth-algorithm> [encrypted <key-name>]
openapiNtpAuthTableKeyAdd()
openapiNtpAuthTableKeyValueSet()
openapiNtpAuthTableKeyMsgAuthAlgSet()
(Config)#
ntp trusted-key <key-number>
openapiNtpAuthTableKeyTrustedSet()
(Priv-User Mode)#
show ntp authentication-keys
openapiNtpAuthTableKeyValueGet()
openapiNtpAuthTableKeyMsgAuthAlgGet()
openapiNtpAuthTableKeyTrustedGet()
openapiNtpAuthTableEntryFirstGet()
openapiNtpAuthTableEntryGetNext()
(Priv-User Mode)#
show ntp
openapiNtpModeGet()
openapiNtpSupportedModeGet()
openapiNtpAuthenticationModeGet()
openapiNtpBroadcastDelayGet()
openapiNtpSourceInterfaceGet()
openapiNtpVrfNameGet()
(Priv-User Mode)#
show ntp server
openapiNtpServersMaxSupportedGet()
openapiNtpServerCurrentEntriesGet()
openapiNtpServerFirstGet()
openapiNtpServerNextGet()
openapiNtpServerAddressTypeGet()
openapiActiveNtpServerIpAddressGet()
openapiActiveNtpServerAddressTypeGet()
openapiActiveNtpServerStratumGet()
openapiActiveNtpServerReferenceIdGet()
openapiActiveNtpServerModeGet()
openapiNtpServerTableAuthKeyGet()
openapiNtpServerTableMaxPollGet()
openapiNtpServerTableMinPollGet()
openapiNtpServerTablePreferGet()
openapiNtpServerTableBurstGet()
openapiNtpServerTableIBurstGet()
openapiNtpServerTableVersionGet()