OpenNSL API Guide and Reference Manual
Welcome
OpenNSL Documentation
API Reference
Files
File List
Globals
include
opennsl
mplsX.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_MPLSX_H__
17
#define __OPENNSL_MPLSX_H__
18
19
#include <
opennsl/types.h
>
20
#include <
opennsl/vlan.h
>
21
#include <
opennsl/switch.h
>
22
23
#if defined(INCLUDE_L3)
24
25
typedef
struct
opennsl_mpls_exp_map_s
{
26
int
priority
;
27
opennsl_color_t
color
;
28
uint8
dscp
;
29
uint8
exp
;
30
uint8
pkt_pri
;
31
uint8
pkt_cfi
;
32
}
opennsl_mpls_exp_map_t
;
33
/* __doxy_func_body_end__ */
34
#endif
35
36
#define OPENNSL_MPLS_EGRESS_LABEL_TTL_SET 0x00000001
37
#define OPENNSL_MPLS_EGRESS_LABEL_TTL_COPY 0x00000002
38
#define OPENNSL_MPLS_EGRESS_LABEL_TTL_DECREMENT 0x00000004
39
#define OPENNSL_MPLS_EGRESS_LABEL_ACTION_VALID 0x00002000
42
#define OPENNSL_MPLS_EGRESS_LABEL_REPLACE 0x00004000
44
#define OPENNSL_MPLS_EGRESS_LABEL_WITH_ID 0x00008000
47
typedef enum opennsl_mpls_egress_action_e {
48
OPENNSL_MPLS_EGRESS_ACTION_SWAP
= 0,
49
OPENNSL_MPLS_EGRESS_ACTION_PHP
= 1,
50
OPENNSL_MPLS_EGRESS_ACTION_PUSH
= 2,
51
OPENNSL_MPLS_EGRESS_ACTION_NOP
= 3,
52
OPENNSL_MPLS_EGRESS_ACTION_SWAP_OR_PUSH
= 4
53
}
opennsl_mpls_egress_action_t
;
54
/* __doxy_func_body_end__ */
55
57
typedef
struct
opennsl_mpls_egress_label_s
{
58
uint32
flags
;
59
opennsl_mpls_label_t
label
;
60
int
qos_map_id
;
61
uint8
exp
;
62
uint8
ttl
;
63
uint8
pkt_pri
;
64
uint8
pkt_cfi
;
65
opennsl_if_t
tunnel_id
;
66
opennsl_if_t
l3_intf_id
;
67
opennsl_mpls_egress_action_t
action
;
70
int
reserved1
;
71
int
reserved2
;
72
opennsl_failover_t
egress_failover_id
;
74
opennsl_if_t
egress_failover_if_id
;
76
int
outlif_counting_profile
;
77
opennsl_reserved_enum_t
reserved3
;
78
opennsl_reserved_enum_t
reserved4
;
79
}
opennsl_mpls_egress_label_t
;
80
/* __doxy_func_body_end__ */
81
82
#if defined(INCLUDE_L3)
83
84
typedef
enum
opennsl_mpls_port_match_e
{
85
OPENNSL_MPLS_PORT_MATCH_INVALID
= 0,
86
OPENNSL_MPLS_PORT_MATCH_NONE
= 1,
87
OPENNSL_MPLS_PORT_MATCH_PORT
= 2,
88
OPENNSL_MPLS_PORT_MATCH_PORT_VLAN
= 3,
89
OPENNSL_MPLS_PORT_MATCH_PORT_INNER_VLAN
= 4,
90
OPENNSL_MPLS_PORT_MATCH_PORT_VLAN_STACKED
= 5,
91
OPENNSL_MPLS_PORT_MATCH_VLAN_PRI
= 6,
92
OPENNSL_MPLS_PORT_MATCH_LABEL
= 7,
93
OPENNSL_MPLS_PORT_MATCH_LABEL_PORT
= 8,
94
OPENNSL_MPLS_PORT_MATCH_LABEL_VLAN
= 9,
95
OPENNSL_MPLS_PORT_MATCH_PORT_SUBPORT_PKT_VID
= 10,
96
OPENNSL_MPLS_PORT_MATCH_PORT_SUBPORT_PKT_VID_OUTER_VLAN
= 11,
98
OPENNSL_MPLS_PORT_MATCH_PORT_SUBPORT_PKT_VID_INNER_VLAN
= 12,
100
OPENNSL_MPLS_PORT_MATCH_SHARE
= 13,
102
OPENNSL_MPLS_PORT_MATCH_PORT_VLAN_TAG
= 14,
104
OPENNSL_MPLS_PORT_MATCH_PORT_INNER_VLAN_TAG
= 15,
106
OPENNSL_MPLS_PORT_MATCH_COUNT
= 16
107
}
opennsl_mpls_port_match_t
;
108
/* __doxy_func_body_end__ */
109
#endif
110
111
#if defined(INCLUDE_L3)
112
#endif
113
#if defined(INCLUDE_L3)
114
#endif
115
#if defined(INCLUDE_L3)
116
117
typedef
enum
opennsl_mpls_port_control_channel_type_e
{
118
opennslMplsPortControlChannelNone
= 0,
119
opennslMplsPortControlChannelAch
= 1,
120
opennslMplsPortControlChannelRouterAlert
= 2,
121
opennslMplsPortControlChannelTtl
= 3,
122
opennslMplsPortControlChannelGalUnderPw
= 4
123
}
opennsl_mpls_port_control_channel_type_t
;
124
/* __doxy_func_body_end__ */
125
#endif
126
127
#if defined(INCLUDE_L3)
128
129
typedef
struct
opennsl_mpls_port_s
{
130
opennsl_gport_t
mpls_port_id
;
131
uint32
flags
;
132
uint32
flags2
;
133
int
if_class
;
134
int
exp_map
;
135
int
int_pri
;
136
uint8
pkt_pri
;
137
uint8
pkt_cfi
;
138
uint16
service_tpid
;
139
opennsl_gport_t
port
;
140
opennsl_mpls_port_match_t
criteria
;
141
opennsl_vlan_t
match_vlan
;
142
opennsl_vlan_t
match_inner_vlan
;
143
opennsl_mpls_label_t
match_label
;
144
opennsl_if_t
egress_tunnel_if
;
145
opennsl_mpls_egress_label_t
egress_label
;
146
int
mtu
;
147
opennsl_vlan_t
egress_service_vlan
;
148
uint32
pw_seq_number
;
150
opennsl_if_t
encap_id
;
151
opennsl_failover_t
ingress_failover_id
;
152
opennsl_gport_t
ingress_failover_port_id
;
154
opennsl_failover_t
failover_id
;
155
opennsl_gport_t
failover_port_id
;
156
opennsl_policer_t
policer_id
;
158
opennsl_multicast_t
failover_mc_group
;
159
opennsl_failover_t
pw_failover_id
;
161
opennsl_gport_t
pw_failover_port_id
;
162
opennsl_mpls_port_control_channel_type_t
vccv_type
;
163
opennsl_switch_network_group_t
network_group_id
;
165
opennsl_vlan_t
match_subport_pkt_vid
;
166
opennsl_gport_t
tunnel_id
;
167
opennsl_gport_t
per_flow_queue_base
;
170
int
qos_map_id
;
171
opennsl_failover_t
egress_failover_id
;
173
opennsl_gport_t
egress_failover_port_id
;
175
uint32
class_id
;
176
int
inlif_counting_profile
;
177
}
opennsl_mpls_port_t
;
178
/* __doxy_func_body_end__ */
179
#endif
180
181
#if defined(INCLUDE_L3)
182
183
typedef
enum
opennsl_mpls_switch_action_e
{
184
OPENNSL_MPLS_SWITCH_ACTION_SWAP
= 0,
185
OPENNSL_MPLS_SWITCH_ACTION_PHP
= 1,
186
OPENNSL_MPLS_SWITCH_ACTION_POP
= 2,
187
OPENNSL_MPLS_SWITCH_ACTION_POP_DIRECT
= 3,
188
OPENNSL_MPLS_SWITCH_ACTION_NOP
= 4,
189
OPENNSL_MPLS_SWITCH_EGRESS_ACTION_PUSH
= 5,
190
OPENNSL_MPLS_SWITCH_ACTION_INVALID
= 6
191
}
opennsl_mpls_switch_action_t
;
192
/* __doxy_func_body_end__ */
193
#endif
194
195
#if defined(INCLUDE_L3)
196
#define OPENNSL_MPLS_SWITCH_INNER_TTL 0x00000100
199
#define OPENNSL_MPLS_SWITCH_TTL_DECREMENT 0x00000200
201
#endif
202
#if defined(INCLUDE_L3)
203
#endif
204
#if defined(INCLUDE_L3)
205
206
typedef
struct
opennsl_mpls_tunnel_switch_s
{
207
uint32
flags
;
208
uint32
reserved1
;
209
opennsl_mpls_label_t
label
;
210
opennsl_mpls_label_t
second_label
;
211
opennsl_gport_t
port
;
212
opennsl_mpls_switch_action_t
action
;
213
opennsl_mpls_switch_action_t
action_if_bos
;
214
opennsl_mpls_switch_action_t
action_if_not_bos
;
215
opennsl_multicast_t
mc_group
;
216
int
exp_map
;
217
int
int_pri
;
218
opennsl_policer_t
policer_id
;
220
opennsl_vpn_t
vpn
;
221
opennsl_mpls_egress_label_t
egress_label
;
222
opennsl_if_t
egress_if
;
223
opennsl_if_t
ingress_if
;
224
int
mtu
;
225
int
qos_map_id
;
226
opennsl_failover_t
failover_id
;
229
opennsl_gport_t
tunnel_id
;
230
opennsl_gport_t
failover_tunnel_id
;
231
opennsl_if_t
tunnel_if
;
234
opennsl_gport_t
egress_port
;
235
uint16
oam_global_context_id
;
237
uint32
class_id
;
238
int
inlif_counting_profile
;
239
int
reserved2
;
240
int
reserved3
;
241
}
opennsl_mpls_tunnel_switch_t
;
242
/* __doxy_func_body_end__ */
243
#endif
244
245
#if defined(INCLUDE_L3)
246
247
typedef
struct
opennsl_mpls_entropy_identifier_s
{
248
opennsl_mpls_label_t
label
;
249
opennsl_mpls_label_t
mask
;
250
int
pri
;
251
uint32
flags
;
252
}
opennsl_mpls_entropy_identifier_t
;
253
/* __doxy_func_body_end__ */
254
#endif
255
256
#if defined(INCLUDE_L3)
257
/***************************************************************************/
266
extern
void
opennsl_mpls_port_t_init
(
267
opennsl_mpls_port_t
*mpls_port)
LIB_DLL_EXPORTED
;
268
#endif
269
270
#if defined(INCLUDE_L3)
271
/***************************************************************************/
280
extern
void
opennsl_mpls_egress_label_t_init
(
281
opennsl_mpls_egress_label_t
*label)
LIB_DLL_EXPORTED
;
282
#endif
283
284
#if defined(INCLUDE_L3)
285
/***************************************************************************/
294
extern
void
opennsl_mpls_tunnel_switch_t_init
(
295
opennsl_mpls_tunnel_switch_t
*info)
LIB_DLL_EXPORTED
;
296
#endif
297
298
#if defined(INCLUDE_L3)
299
/***************************************************************************/
308
extern
void
opennsl_mpls_entropy_identifier_t_init
(
309
opennsl_mpls_entropy_identifier_t
*info)
LIB_DLL_EXPORTED
;
310
#endif
311
312
#if defined(INCLUDE_L3)
313
/***************************************************************************/
322
extern
void
opennsl_mpls_exp_map_t_init
(
323
opennsl_mpls_exp_map_t
*exp_map)
LIB_DLL_EXPORTED
;
324
#endif
325
326
#if defined(INCLUDE_L3)
327
/***************************************************************************/
337
extern
int
opennsl_mpls_init
(
338
int
unit)
LIB_DLL_EXPORTED
;
339
#endif
340
341
#if defined(INCLUDE_L3)
342
/***************************************************************************/
351
extern
int
opennsl_mpls_cleanup
(
352
int
unit)
LIB_DLL_EXPORTED
;
353
#endif
354
355
#if defined(INCLUDE_L3)
356
#define OPENNSL_MPLS_VPN_L3 0x00000001
357
#define OPENNSL_MPLS_VPN_VPWS 0x00000002
358
#define OPENNSL_MPLS_VPN_VPLS 0x00000004
359
#define OPENNSL_MPLS_VPN_REPLACE 0x00000008
360
#define OPENNSL_MPLS_VPN_WITH_ID 0x00000010
361
#endif
362
#if defined(INCLUDE_L3)
363
#endif
364
#if defined(INCLUDE_L3)
365
#endif
366
#if defined(INCLUDE_L3)
367
368
typedef
struct
opennsl_mpls_vpn_config_s
{
369
uint32
flags
;
370
opennsl_vpn_t
vpn
;
371
int
lookup_id
;
372
opennsl_multicast_t
broadcast_group
;
373
opennsl_multicast_t
unknown_unicast_group
;
374
opennsl_multicast_t
unknown_multicast_group
;
375
opennsl_policer_t
policer_id
;
376
opennsl_vlan_protocol_packet_ctrl_t
protocol_pkt
;
377
}
opennsl_mpls_vpn_config_t
;
378
/* __doxy_func_body_end__ */
379
#endif
380
381
#if defined(INCLUDE_L3)
382
/***************************************************************************/
391
extern
void
opennsl_mpls_vpn_config_t_init
(
392
opennsl_mpls_vpn_config_t
*info)
LIB_DLL_EXPORTED
;
393
#endif
394
395
#if defined(INCLUDE_L3)
396
/***************************************************************************/
407
extern
int
opennsl_mpls_vpn_id_create
(
408
int
unit,
409
opennsl_mpls_vpn_config_t
*info)
LIB_DLL_EXPORTED
;
410
#endif
411
412
#if defined(INCLUDE_L3)
413
/***************************************************************************/
423
extern
int
opennsl_mpls_vpn_id_destroy
(
424
int
unit,
425
opennsl_vpn_t
vpn)
LIB_DLL_EXPORTED
;
426
#endif
427
428
#if defined(INCLUDE_L3)
429
/***************************************************************************/
438
extern
int
opennsl_mpls_vpn_id_destroy_all
(
439
int
unit)
LIB_DLL_EXPORTED
;
440
#endif
441
442
#if defined(INCLUDE_L3)
443
/***************************************************************************/
454
extern
int
opennsl_mpls_vpn_id_get
(
455
int
unit,
456
opennsl_vpn_t
vpn,
457
opennsl_mpls_vpn_config_t
*info)
LIB_DLL_EXPORTED
;
458
#endif
459
460
#if defined(INCLUDE_L3)
461
typedef
int(*
opennsl_mpls_vpn_traverse_cb
)(
462
int
unit,
463
opennsl_mpls_vpn_config_t
*info,
464
void
*user_data);
465
#endif
466
467
#if defined(INCLUDE_L3)
468
/***************************************************************************/
481
extern
int
opennsl_mpls_vpn_traverse
(
482
int
unit,
483
opennsl_mpls_vpn_traverse_cb
cb,
484
void
*user_data)
LIB_DLL_EXPORTED
;
485
#endif
486
487
#if defined(INCLUDE_L3)
488
/***************************************************************************/
510
extern
int
opennsl_mpls_port_add
(
511
int
unit,
512
opennsl_vpn_t
vpn,
513
opennsl_mpls_port_t
*mpls_port)
LIB_DLL_EXPORTED
;
514
#endif
515
516
#if defined(INCLUDE_L3)
517
/***************************************************************************/
528
extern
int
opennsl_mpls_port_delete
(
529
int
unit,
530
opennsl_vpn_t
vpn,
531
opennsl_gport_t
mpls_port_id)
LIB_DLL_EXPORTED
;
532
#endif
533
534
#if defined(INCLUDE_L3)
535
/***************************************************************************/
545
extern
int
opennsl_mpls_port_delete_all
(
546
int
unit,
547
opennsl_vpn_t
vpn)
LIB_DLL_EXPORTED
;
548
#endif
549
550
#if defined(INCLUDE_L3)
551
/***************************************************************************/
562
extern
int
opennsl_mpls_port_get
(
563
int
unit,
564
opennsl_vpn_t
vpn,
565
opennsl_mpls_port_t
*mpls_port)
LIB_DLL_EXPORTED
;
566
#endif
567
568
#if defined(INCLUDE_L3)
569
/***************************************************************************/
582
extern
int
opennsl_mpls_port_get_all
(
583
int
unit,
584
opennsl_vpn_t
vpn,
585
int
port_max,
586
opennsl_mpls_port_t
*port_array,
587
int
*port_count)
LIB_DLL_EXPORTED
;
588
#endif
589
590
#if defined(INCLUDE_L3)
591
592
typedef
enum
opennsl_mpls_stat_e
{
593
opennslMplsInBytes
= 0,
594
opennslMplsOutBytes
= 1,
595
opennslMplsInPkts
= 2,
596
opennslMplsOutPkts
= 3
597
}
opennsl_mpls_stat_t
;
598
/* __doxy_func_body_end__ */
599
#endif
600
601
#if defined(INCLUDE_L3)
602
/***************************************************************************/
616
extern
int
opennsl_mpls_tunnel_stat_attach
(
617
int
unit,
618
opennsl_if_t
intf_id,
619
uint32
stat_counter_id)
LIB_DLL_EXPORTED
;
620
#endif
621
622
#if defined(INCLUDE_L3)
623
/***************************************************************************/
636
extern
int
opennsl_mpls_tunnel_stat_detach
(
637
int
unit,
638
opennsl_if_t
intf_id)
LIB_DLL_EXPORTED
;
639
#endif
640
641
#if defined(INCLUDE_L3)
642
/***************************************************************************/
661
extern
int
opennsl_mpls_tunnel_stat_counter_get
(
662
int
unit,
663
opennsl_if_t
intf_id,
664
opennsl_mpls_stat_t
stat,
665
uint32
num_entries,
666
uint32
*counter_indexes,
667
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
668
#endif
669
670
#if defined(INCLUDE_L3)
671
/***************************************************************************/
688
extern
int
opennsl_mpls_tunnel_stat_counter_sync_get
(
689
int
unit,
690
opennsl_if_t
intf_id,
691
opennsl_mpls_stat_t
stat,
692
uint32
num_entries,
693
uint32
*counter_indexes,
694
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
695
#endif
696
697
#if defined(INCLUDE_L3)
698
/***************************************************************************/
713
extern
int
opennsl_mpls_tunnel_stat_id_get
(
714
int
unit,
715
opennsl_if_t
intf_id,
716
opennsl_mpls_stat_t
stat,
717
uint32
*stat_counter_id)
LIB_DLL_EXPORTED
;
718
#endif
719
720
#if defined(INCLUDE_L3)
721
/***************************************************************************/
739
extern
int
opennsl_mpls_tunnel_stat_counter_set
(
740
int
unit,
741
opennsl_if_t
intf_id,
742
opennsl_mpls_stat_t
stat,
743
uint32
num_entries,
744
uint32
*counter_indexes,
745
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
746
#endif
747
748
#if defined(INCLUDE_L3)
749
/***************************************************************************/
769
extern
int
opennsl_mpls_tunnel_initiator_set
(
770
int
unit,
771
opennsl_if_t
intf,
772
int
num_labels,
773
opennsl_mpls_egress_label_t
*label_array)
LIB_DLL_EXPORTED
;
774
#endif
775
776
#if defined(INCLUDE_L3)
777
/***************************************************************************/
787
extern
int
opennsl_mpls_tunnel_initiator_create
(
788
int
unit,
789
opennsl_if_t
intf,
790
int
num_labels,
791
opennsl_mpls_egress_label_t
*label_array)
LIB_DLL_EXPORTED
;
792
#endif
793
794
#if defined(INCLUDE_L3)
795
/***************************************************************************/
805
extern
int
opennsl_mpls_tunnel_initiator_clear
(
806
int
unit,
807
opennsl_if_t
intf)
LIB_DLL_EXPORTED
;
808
#endif
809
810
#if defined(INCLUDE_L3)
811
/***************************************************************************/
820
extern
int
opennsl_mpls_tunnel_initiator_clear_all
(
821
int
unit)
LIB_DLL_EXPORTED
;
822
#endif
823
824
#if defined(INCLUDE_L3)
825
/***************************************************************************/
838
extern
int
opennsl_mpls_tunnel_initiator_get
(
839
int
unit,
840
opennsl_if_t
intf,
841
int
label_max,
842
opennsl_mpls_egress_label_t
*label_array,
843
int
*label_count)
LIB_DLL_EXPORTED
;
844
#endif
845
846
#if defined(INCLUDE_L3)
847
/***************************************************************************/
891
extern
int
opennsl_mpls_tunnel_switch_add
(
892
int
unit,
893
opennsl_mpls_tunnel_switch_t
*info)
LIB_DLL_EXPORTED
;
894
#endif
895
896
#if defined(INCLUDE_L3)
897
/***************************************************************************/
941
extern
int
opennsl_mpls_tunnel_switch_create
(
942
int
unit,
943
opennsl_mpls_tunnel_switch_t
*info)
LIB_DLL_EXPORTED
;
944
#endif
945
946
#if defined(INCLUDE_L3)
947
/***************************************************************************/
957
extern
int
opennsl_mpls_tunnel_switch_delete
(
958
int
unit,
959
opennsl_mpls_tunnel_switch_t
*info)
LIB_DLL_EXPORTED
;
960
#endif
961
962
#if defined(INCLUDE_L3)
963
/***************************************************************************/
972
extern
int
opennsl_mpls_tunnel_switch_delete_all
(
973
int
unit)
LIB_DLL_EXPORTED
;
974
#endif
975
976
#if defined(INCLUDE_L3)
977
/***************************************************************************/
987
extern
int
opennsl_mpls_tunnel_switch_get
(
988
int
unit,
989
opennsl_mpls_tunnel_switch_t
*info)
LIB_DLL_EXPORTED
;
990
#endif
991
992
#if defined(INCLUDE_L3)
993
typedef
int (*
opennsl_mpls_tunnel_switch_traverse_cb
)(
994
int
unit,
995
opennsl_mpls_tunnel_switch_t
*info,
996
void
*user_data);
997
#endif
998
999
#if defined(INCLUDE_L3)
1000
/***************************************************************************/
1013
extern
int
opennsl_mpls_tunnel_switch_traverse
(
1014
int
unit,
1015
opennsl_mpls_tunnel_switch_traverse_cb
cb,
1016
void
*user_data)
LIB_DLL_EXPORTED
;
1017
#endif
1018
1019
#if defined(INCLUDE_L3)
1020
#endif
1021
#if defined(INCLUDE_L3)
1022
/***************************************************************************/
1041
extern
int
opennsl_mpls_entropy_identifier_add
(
1042
int
unit,
1043
uint32
options,
1044
opennsl_mpls_entropy_identifier_t
*info)
LIB_DLL_EXPORTED
;
1045
#endif
1046
1047
#if defined(INCLUDE_L3)
1048
/***************************************************************************/
1061
extern
int
opennsl_mpls_entropy_identifier_get
(
1062
int
unit,
1063
opennsl_mpls_entropy_identifier_t
*info)
LIB_DLL_EXPORTED
;
1064
#endif
1065
1066
#if defined(INCLUDE_L3)
1067
/***************************************************************************/
1080
extern
int
opennsl_mpls_entropy_identifier_delete
(
1081
int
unit,
1082
opennsl_mpls_entropy_identifier_t
*info)
LIB_DLL_EXPORTED
;
1083
#endif
1084
1085
#if defined(INCLUDE_L3)
1086
/***************************************************************************/
1095
extern
int
opennsl_mpls_entropy_identifier_delete_all
(
1096
int
unit)
LIB_DLL_EXPORTED
;
1097
#endif
1098
1099
#if defined(INCLUDE_L3)
1100
typedef
int (*
opennsl_mpls_entropy_identifier_traverse_cb
)(
1101
int
unit,
1102
opennsl_mpls_entropy_identifier_t
*info,
1103
void
*user_data);
1104
#endif
1105
1106
#if defined(INCLUDE_L3)
1107
/***************************************************************************/
1122
extern
int
opennsl_mpls_entropy_identifier_traverse
(
1123
int
unit,
1124
opennsl_mpls_entropy_identifier_traverse_cb
cb,
1125
void
*user_data)
LIB_DLL_EXPORTED
;
1126
#endif
1127
1128
#if defined(INCLUDE_L3)
1129
#endif
1130
#if defined(INCLUDE_L3)
1131
/***************************************************************************/
1152
extern
int
opennsl_mpls_exp_map_create
(
1153
int
unit,
1154
uint32
flags,
1155
int
*exp_map_id)
LIB_DLL_EXPORTED
;
1156
#endif
1157
1158
#if defined(INCLUDE_L3)
1159
/***************************************************************************/
1169
extern
int
opennsl_mpls_exp_map_destroy
(
1170
int
unit,
1171
int
exp_map_id)
LIB_DLL_EXPORTED
;
1172
#endif
1173
1174
#if defined(INCLUDE_L3)
1175
/***************************************************************************/
1191
extern
int
opennsl_mpls_exp_map_set
(
1192
int
unit,
1193
int
exp_map_id,
1194
opennsl_mpls_exp_map_t
*exp_map)
LIB_DLL_EXPORTED
;
1195
#endif
1196
1197
#if defined(INCLUDE_L3)
1198
/***************************************************************************/
1216
extern
int
opennsl_mpls_exp_map_get
(
1217
int
unit,
1218
int
exp_map_id,
1219
opennsl_mpls_exp_map_t
*exp_map)
LIB_DLL_EXPORTED
;
1220
#endif
1221
1222
#if defined(INCLUDE_L3)
1223
/***************************************************************************/
1239
extern
int
opennsl_mpls_label_stat_enable_set
(
1240
int
unit,
1241
opennsl_mpls_label_t
label,
1242
opennsl_gport_t
port
,
1243
int
enable)
LIB_DLL_EXPORTED
;
1244
#endif
1245
1246
#if defined(INCLUDE_L3)
1247
/***************************************************************************/
1265
extern
int
opennsl_mpls_label_stat_get
(
1266
int
unit,
1267
opennsl_mpls_label_t
label,
1268
opennsl_gport_t
port
,
1269
opennsl_mpls_stat_t
stat,
1270
uint64
*val)
LIB_DLL_EXPORTED
;
1271
#endif
1272
1273
#if defined(INCLUDE_L3)
1274
/***************************************************************************/
1288
extern
int
opennsl_mpls_label_stat_sync_get
(
1289
int
unit,
1290
opennsl_mpls_label_t
label,
1291
opennsl_gport_t
port
,
1292
opennsl_mpls_stat_t
stat,
1293
uint64
*val)
LIB_DLL_EXPORTED
;
1294
#endif
1295
1296
#if defined(INCLUDE_L3)
1297
/***************************************************************************/
1315
extern
int
opennsl_mpls_label_stat_get32
(
1316
int
unit,
1317
opennsl_mpls_label_t
label,
1318
opennsl_gport_t
port
,
1319
opennsl_mpls_stat_t
stat,
1320
uint32
*val)
LIB_DLL_EXPORTED
;
1321
#endif
1322
1323
#if defined(INCLUDE_L3)
1324
/***************************************************************************/
1338
extern
int
opennsl_mpls_label_stat_sync_get32
(
1339
int
unit,
1340
opennsl_mpls_label_t
label,
1341
opennsl_gport_t
port
,
1342
opennsl_mpls_stat_t
stat,
1343
uint32
*val)
LIB_DLL_EXPORTED
;
1344
#endif
1345
1346
#if defined(INCLUDE_L3)
1347
/***************************************************************************/
1364
extern
int
opennsl_mpls_label_stat_clear
(
1365
int
unit,
1366
opennsl_mpls_label_t
label,
1367
opennsl_gport_t
port
,
1368
opennsl_mpls_stat_t
stat)
LIB_DLL_EXPORTED
;
1369
#endif
1370
1371
#if defined(INCLUDE_L3)
1372
/***************************************************************************/
1383
extern
int
opennsl_mpls_port_stat_enable_set
(
1384
int
unit,
1385
opennsl_gport_t
mpls_port,
1386
int
enable)
LIB_DLL_EXPORTED
;
1387
#endif
1388
1389
#if defined(INCLUDE_L3)
1390
1391
typedef
enum
opennsl_mpls_port_stat_e
{
1392
opennslMplsPortStatUnicastPackets
= 0,
1393
opennslMplsPortStatUnicastBytes
= 1,
1394
opennslMplsPortStatNonUnicastPackets
= 2,
1395
opennslMplsPortStatNonUnicastBytes
= 3,
1396
opennslMplsPortStatDropPackets
= 4,
1397
opennslMplsPortStatDropBytes
= 5,
1398
opennslMplsPortStatFloodPackets
= 6,
1399
opennslMplsPortStatFloodBytes
= 7,
1400
opennslMplsPortStatFloodDropPackets
= 8,
1401
opennslMplsPortStatFloodDropBytes
= 9,
1402
opennslMplsPortStatGreenPackets
= 10,
1403
opennslMplsPortStatGreenBytes
= 11,
1404
opennslMplsPortStatYellowPackets
= 12,
1405
opennslMplsPortStatYellowBytes
= 13,
1406
opennslMplsPortStatRedPackets
= 14,
1407
opennslMplsPortStatRedBytes
= 15
1408
}
opennsl_mpls_port_stat_t
;
1409
/* __doxy_func_body_end__ */
1410
#endif
1411
1412
#if defined(INCLUDE_L3)
1413
/***************************************************************************/
1426
extern
int
opennsl_mpls_port_stat_set
(
1427
int
unit,
1428
opennsl_gport_t
mpls_port,
1429
opennsl_cos_t
cos,
1430
opennsl_mpls_port_stat_t
stat,
1431
uint64
val)
LIB_DLL_EXPORTED
;
1432
#endif
1433
1434
#if defined(INCLUDE_L3)
1435
/***************************************************************************/
1446
extern
int
opennsl_mpls_port_stat_set32
(
1447
int
unit,
1448
opennsl_gport_t
mpls_port,
1449
opennsl_cos_t
cos,
1450
opennsl_mpls_port_stat_t
stat,
1451
uint32
val)
LIB_DLL_EXPORTED
;
1452
#endif
1453
1454
#if defined(INCLUDE_L3)
1455
/***************************************************************************/
1468
extern
int
opennsl_mpls_port_stat_get
(
1469
int
unit,
1470
opennsl_gport_t
mpls_port,
1471
opennsl_cos_t
cos,
1472
opennsl_mpls_port_stat_t
stat,
1473
uint64
*val)
LIB_DLL_EXPORTED
;
1474
#endif
1475
1476
#if defined(INCLUDE_L3)
1477
/***************************************************************************/
1490
extern
int
opennsl_mpls_port_stat_get32
(
1491
int
unit,
1492
opennsl_gport_t
mpls_port,
1493
opennsl_cos_t
cos,
1494
opennsl_mpls_port_stat_t
stat,
1495
uint32
*val)
LIB_DLL_EXPORTED
;
1496
#endif
1497
1498
#if defined(INCLUDE_L3)
1499
/***************************************************************************/
1514
extern
int
opennsl_mpls_port_stat_id_get
(
1515
int
unit,
1516
opennsl_vpn_t
vpn,
1517
opennsl_gport_t
port
,
1518
opennsl_mpls_stat_t
stat,
1519
uint32
*stat_counter_id)
LIB_DLL_EXPORTED
;
1520
#endif
1521
1522
#if defined(INCLUDE_L3)
1523
/***************************************************************************/
1538
extern
int
opennsl_mpls_label_stat_id_get
(
1539
int
unit,
1540
opennsl_mpls_label_t
label,
1541
opennsl_gport_t
port
,
1542
opennsl_mpls_stat_t
stat,
1543
uint32
*stat_counter_id)
LIB_DLL_EXPORTED
;
1544
#endif
1545
1546
#if defined(INCLUDE_L3)
1547
/***************************************************************************/
1561
extern
int
opennsl_mpls_port_stat_attach
(
1562
int
unit,
1563
opennsl_vpn_t
vpn,
1564
opennsl_gport_t
port
,
1565
uint32
stat_counter_id)
LIB_DLL_EXPORTED
;
1566
#endif
1567
1568
#if defined(INCLUDE_L3)
1569
/***************************************************************************/
1582
extern
int
opennsl_mpls_port_stat_detach
(
1583
int
unit,
1584
opennsl_vpn_t
vpn,
1585
opennsl_gport_t
port
)
LIB_DLL_EXPORTED
;
1586
#endif
1587
1588
#if defined(INCLUDE_L3)
1589
/***************************************************************************/
1607
extern
int
opennsl_mpls_port_stat_counter_get
(
1608
int
unit,
1609
opennsl_vpn_t
vpn,
1610
opennsl_gport_t
port
,
1611
opennsl_mpls_stat_t
stat,
1612
uint32
num_entries,
1613
uint32
*counter_indexes,
1614
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1615
#endif
1616
1617
#if defined(INCLUDE_L3)
1618
/***************************************************************************/
1637
extern
int
opennsl_mpls_port_stat_counter_sync_get
(
1638
int
unit,
1639
opennsl_vpn_t
vpn,
1640
opennsl_gport_t
port
,
1641
opennsl_mpls_stat_t
stat,
1642
uint32
num_entries,
1643
uint32
*counter_indexes,
1644
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1645
#endif
1646
1647
#if defined(INCLUDE_L3)
1648
/***************************************************************************/
1665
extern
int
opennsl_mpls_port_stat_counter_set
(
1666
int
unit,
1667
opennsl_vpn_t
vpn,
1668
opennsl_gport_t
port
,
1669
opennsl_mpls_stat_t
stat,
1670
uint32
num_entries,
1671
uint32
*counter_indexes,
1672
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1673
#endif
1674
1675
#if defined(INCLUDE_L3)
1676
/***************************************************************************/
1690
extern
int
opennsl_mpls_label_stat_attach
(
1691
int
unit,
1692
opennsl_mpls_label_t
label,
1693
opennsl_gport_t
port
,
1694
uint32
stat_counter_id)
LIB_DLL_EXPORTED
;
1695
#endif
1696
1697
#if defined(INCLUDE_L3)
1698
/***************************************************************************/
1711
extern
int
opennsl_mpls_label_stat_detach
(
1712
int
unit,
1713
opennsl_mpls_label_t
label,
1714
opennsl_gport_t
port
)
LIB_DLL_EXPORTED
;
1715
#endif
1716
1717
#if defined(INCLUDE_L3)
1718
/***************************************************************************/
1736
extern
int
opennsl_mpls_label_stat_counter_sync_get
(
1737
int
unit,
1738
opennsl_mpls_label_t
label,
1739
opennsl_gport_t
port
,
1740
opennsl_mpls_stat_t
stat,
1741
uint32
num_entries,
1742
uint32
*counter_indexes,
1743
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1744
#endif
1745
1746
#if defined(INCLUDE_L3)
1747
/***************************************************************************/
1765
extern
int
opennsl_mpls_label_stat_counter_get
(
1766
int
unit,
1767
opennsl_mpls_label_t
label,
1768
opennsl_gport_t
port
,
1769
opennsl_mpls_stat_t
stat,
1770
uint32
num_entries,
1771
uint32
*counter_indexes,
1772
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1773
#endif
1774
1775
#if defined(INCLUDE_L3)
1776
/***************************************************************************/
1794
extern
int
opennsl_mpls_label_stat_counter_set
(
1795
int
unit,
1796
opennsl_mpls_label_t
label,
1797
opennsl_gport_t
port
,
1798
opennsl_mpls_stat_t
stat,
1799
uint32
num_entries,
1800
uint32
*counter_indexes,
1801
opennsl_stat_value_t
*counter_values)
LIB_DLL_EXPORTED
;
1802
#endif
1803
1804
#if defined(INCLUDE_L3)
1805
#endif
1806
#if defined(INCLUDE_L3)
1807
1808
typedef
struct
opennsl_mpls_range_action_s
{
1809
uint32
flags
;
1810
opennsl_mpls_label_t
compressed_label
;
1811
}
opennsl_mpls_range_action_t
;
1812
/* __doxy_func_body_end__ */
1813
#endif
1814
1815
#if defined(INCLUDE_L3)
1816
/***************************************************************************/
1828
extern
int
opennsl_mpls_range_action_add
(
1829
int
unit,
1830
opennsl_mpls_label_t
label_low,
1831
opennsl_mpls_label_t
label_high,
1832
opennsl_mpls_range_action_t
*action)
LIB_DLL_EXPORTED
;
1833
#endif
1834
1835
#if defined(INCLUDE_L3)
1836
/***************************************************************************/
1847
extern
int
opennsl_mpls_range_action_remove
(
1848
int
unit,
1849
opennsl_mpls_label_t
label_low,
1850
opennsl_mpls_label_t
label_high)
LIB_DLL_EXPORTED
;
1851
#endif
1852
1853
#if defined(INCLUDE_L3)
1854
/***************************************************************************/
1866
extern
int
opennsl_mpls_range_action_get
(
1867
int
unit,
1868
opennsl_mpls_label_t
label_low,
1869
opennsl_mpls_label_t
label_high,
1870
opennsl_mpls_range_action_t
*action)
LIB_DLL_EXPORTED
;
1871
#endif
1872
1873
#if defined(INCLUDE_L3)
1874
/***************************************************************************/
1883
extern
void
opennsl_mpls_range_action_t_init
(
1884
opennsl_mpls_range_action_t
*label)
LIB_DLL_EXPORTED
;
1885
#endif
1886
1887
#endif
/* __OPENNSL_MPLSX_H__ */
1888
© 2016-17 by Broadcom Limited. All rights reserved.