FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
mfib_signal.h
Go to the documentation of this file.
1 /*
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 __MFIB_SIGNAL_H__
17 #define __MFIB_SIGNAL_H__
18 
19 #include <vlib/vlib.h>
20 #include <vnet/mfib/mfib_types.h>
21 #include <vnet/mfib/mfib_itf.h>
22 #include <vnet/mfib/mfib_entry.h>
23 
24 #define MFIB_SIGNAL_BUFFER_SIZE 255
25 
26 /**
27  * A pair of indicies, for the entry and interface resp.
28  */
29 typedef struct mfib_signal_t_
30 {
33 
34  /**
35  * @brief A buffer copied from the DP plane that triggered the signal
36  */
38 
41 
42 
43 extern void mfib_signal_push(const mfib_entry_t *mfe,
44  mfib_itf_t *mfi,
45  vlib_buffer_t *b0);
46 extern void mfib_signal_remove_itf(const mfib_itf_t *mfi);
47 
48 extern void mfib_signal_module_init(void);
49 
51 
52 extern void vl_mfib_signal_send_one(struct vl_api_registration_ *q,
53  u32 context,
54  const mfib_signal_t *mfs);
55 extern int mfib_signal_send_one(struct vl_api_registration_ *reg,
56  u32 context);
57 
58 #endif
59 
vlib.h
mfib_entry.h
mfib_signal_t_
A pair of indicies, for the entry and interface resp.
Definition: mfib_signal.h:29
mfib_signal_t
struct mfib_signal_t_ mfib_signal_t
A pair of indicies, for the entry and interface resp.
mfib_signal_module_init
void mfib_signal_module_init(void)
Definition: mfib_signal.c:66
vl_api_registration_
An API client registration, only in vpp/vlib.
Definition: api_common.h:47
index_t
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:43
mfib_signal_remove_itf
void mfib_signal_remove_itf(const mfib_itf_t *mfi)
Definition: mfib_signal.c:184
fib_node_index_t
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
vl_mfib_signal_send_one
void vl_mfib_signal_send_one(struct vl_api_registration_ *q, u32 context, const mfib_signal_t *mfs)
Definition: ip_api.c:1318
mfib_signal_t_::mfs_itf
index_t mfs_itf
Definition: mfib_signal.h:32
mfib_signal_push
void mfib_signal_push(const mfib_entry_t *mfe, mfib_itf_t *mfi, vlib_buffer_t *b0)
Definition: mfib_signal.c:141
mfib_itf.h
mfib_signal_t_::mfs_buffer_len
u8 mfs_buffer_len
Definition: mfib_signal.h:39
u32
unsigned int u32
Definition: types.h:88
mfib_types.h
mfib_entry_t_
An entry in a FIB table.
Definition: mfib_entry.h:32
mfib_itf_t_
An interface associated with a particular MFIB entry.
Definition: mfib_itf.h:25
u8
unsigned char u8
Definition: types.h:56
mfib_signal_send_one
int mfib_signal_send_one(struct vl_api_registration_ *reg, u32 context)
Definition: mfib_signal.c:94
context
u32 context
Definition: ip.api:852
mfib_signal_t_::mfs_entry
fib_node_index_t mfs_entry
Definition: mfib_signal.h:31
mfib_signal_t_::mfs_buffer
u8 mfs_buffer[MFIB_SIGNAL_BUFFER_SIZE]
A buffer copied from the DP plane that triggered the signal.
Definition: mfib_signal.h:37
MFIB_SIGNAL_BUFFER_SIZE
#define MFIB_SIGNAL_BUFFER_SIZE
Definition: mfib_signal.h:24
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111