OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
policerX.h
Go to the documentation of this file.
1
4
/*****************************************************************************
5
*
6
* This software is governed by the Broadcom Advanced Switch APIs license.
7
* This license is set out in the
8
* https://github.com/Broadcom-Switch/OpenNSL/Legal/LICENSE-Adv file.
9
*
10
* Copyright 2015-2016 Broadcom Corporation. All rights reserved.
11
*
12
***************************************************************************/
16
#ifndef __OPENNSL_POLICERX_H__
17
#define __OPENNSL_POLICERX_H__
18
19
#include <
opennsl/types.h
>
20
22
typedef
enum
opennsl_policer_mode_e
{
23
opennslPolicerModeSrTcm
= 0,
24
opennslPolicerModeCommitted
= 1,
25
opennslPolicerModePeak
= 2,
26
opennslPolicerModeTrTcm
= 3,
27
opennslPolicerModeTrTcmDs
= 4,
28
}
opennsl_policer_mode_t
;
29
/* __doxy_func_body_end__ */
30
31
#define OPENNSL_POLICER_COLOR_BLIND 0x00000004
32
#define OPENNSL_POLICER_MODE_BYTES 0x00000040
33
#define OPENNSL_POLICER_MODE_PACKETS 0x00000080
34
typedef
struct
opennsl_policer_config_s
{
35
uint32
flags
;
36
opennsl_policer_mode_t
mode
;
37
uint32
ckbits_sec
;
38
uint32
ckbits_burst
;
39
uint32
pkbits_sec
;
40
uint32
max_pkbits_sec
;
42
uint32
pkbits_burst
;
43
}
opennsl_policer_config_t
;
44
/* __doxy_func_body_end__ */
45
46
/***************************************************************************/
56
extern
void
opennsl_policer_config_t_init
(
57
opennsl_policer_config_t
*pol_cfg)
LIB_DLL_EXPORTED
;
58
59
/***************************************************************************/
70
extern
int
opennsl_policer_create
(
71
int
unit,
72
opennsl_policer_config_t
*pol_cfg,
73
opennsl_policer_t
*
policer_id
)
LIB_DLL_EXPORTED
;
74
75
/***************************************************************************/
90
extern
int
opennsl_policer_destroy
(
91
int
unit,
92
opennsl_policer_t
policer_id
)
LIB_DLL_EXPORTED
;
93
94
/***************************************************************************/
105
extern
int
opennsl_policer_set
(
106
int
unit,
107
opennsl_policer_t
policer_id
,
108
opennsl_policer_config_t
*pol_cfg)
LIB_DLL_EXPORTED
;
109
110
/***************************************************************************/
121
extern
int
opennsl_policer_get
(
122
int
unit,
123
opennsl_policer_t
policer_id
,
124
opennsl_policer_config_t
*pol_cfg)
LIB_DLL_EXPORTED
;
125
126
#endif
/* __OPENNSL_POLICERX_H__ */
127
© 2016-17 by Broadcom Limited. All rights reserved.