FD.io VPP
v21.01.1
Vector Packet Processing
gbp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 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
/**
17
* Group Base Policy (GBP) defines:
18
* - endpoints: typically a VM or container that is connected to the
19
* virtual switch/router (i.e. to VPP)
20
* - endpoint-group: (EPG) a collection of endpoints
21
* - policy: rules determining which traffic can pass between EPGs a.k.a
22
* a 'contract'
23
*
24
* Here, policy is implemented via an ACL.
25
* EPG classification for transit packets is determined by:
26
* - source EPG: from the packet's input interface
27
* - destination EPG: from the packet's destination IP address.
28
*
29
*/
30
31
#ifndef __GBP_H__
32
#define __GBP_H__
33
34
#include <
plugins/acl/exports.h
>
35
36
#include <
plugins/gbp/gbp_types.h
>
37
#include <
plugins/gbp/gbp_endpoint.h
>
38
#include <
plugins/gbp/gbp_endpoint_group.h
>
39
#include <
plugins/gbp/gbp_subnet.h
>
40
#include <
plugins/gbp/gbp_recirc.h
>
41
42
typedef
struct
43
{
44
u32
gbp_acl_user_id
;
45
acl_plugin_methods_t
acl_plugin
;
46
}
gbp_main_t
;
47
48
extern
gbp_main_t
gbp_main
;
49
50
typedef
enum
gbp_policy_type_t_
51
{
52
GBP_POLICY_PORT
,
53
GBP_POLICY_MAC
,
54
GBP_POLICY_LPM
,
55
GBP_N_POLICY
56
#define GBP_N_POLICY GBP_N_POLICY
57
}
gbp_policy_type_t
;
58
59
/**
60
* Grouping of global data for the GBP source EPG classification feature
61
*/
62
typedef
struct
gbp_policy_main_t_
63
{
64
/**
65
* Next nodes for L2 output features
66
*/
67
u32
l2_output_feat_next
[
GBP_N_POLICY
][32];
68
}
gbp_policy_main_t
;
69
70
extern
gbp_policy_main_t
gbp_policy_main
;
71
72
#endif
73
74
/*
75
* fd.io coding-style-patch-verification: ON
76
*
77
* Local Variables:
78
* eval: (c-set-style "gnu")
79
* End:
80
*/
gbp_subnet.h
gbp_main_t::gbp_acl_user_id
u32 gbp_acl_user_id
Definition:
gbp.h:44
GBP_N_POLICY
#define GBP_N_POLICY
Definition:
gbp.h:56
exports.h
acl_plugin_methods_t
Definition:
exported_types.h:88
gbp_recirc.h
gbp_endpoint_group.h
gbp_policy_main
gbp_policy_main_t gbp_policy_main
Definition:
gbp_policy.c:20
u32
unsigned int u32
Definition:
types.h:88
GBP_POLICY_LPM
Definition:
gbp.h:54
gbp_types.h
gbp_policy_main_t_::l2_output_feat_next
u32 l2_output_feat_next[GBP_N_POLICY][32]
Next nodes for L2 output features.
Definition:
gbp.h:67
gbp_policy_type_t
enum gbp_policy_type_t_ gbp_policy_type_t
gbp_policy_type_t_
gbp_policy_type_t_
Definition:
gbp.h:50
gbp_main
gbp_main_t gbp_main
Definition:
gbp_api.c:46
gbp_policy_main_t
struct gbp_policy_main_t_ gbp_policy_main_t
Grouping of global data for the GBP source EPG classification feature.
GBP_POLICY_PORT
Definition:
gbp.h:52
gbp_main_t::acl_plugin
acl_plugin_methods_t acl_plugin
Definition:
gbp.h:45
gbp_endpoint.h
gbp_main_t
Group Base Policy (GBP) defines:
Definition:
gbp.h:42
gbp_policy_main_t_
Grouping of global data for the GBP source EPG classification feature.
Definition:
gbp.h:62
GBP_POLICY_MAC
Definition:
gbp.h:53
src
plugins
gbp
gbp.h
Generated on Wed Jul 14 2021 16:03:55 for FD.io VPP by
1.8.13