FD.io VPP
v16.09
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
l2_classify.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 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_l2_classify_h__
17
#define __included_vnet_l2_classify_h__
18
19
#include <
vlib/vlib.h
>
20
#include <
vnet/vnet.h
>
21
#include <
vnet/pg/pg.h
>
22
#include <
vnet/ethernet/ethernet.h
>
23
#include <
vnet/ethernet/packet.h
>
24
#include <
vnet/ip/ip_packet.h
>
25
#include <
vnet/ip/ip4_packet.h
>
26
#include <
vnet/ip/ip6_packet.h
>
27
#include <
vlib/cli.h
>
28
#include <
vnet/l2/l2_input.h
>
29
#include <
vnet/l2/feat_bitmap.h
>
30
#include <
vppinfra/error.h
>
31
#include <
vppinfra/hash.h
>
32
#include <
vppinfra/cache.h
>
33
34
#include <
vnet/classify/vnet_classify.h
>
35
36
typedef
enum
37
{
38
L2_CLASSIFY_NEXT_DROP
,
39
L2_CLASSIFY_NEXT_ETHERNET_INPUT
,
40
L2_CLASSIFY_NEXT_IP4_INPUT
,
41
L2_CLASSIFY_NEXT_IP6_INPUT
,
42
L2_CLASSIFY_NEXT_LI
,
43
L2_CLASSIFY_N_NEXT
,
44
}
l2_classify_next_t
;
45
46
typedef
enum
47
{
48
L2_CLASSIFY_TABLE_IP4
,
49
L2_CLASSIFY_TABLE_IP6
,
50
L2_CLASSIFY_TABLE_OTHER
,
51
L2_CLASSIFY_N_TABLES
,
52
}
l2_classify_table_id_t
;
53
54
typedef
struct
55
{
56
57
/* Next nodes for each feature */
58
u32
feat_next_node_index[32];
59
60
/* Per-address-family classifier table vectors */
61
u32
*classify_table_index_by_sw_if_index[
L2_CLASSIFY_N_TABLES
];
62
63
/* convenience variables */
64
vlib_main_t
*
vlib_main
;
65
vnet_main_t
*
vnet_main
;
66
vnet_classify_main_t
*
vnet_classify_main
;
67
}
l2_classify_main_t
;
68
69
l2_classify_main_t
l2_classify_main
;
70
71
extern
vlib_node_registration_t
l2_classify_node
;
72
73
void
vnet_l2_classify_enable_disable
(
u32
sw_if_index,
int
enable_disable);
74
75
int
vnet_l2_classify_set_tables
(
u32
sw_if_index,
u32
ip4_table_index,
76
u32
ip6_table_index,
u32
other_table_index);
77
78
#endif
/* __included_vnet_l2_classify_h__ */
79
80
/*
81
* fd.io coding-style-patch-verification: ON
82
*
83
* Local Variables:
84
* eval: (c-set-style "gnu")
85
* End:
86
*/
error.h
ip6_packet.h
L2_CLASSIFY_N_NEXT
Definition:
l2_classify.h:43
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
L2_CLASSIFY_NEXT_IP6_INPUT
Definition:
l2_classify.h:41
vnet_l2_classify_set_tables
int vnet_l2_classify_set_tables(u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
Definition:
l2_classify.c:445
hash.h
feat_bitmap.h
l2_classify_next_t
l2_classify_next_t
Definition:
l2_classify.h:36
l2_input.h
vnet_l2_classify_enable_disable
void vnet_l2_classify_enable_disable(u32 sw_if_index, int enable_disable)
Definition:
l2_classify.c:433
L2_CLASSIFY_TABLE_IP6
Definition:
l2_classify.h:49
l2_classify_main_t::vnet_classify_main
vnet_classify_main_t * vnet_classify_main
Definition:
l2_classify.h:66
ip_packet.h
ethernet.h
ip4_packet.h
L2_CLASSIFY_NEXT_IP4_INPUT
Definition:
l2_classify.h:40
vnet.h
cache.h
l2_classify_main_t::vlib_main
vlib_main_t * vlib_main
Definition:
l2_classify.h:64
l2_classify_main_t::vnet_main
vnet_main_t * vnet_main
Definition:
l2_classify.h:65
L2_CLASSIFY_NEXT_LI
Definition:
l2_classify.h:42
L2_CLASSIFY_NEXT_ETHERNET_INPUT
Definition:
l2_classify.h:39
vnet_classify.h
L2_CLASSIFY_NEXT_DROP
Definition:
l2_classify.h:38
vlib.h
pg.h
vnet_classify_main_t
struct _vnet_classify_main vnet_classify_main_t
Definition:
vnet_classify.h:50
vnet_main_t
Definition:
vnet.h:59
L2_CLASSIFY_TABLE_IP4
Definition:
l2_classify.h:48
packet.h
u32
unsigned int u32
Definition:
types.h:88
cli.h
vlib_main_t
Definition:
main.h:59
l2_classify_table_id_t
l2_classify_table_id_t
Definition:
l2_classify.h:46
l2_classify_node
vlib_node_registration_t l2_classify_node
(constructor) VLIB_REGISTER_NODE (l2_classify_node)
Definition:
l2_classify.c:53
l2_classify_main_t
Definition:
l2_classify.h:54
L2_CLASSIFY_TABLE_OTHER
Definition:
l2_classify.h:50
L2_CLASSIFY_N_TABLES
Definition:
l2_classify.h:51
l2_classify_main
l2_classify_main_t l2_classify_main
Definition:
l2_classify.h:69
vnet
vnet
l2
l2_classify.h
Generated on Fri Nov 18 2016 06:17:54 for FD.io VPP by
1.8.11