blob: a60ad26dc646e9ed660333c2606eb8fe08e04a34 [file] [log] [blame]
Neale Ranns0bfe5d82016-08-25 15:29:12 +01001/*
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 __FIB_INTERNAL_H__
17#define __FIB_INTERNAL_H__
18
19#include <vnet/ip/ip.h>
20#include <vnet/dpo/dpo.h>
21
Neale Rannsad422ed2016-11-02 14:20:04 +000022extern void fib_prefix_from_mpls_label(mpls_label_t label,
Neale Ranns0f26c5a2017-03-01 15:12:11 -080023 mpls_eos_bit_t eos,
Neale Rannsad422ed2016-11-02 14:20:04 +000024 fib_prefix_t *prf);
25
Neale Ranns0bfe5d82016-08-25 15:29:12 +010026extern int fib_route_path_cmp(const fib_route_path_t *rpath1,
27 const fib_route_path_t *rpath2);
28
29/**
30 * @brief
31 * Add or update an entry in the FIB's forwarding table.
32 * This is called from the fib_entry code. It is not meant to be used
33 * by the client/source.
34 *
35 * @param fib_index
36 * The index of the FIB
37 *
38 * @param prefix
39 * The prefix for the entry to add/update
40 *
41 * @param dpo
42 * The data-path object to use for forwarding
43 */
44extern void fib_table_fwding_dpo_update(u32 fib_index,
45 const fib_prefix_t *prefix,
46 const dpo_id_t *dpo);
47/**
48 * @brief
49 * remove an entry in the FIB's forwarding table
50 *
51 * @param fib_index
52 * The index of the FIB
53 *
54 * @param prefix
55 * The prefix for the entry to add/update
56 *
57 * @param dpo
58 * The data-path object to use for forwarding
59 */
60extern void fib_table_fwding_dpo_remove(u32 fib_index,
61 const fib_prefix_t *prefix,
62 const dpo_id_t *dpo);
63
64
65#endif