Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.9.0.2
openapi_sntp.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_sntp.h
28 *
29 * @purpose SNTP Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 28/01/2013
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_SNTP_H_INCLUDED
39 #define OPENAPI_SNTP_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 #define OPEN_SNTP_BUFFER_SIZE 256
44 #define OPEN_SECS_PER_MIN 60
45 #define OPEN_SNTP_DATE_STRING_SIZE 21
46 
47 
49 typedef enum
50 {
55 
56 
58 typedef enum
59 {
65 
67 typedef enum
68 {
74 
76 typedef enum
77 {
87 
88 typedef enum
89 {
99 
100 /*****************************************************************/
124  open_buffdesc *ipAddr);
125 
126 /*****************************************************************/
151  open_buffdesc *ipAddr,
152  uint16_t priority);
153 
154 /*****************************************************************/
169  uint32_t *priorityMax);
170 
171 /*****************************************************************/
196  open_buffdesc *ipAddr, uint16_t port);
197 
198 /*****************************************************************/
223  open_buffdesc *ipAddr, uint16_t version);
224 
225 /*****************************************************************/
242  uint32_t *maxSntpServers);
243 
244 /*****************************************************************/
266  open_buffdesc *ipAddr);
267 
268 /*****************************************************************/
283  uint32_t *sntpServerAddrLen);
284 
285 /*****************************************************************/
303  open_buffdesc *sntpServer);
304 
305 /*****************************************************************/
325  open_buffdesc *sntpServer,
326  open_buffdesc *nextSntpServer);
327 
328 /*****************************************************************/
345  open_buffdesc *sntpServer,
346  OPEN_SNTP_ADDRESS_TYPE_t *sntpServerAddrType);
347 
348 /*****************************************************************/
365  open_buffdesc *sntpServer,
366  uint16_t *serverPriority);
367 
368 /*****************************************************************/
385  open_buffdesc *sntpServer,
386  uint16_t *serverVersion);
387 
388 /*****************************************************************/
405  open_buffdesc *sntpServer,
406  uint16_t *serverPort);
407 
408 /*****************************************************************/
429 
430 /*****************************************************************/
445  OPEN_SNTP_CLIENT_MODE_t *sntpClientMode);
446 
447 /*****************************************************************/
462  OPEN_SNTP_SUPPORTED_MODE_t *sntpClientSupportedMode);
463 
464 
465 /*****************************************************************/
482 
483 /*****************************************************************/
503  open_buffdesc *sntpServer);
504 
505 /*****************************************************************/
521  uint32_t *stratum);
522 
523 /*****************************************************************/
539  open_buffdesc *reference);
540 
541 /*****************************************************************/
555  uint32_t *refStrLen);
556 
557 /*****************************************************************/
572  OPEN_SNTP_SERVER_MODE_t *serverMode);
573 
574 /*****************************************************************/
589  uint32_t *currEntries);
590 
591 /*****************************************************************/
612  open_buffdesc *sntpServer,
613  OPEN_SNTP_PACKET_STATUS_t *sntpLastAttemptStatus);
614 
615 /*****************************************************************/
636  open_buffdesc *sntpServer,
637  open_buffdesc *sntpLastUpdatedTime);
638 
639 /*****************************************************************/
660  open_buffdesc *sntpServer,
661  open_buffdesc *sntpLastAttemptTime);
662 
663 /*****************************************************************/
684  open_buffdesc *sntpServer,
685  uint32_t *numRequests);
686 
687 /*****************************************************************/
708  open_buffdesc *sntpServer,
709  uint32_t *numFailedRequests);
710 #endif
711