FD.io VPP  v18.01.2-1-g9b554f3
Vector Packet Processing
fib_entry_src_special.c
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 #include "fib_entry.h"
17 #include "fib_entry_src.h"
18 
19 /**
20  * Source initialisation Function
21  */
22 static void
24 {
26 }
27 
28 /**
29  * Source deinitialisation Function
30  */
31 static void
33 {
34 }
35 
36 static void
38 {
40 }
41 
42 static void
44  const fib_entry_t *entry,
46  dpo_proto_t proto,
47  const dpo_id_t *dpo)
48 {
49  src->fes_pl =
52  dpo);
53 }
54 
55 const static fib_entry_src_vft_t special_src_vft = {
57  .fesv_deinit = fib_entry_src_special_deinit,
58  .fesv_add = fib_entry_src_special_add,
59  .fesv_remove = fib_entry_src_special_remove,
60 };
61 
62 void
64 {
65  fib_entry_src_register(FIB_SOURCE_SPECIAL, &special_src_vft);
66  fib_entry_src_register(FIB_SOURCE_MAP, &special_src_vft);
67  fib_entry_src_register(FIB_SOURCE_SIXRD, &special_src_vft);
69  fib_entry_src_register(FIB_SOURCE_AE, &special_src_vft);
70  fib_entry_src_register(FIB_SOURCE_PROXY, &special_src_vft);
71  fib_entry_src_register(FIB_SOURCE_BIER, &special_src_vft);
72 }
fib_entry_src_init_t fesv_init
An entry in a FIB table.
Definition: fib_entry.h:385
Virtual function table each FIB entry source will register.
Information related to the source of a FIB entry.
Definition: fib_entry.h:294
fib_node_index_t fib_path_list_create_special(dpo_proto_t nh_proto, fib_path_list_flags_t flags, const dpo_id_t *dpo)
Attached Export source.
Definition: fib_entry.h:112
SIXRD.
Definition: fib_entry.h:86
IPv[46] Mapping.
Definition: fib_entry.h:82
enum dpo_proto_t_ dpo_proto_t
Data path protocol.
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:166
From the BIER subsystem.
Definition: fib_entry.h:66
static void fib_entry_src_special_add(fib_entry_src_t *src, const fib_entry_t *entry, fib_entry_flag_t flags, dpo_proto_t proto, const dpo_id_t *dpo)
static void fib_entry_src_special_deinit(fib_entry_src_t *src)
Source deinitialisation Function.
static void fib_entry_src_special_remove(fib_entry_src_t *src)
Definition: fib_entry.h:279
void fib_entry_src_special_register(void)
fib_path_list_flags_t fib_entry_src_flags_2_path_list_flags(fib_entry_flag_t eflags)
enum fib_entry_flag_t_ fib_entry_flag_t
fib_entry_src_flag_t fes_flags
Flags on the source.
Definition: fib_entry.h:311
Classify.
Definition: fib_entry.h:44
void fib_entry_src_register(fib_source_t source, const fib_entry_src_vft_t *vft)
Definition: fib_entry_src.c:33
fib_node_index_t fes_pl
The path-list created by the source.
Definition: fib_entry.h:303
#define FIB_NODE_INDEX_INVALID
Definition: fib_types.h:30
A route the is being 'proxied' on behalf of another device.
Definition: fib_entry.h:48
Special sources.
Definition: fib_entry.h:40
u32 flags
Definition: vhost-user.h:77
static void fib_entry_src_special_init(fib_entry_src_t *src)
Source initialisation Function.