FD.io VPP
v17.10-9-gd594711
Vector Packet Processing
Main Page
Related Pages
Modules
Data Structures
Source
Files
Symbols
policer_classify.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
#ifndef __included_vnet_policer_classify_h__
17
#define __included_vnet_policer_classify_h__
18
19
#include <
vlib/vlib.h
>
20
#include <
vnet/vnet.h
>
21
#include <
vnet/classify/vnet_classify.h
>
22
23
typedef
enum
{
24
POLICER_CLASSIFY_TABLE_IP4
,
25
POLICER_CLASSIFY_TABLE_IP6
,
26
POLICER_CLASSIFY_TABLE_L2
,
27
POLICER_CLASSIFY_N_TABLES
,
28
}
policer_classify_table_id_t
;
29
30
typedef
enum
{
31
POLICER_CLASSIFY_NEXT_INDEX_DROP
,
32
POLICER_CLASSIFY_NEXT_INDEX_N_NEXT
,
33
}
policer_classify_next_index_t
;
34
35
typedef
struct
{
36
/* Classifier table vectors */
37
u32
* classify_table_index_by_sw_if_index [
POLICER_CLASSIFY_N_TABLES
];
38
39
/* L2 next nodes for each feature */
40
u32
feat_next_node_index[32];
41
42
/* Convenience variables */
43
vlib_main_t
*
vlib_main
;
44
vnet_main_t
*
vnet_main
;
45
vnet_classify_main_t
*
vnet_classify_main
;
46
vnet_config_main_t
* vnet_config_main [
POLICER_CLASSIFY_N_TABLES
];
47
}
policer_classify_main_t
;
48
49
policer_classify_main_t
policer_classify_main
;
50
51
int
vnet_set_policer_classify_intfc
(
vlib_main_t
*
vm
,
u32
sw_if_index,
52
u32
ip4_table_index,
u32
ip6_table_index,
53
u32
l2_table_index,
u32
is_add);
54
55
#endif
/* __included_vnet_policer_classify_h__ */
POLICER_CLASSIFY_NEXT_INDEX_N_NEXT
Definition:
policer_classify.h:32
POLICER_CLASSIFY_N_TABLES
Definition:
policer_classify.h:27
policer_classify_table_id_t
policer_classify_table_id_t
Definition:
policer_classify.h:23
POLICER_CLASSIFY_TABLE_L2
Definition:
policer_classify.h:26
POLICER_CLASSIFY_NEXT_INDEX_DROP
Definition:
policer_classify.h:31
vnet_set_policer_classify_intfc
int vnet_set_policer_classify_intfc(vlib_main_t *vm, u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 l2_table_index, u32 is_add)
Definition:
policer_classify.c:53
policer_classify_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
policer_classify.h:44
vnet_config_main_t
Definition:
config.h:86
policer_classify_main_t
Definition:
policer_classify.h:35
policer_classify_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
policer_classify.h:43
vnet.h
vm
vlib_main_t * vm
Definition:
buffer.c:283
vnet_classify.h
vlib.h
POLICER_CLASSIFY_TABLE_IP4
Definition:
policer_classify.h:24
vnet_classify_main_t
struct _vnet_classify_main vnet_classify_main_t
Definition:
vnet_classify.h:72
POLICER_CLASSIFY_TABLE_IP6
Definition:
policer_classify.h:25
vnet_main_t
Definition:
vnet.h:51
u32
unsigned int u32
Definition:
types.h:88
policer_classify_next_index_t
policer_classify_next_index_t
Definition:
policer_classify.h:30
policer_classify_main_t::vnet_classify_main
vnet_classify_main_t * vnet_classify_main
Definition:
policer_classify.h:45
vlib_main_t
Definition:
main.h:59
policer_classify_main
policer_classify_main_t policer_classify_main
Definition:
policer_classify.h:49
src
vnet
classify
policer_classify.h
Generated on Tue Nov 14 2017 05:38:12 for FD.io VPP by
1.8.11