blob: d07d6caee66c1d6bbb1aac593af81634d3ed94c6 [file] [log] [blame]
Dave Barachb5e8a772016-12-06 12:04:42 -05001/*
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_API_H__
17#define __FIB_API_H__
18
19
20int
21add_del_route_check (fib_protocol_t table_proto,
22 u32 table_id,
23 u32 next_hop_sw_if_index,
Neale Rannsda78f952017-05-24 09:15:43 -070024 dpo_proto_t next_hop_table_proto,
Dave Barachb5e8a772016-12-06 12:04:42 -050025 u32 next_hop_table_id,
26 u8 create_missing_tables,
Neale Ranns0f26c5a2017-03-01 15:12:11 -080027 u8 is_rpf_id,
Dave Barachb5e8a772016-12-06 12:04:42 -050028 u32 * fib_index, u32 * next_hop_fib_index);
29
30int
31add_del_route_t_handler (u8 is_multipath,
32 u8 is_add,
33 u8 is_drop,
34 u8 is_unreach,
35 u8 is_prohibit,
36 u8 is_local,
Neale Ranns0f26c5a2017-03-01 15:12:11 -080037 u8 is_multicast,
Dave Barachb5e8a772016-12-06 12:04:42 -050038 u8 is_classify,
39 u32 classify_table_index,
40 u8 is_resolve_host,
41 u8 is_resolve_attached,
Neale Ranns0f26c5a2017-03-01 15:12:11 -080042 u8 is_interface_rx,
43 u8 is_rpf_id,
Dave Barachb5e8a772016-12-06 12:04:42 -050044 u32 fib_index,
45 const fib_prefix_t * prefix,
Neale Rannsda78f952017-05-24 09:15:43 -070046 dpo_proto_t next_hop_proto,
Dave Barachb5e8a772016-12-06 12:04:42 -050047 const ip46_address_t * next_hop,
48 u32 next_hop_sw_if_index,
49 u8 next_hop_fib_index,
Neale Ranns57b58602017-07-15 07:37:25 -070050 u16 next_hop_weight,
51 u16 next_hop_preference,
Dave Barachb5e8a772016-12-06 12:04:42 -050052 mpls_label_t next_hop_via_label,
53 mpls_label_t * next_hop_out_label_stack);
54
55void
56copy_fib_next_hop (fib_route_path_encode_t * api_rpath,
57 void * fp_arg);
58
59#endif /* __FIB_API_H__ */