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:
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 __MFIB_ITF_H__
17 #define __MFIB_ITF_H__
19 #include <vlib/vlib.h>
20 #include <vnet/mfib/mfib_types.h>
23 * @brief An interface associated with a particular MFIB entry
25 typedef struct mfib_itf_t_
28 * @brief Falags on the entry
30 mfib_itf_flags_t mfi_flags;
33 * The SW IF index that this MFIB interface represents
38 * The index of the signal in the pending list
44 extern index_t mfib_itf_create(u32 sw_if_index,
45 mfib_itf_flags_t mfi_flags);
46 extern void mfib_itf_delete(mfib_itf_t *mfi);
48 extern u8 *format_mfib_itf(u8 * s, va_list * args);
50 extern mfib_itf_t *mfib_itf_pool;
52 static inline mfib_itf_t *
53 mfib_itf_get (index_t mi)
55 return (pool_elt_at_index(mfib_itf_pool, mi));
58 mfib_itf_get_index (const mfib_itf_t *mfi)
60 return (mfi - mfib_itf_pool);