Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.4.4.5
Welcome
ADK Documentation
API Reference
Files
File List
Globals
api
include
openapi_instru_nos.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_instru_nos.h
28
*
29
* @purpose System Information
30
*
31
* @component OPEN
32
*
33
* @create 07/31/2014
34
*
35
* @end
36
*
37
**********************************************************************/
38
#ifndef OPENAPI_INSTRU_NOS_H_INCLUDED
39
#define OPENAPI_INSTRU_NOS_H_INCLUDED
40
41
#include "
openapi_common.h
"
42
#include "
openapi_instru_bst.h
"
43
#include "feature.h"
44
45
typedef
time_t OPEN_TIME_t;
46
48
#define OPEN_INSTRU_MAX_PACKET_SIZE 1588
49
50
/* Maximum length of interface list that can be specified in JSON */
51
#define OPEN_MAX_PORT_LIST_STR 256
52
54
#define OPEN_MASK_BASE_UNIT unsigned int
55
#define OPEN_MASKWID 32
56
58
#define OPEN_MASK_SIZE(_max) (((_max) + OPEN_MASKWID - 1) / OPEN_MASKWID)
59
60
#define CONVERT_32_TO_64_INT(dest, src) \
61
do{ \
62
int i = 0; \
63
for (i = 0;i < (sizeof(src)/sizeof(uint32_t)); i++) \
64
{ \
65
*(((uint64_t*)(&dest)) + i) = *(((uint32_t*)(&src)) + i); \
66
} \
67
}while(0);
68
69
#define CONVERT_64_TO_32_INT(dest, src) \
70
do{ \
71
int i = 0; \
72
for (i=0;i < (sizeof(src)/sizeof(uint64_t)); i++) \
73
{ \
74
*(((uint32_t*)&dest) + i) = *(((uint64_t*)&src) + i); \
75
} \
76
}while(0);
77
78
typedef
struct
79
{
81
int
numPorts
;
83
int
numUnicastQueues
;
85
int
numUnicastQueueGroups
;
87
int
numMulticastQueues
;
89
int
numServicePools
;
91
int
numCommonPools
;
93
int
numCpuQueues
;
95
int
numRqeQueues
;
97
int
numRqeQueuePools
;
99
int
numPriorityGroups
;
101
bool
support1588
;
103
int
cellToByteConv
;
105
int
numTrafficClasses
;
107
bool
lossless_class
;
109
bool
lossy_class
;
111
bool
isolated_buffers
;
113
bool
dscp_tc_mark
;
115
bool
pbr
;
117
bool
dscp_pfc
;
119
bool
strg_proto_identification
;
121
int
num_cos
;
122
}
OPEN_ASIC_CAPABILITIES_ALL_t
;
123
124
/* Interface storage */
125
typedef
struct
_open_port_mask_
126
{
127
OPEN_MASK_BASE_UNIT
value[
OPEN_MASK_SIZE
(OPEN_ASIC_MAX_PORTS)];
128
uint8_t port_list_str[OPEN_MAX_PORT_LIST_STR];
129
130
}
OPEN_PORT_MASK_t
;
131
132
#if L7_FEAT_IFA || L7_FEAT_FT
133
typedef
struct
_open_instru_ipv4_
134
{
135
uint32_t addr;
136
uint32_t mask;
137
} OPEN_INSTRU_IPV4_t;
138
139
typedef
struct
_open_instru_ipv6_
140
{
141
open_in6_addr_t
addr;
142
open_in6_addr_t
mask;
143
} OPEN_INSTRU_IPV6_t;
144
145
typedef
struct
_open_instru_ip_prefix_
146
{
147
unsigned
short
family;
148
union
149
{
150
OPEN_INSTRU_IPV4_t ip;
151
OPEN_INSTRU_IPV6_t ipv6;
152
} host;
153
} OPEN_INSTRU_IP_PREFIX_t;
154
155
typedef
struct
_open_instru_ip_addr_
156
{
157
unsigned
short
family;
158
union
159
{
160
struct
in_addr addr;
161
struct
in6_addr addr6;
162
} ipaddr;
163
} OPEN_INSTRU_IP_ADDR_t;
164
#endif
165
166
/*****************************************************************/
178
open_error_t
openapiMacAddrGet
(
openapiClientHandle_t
*client_handle,
open_buffdesc
*mac);
179
180
/*****************************************************************/
193
open_error_t
openapiTimeGet
(
openapiClientHandle_t
*client_handle,
int
*second,
int
*nanosecond);
194
195
/*****************************************************************/
207
open_error_t
openapiChipFamilyNameGet
(
openapiClientHandle_t
*client_handle,
open_buffdesc
*buf);
208
209
/*****************************************************************/
222
open_error_t
openapiHwMaxPortsGet
(
openapiClientHandle_t
*client_handle,
223
int
*maxPhysPorts,
int
*maxHiGigPorts);
224
225
/*****************************************************************/
239
open_error_t
openapiLagTranslateToNotation
(
openapiClientHandle_t
* client_handle,
240
int
asic,
int
lag,
open_buffdesc
*dst);
241
242
/*****************************************************************/
255
open_error_t
openapiHttpPortGet
(
openapiClientHandle_t
* client_handle,
256
int
asic,
int
*httpPort);
257
258
/*********************************************************************/
275
open_error_t
openapiBstMaxSnapshotGet
(
openapiClientHandle_t
*clientHandle,
276
int
asic,
277
OPEN_BST_ASIC_SNAPSHOT_DATA_t
*data1,
278
OPEN_BST_EGRESS_UC_QUEUE_DATA_t
*data2,
279
OPEN_BST_EGRESS_MC_QUEUE_DATA_t
*data3,
280
time_t *time);
281
282
/*********************************************************************/
298
open_error_t
299
openapiBstMaxSnapshotCompressedGet
(
openapiClientHandle_t
*clientHandle,
300
int
asic,
301
open_buffdesc
*compSnapshot,
302
time_t *time);
303
304
/*****************************************************************/
323
open_error_t
324
openapiSystemPacketTcamRegister
(
openapiClientHandle_t
*clientHandle,
325
int
asic,
326
open_buffdesc
*name,
327
int
ClientId);
328
329
/*****************************************************************/
343
open_error_t
344
openapiSystemCosqHwqFullMapGet
(
openapiClientHandle_t
* client_handle,
345
int
asic,
OPEN_SYSTEM_COSQ_HWQ_MAP_t
*cosq_hwq_map);
346
347
/*****************************************************************/
363
open_error_t
364
openapiSystemUCosqHwqMapGet
(
openapiClientHandle_t
* client_handle,
365
int
asic,
int
port,
int
cosq,
int
*hwQNum);
366
367
/*****************************************************************/
383
open_error_t
384
openapiSystemMCosqHwqMapGet
(
openapiClientHandle_t
* client_handle,
385
int
asic,
int
port,
int
cosq,
int
*hwQNum);
386
387
/*****************************************************************/
403
open_error_t
404
openapiSystemHwqUCosqMapGet
(
openapiClientHandle_t
* client_handle,
405
int
asic,
int
hwQNum,
int
*port,
int
*cosq);
406
407
/*****************************************************************/
423
open_error_t
424
openapiSystemHwqMCosqMapGet
(
openapiClientHandle_t
* client_handle,
425
int
asic,
int
hwQNum,
int
*port,
int
*cosq);
426
427
/*****************************************************************/
440
open_error_t
openapiAsicCapabilityGet
(
openapiClientHandle_t
*clientHandle,
441
int
asic,
442
OPEN_ASIC_CAPABILITIES_ALL_t
*asicCap);
443
444
445
#endif
446
© 2020 by Broadcom. All rights reserved.