2 * nhrp.h: next-hop resolution
4 * Copyright (c) 2016 Cisco and/or its affiliates.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 #include <vnet/ip/ip.h>
23 typedef struct nhrp_key_t_
25 ip46_address_t nk_peer;
29 typedef struct nhrp_entry_t_
36 extern u8 *format_nhrp_entry (u8 * s, va_list * args);
38 extern int nhrp_entry_add (u32 sw_if_index,
39 const ip46_address_t * peer,
40 u32 nh_table_id, const ip46_address_t * nh);
42 extern int nhrp_entry_del (u32 sw_if_index, const ip46_address_t * peer);
44 extern nhrp_entry_t *nhrp_entry_find (u32 sw_if_index,
45 const ip46_address_t * peer);
46 extern nhrp_entry_t *nhrp_entry_get (index_t nei);
48 extern void nhrp_entry_adj_stack (const nhrp_entry_t * ne, adj_index_t ai);
50 typedef walk_rc_t (*nhrp_walk_cb_t) (index_t nei, void *ctx);
52 extern void nhrp_walk (nhrp_walk_cb_t fn, void *ctx);
57 * fd.io coding-style-patch-verification: ON
60 * eval: (c-set-style "gnu")