FD.io VPP  v16.06
Vector Packet Processing
control.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 VNET_CONTROL_H_
17 #define VNET_CONTROL_H_
18 
19 #include <vnet/vnet.h>
22 
23 typedef struct
24 {
29 
30 typedef struct
31 {
34  ip_address_t src_loc;
35  ip_address_t dst_loc;
36 } fwd_entry_t;
37 
38 typedef enum
39 {
43 
44 typedef struct
45 {
46  /* headers */
47  u8 data[100];
51 
52 typedef struct
53 {
54  /* LISP feature status */
56 
57  /* eid table */
59 
60  /* pool of mappings */
62 
63  /* pool of locators */
65 
66  /* pool of locator-sets */
68 
69  /* vector of locator-set vectors composed of and indexed by locator index */
71 
72  /* hash map of locators by name */
74 
75  /* vector of eid index vectors supported and indexed by locator-set index */
77 
78  /* vectors of indexes for local locator-sets and mappings */
81 
82  /* hash map of forwarding entries by mapping index */
84 
85  /* forwarding entries pool */
87 
88  /* hash map keyed by nonce of pending map-requests */
90 
91  /* pool of pending map requests */
93 
94  /* vector of map-resolver addresses */
95  ip_address_t * map_resolvers;
96 
97  /* Lookup vrf by vni */
99 
100  /* Number of src prefixes in a vni that use an interface */
102 
103  /* commodity */
109 
110 /* lisp-gpe control plane */
112 
115 
116 clib_error_t *
117 lisp_cp_init ();
118 
119 typedef struct
120 {
122  union
123  {
124  u8 * name;
126  };
130 
131 int
133  u32 * ls_index);
134 int
136  locator_set_t * ls, u32 * ls_index);
137 
138 typedef struct
139 {
143 
147 
150 
151 int
153  u32 * map_index);
154 int
156  u32 * map_index_result);
157 
158 typedef struct
159 {
161  ip_address_t address;
163 
164 int
166 
169  return &lisp_control_main;
170 }
171 
174 
175 int
177  ip_address_t * dlocs, u8 action, u8 is_add);
178 
179 #endif /* VNET_CONTROL_H_ */
uword * dp_if_refcount_by_vni
Definition: control.h:101
a
Definition: bitmap.h:393
int vnet_lisp_add_del_locator(vnet_lisp_add_del_locator_set_args_t *a, locator_set_t *ls, u32 *ls_index)
Definition: control.c:618
uword * table_id_by_vni
Definition: control.h:98
u32 * local_mappings_indexes
Definition: control.h:79
locator_t * locator_pool
Definition: control.h:64
int vnet_lisp_add_del_remote_mapping(gid_address_t *deid, gid_address_t *seid, ip_address_t *dlocs, u8 action, u8 is_add)
Adds/removes/updates static remote mapping.
Definition: control.c:275
Definition: control.h:30
struct _vlib_node_registration vlib_node_registration_t
clib_error_t * lisp_cp_init()
ip_address_t * map_resolvers
Definition: control.h:95
u32 ** locator_to_locator_sets
Definition: control.h:70
vlib_main_t * vlib_main
Definition: control.h:106
#define always_inline
Definition: clib.h:84
u32 * fwd_entry_by_mapping_index
Definition: control.h:83
gid_address_t src
Definition: control.h:25
ip6_main_t * im6
Definition: control.h:105
u8 vnet_lisp_enable_disable_status(void)
Definition: control.c:927
u32 * local_locator_set_indexes
Definition: control.h:80
gid_address_t seid
Definition: control.h:32
lisp_cp_main_t lisp_control_main
Definition: control.h:111
uword * pending_map_requests_by_nonce
Definition: control.h:89
gid_address_t deid
Definition: control.h:33
always_inline lisp_cp_main_t * vnet_lisp_cp_get_main()
Definition: control.h:168
int vnet_lisp_add_del_map_resolver(vnet_lisp_add_del_map_resolver_args_t *a)
Definition: control.c:1057
struct _gid_address_t gid_address_t
unsigned int u32
Definition: types.h:88
int vnet_lisp_add_del_local_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index_result)
Definition: control.c:131
gid_dictionary_t mapping_index_by_gid
Definition: control.h:58
locator_set_t * locator_set_pool
Definition: control.h:67
u32 ** locator_set_to_eids
Definition: control.h:76
fwd_entry_t * fwd_entry_pool
Definition: control.h:86
int vnet_lisp_add_del_mapping(vnet_lisp_add_del_mapping_args_t *a, u32 *map_index)
Definition: control.c:34
u64 uword
Definition: types.h:112
pending_map_request_t * pending_map_requests_pool
Definition: control.h:92
miss_packet_type_t
Definition: control.h:38
ip_address_t src_loc
Definition: control.h:34
unsigned char u8
Definition: types.h:56
mapping_t * mapping_pool
Definition: control.h:61
uword * locator_set_index_by_name
Definition: control.h:73
vlib_node_registration_t lisp_cp_input_node
(constructor) VLIB_REGISTER_NODE (lisp_cp_input_node)
Definition: control.c:2001
gid_address_t dst
Definition: control.h:26
vlib_node_registration_t lisp_cp_lookup_node
(constructor) VLIB_REGISTER_NODE (lisp_cp_lookup_node)
Definition: control.c:1547
ip_address_t dst_loc
Definition: control.h:35
clib_error_t * vnet_lisp_enable_disable(u8 is_enabled)
Definition: control.c:824
vnet_main_t * vnet_main
Definition: control.h:107
u32 length
Definition: control.h:48
ip4_main_t * im4
Definition: control.h:104
miss_packet_type_t type
Definition: control.h:49
int vnet_lisp_add_del_locator_set(vnet_lisp_add_del_locator_set_args_t *a, u32 *ls_index)
Definition: control.c:705