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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef __IP6_LL_TABLE_H__
17 #define __IP6_LL_TABLE_H__
19 #include <vnet/ip/ip.h>
21 #include <vnet/ip/ip6_ll_types.h>
25 * A protocol Independent IP multicast FIB table
27 typedef struct ip6_ll_table_t_
30 * A vector, indexed by sw_if_index, of unicast IPv6 FIBs
35 * Total route counters
37 u32 ilt_total_route_counts;
43 * Perfom a longest prefix match in the non-forwarding table
46 * The prefix to lookup
49 * The index of the fib_entry_t for the best match, which may be the default route
51 extern fib_node_index_t ip6_ll_table_lookup (const ip6_ll_prefix_t * prefix);
55 * Perfom an exact match in the non-forwarding table
58 * The prefix to lookup
61 * The index of the fib_entry_t for the exact match, or INVALID
62 * is there is no match.
64 extern fib_node_index_t ip6_ll_table_lookup_exact_match
65 (const ip6_ll_prefix_t * prefix);
69 * Update an entry in the table. The falgs determine if the entry is
70 * LOCAL, in which case it's a receive, or not, in which case the entry
71 * will link to an adjacency.
74 * The prefix for the entry to add
77 * the index of the fib_entry_t that is created (or existed already).
79 extern fib_node_index_t ip6_ll_table_entry_update
80 (const ip6_ll_prefix_t * prefix, fib_route_path_flags_t flags);
84 * Delete a IP6 link-local entry.
87 * The prefix for the entry to remove
89 extern void ip6_ll_table_entry_delete (const ip6_ll_prefix_t * prefix);
92 * @brief For use in the data plane. Get the underlying ip6 FIB
94 extern u32 ip6_ll_fib_get (u32 sw_if_index);
97 * fd.io coding-style-patch-verification: ON
100 * eval: (c-set-style "gnu")