FD.io VPP
v21.01.1
Vector Packet Processing
fib_api.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 __FIB_API_H__
17
#define __FIB_API_H__
18
19
#include <
vnet/fib/fib_types.h
>
20
#include <
vnet/fib/fib_entry.h
>
21
#include <vnet/ip/ip.api_types.h>
22
23
/**
24
* Forward declare the API type, no need to include the generated api headers
25
*/
26
struct
_vl_api_fib_path;
27
struct
_vl_api_fib_prefix;
28
29
/**
30
* Encode and decode functions from the API types to internal types
31
*/
32
extern
void
fib_api_path_encode
(
const
fib_route_path_t
* api_rpath,
33
vl_api_fib_path_t *out);
34
extern
int
fib_api_path_decode
(vl_api_fib_path_t *in,
35
fib_route_path_t
*out);
36
37
extern
int
fib_api_table_id_decode
(
fib_protocol_t
fproto,
38
u32
table_id
,
39
u32
*fib_index);
40
41
/**
42
* Adding routes from the API
43
*/
44
extern
int
fib_api_route_add_del
(
u8
is_add,
45
u8
is_multipath,
46
u32
fib_index,
47
const
fib_prefix_t
*
prefix
,
48
fib_entry_flag_t
entry_flags
,
49
fib_route_path_t
*rpaths);
50
51
extern
u8
*
format_vl_api_fib_path
(
u8
* s, va_list * args);
52
53
54
extern
int
fib_proto_from_api_address_family
(vl_api_address_family_t af,
fib_protocol_t
*out);
55
extern
vl_api_address_family_t
fib_proto_to_api_address_family
(
fib_protocol_t
fproto);
56
57
#endif
/* __FIB_API_H__ */
format_vl_api_fib_path
u8 * format_vl_api_fib_path(u8 *s, va_list *args)
Definition:
fib_api.c:510
fib_route_path_t_
A representation of a path as described by a route producer.
Definition:
fib_types.h:500
prefix
vl_api_prefix_t prefix
Definition:
ip.api:144
fib_api_route_add_del
int fib_api_route_add_del(u8 is_add, u8 is_multipath, u32 fib_index, const fib_prefix_t *prefix, fib_entry_flag_t entry_flags, fib_route_path_t *rpaths)
Adding routes from the API.
Definition:
fib_api.c:460
u8
unsigned char u8
Definition:
types.h:56
fib_protocol_t
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
fib_proto_to_api_address_family
vl_api_address_family_t fib_proto_to_api_address_family(fib_protocol_t fproto)
Definition:
fib_api.c:557
fib_prefix_t_
Aggregate type for a prefix.
Definition:
fib_types.h:202
fib_proto_from_api_address_family
int fib_proto_from_api_address_family(vl_api_address_family_t af, fib_protocol_t *out)
Definition:
fib_api.c:541
u32
unsigned int u32
Definition:
types.h:88
fib_entry.h
fib_entry_flag_t
enum fib_entry_flag_t_ fib_entry_flag_t
fib_api_path_encode
void fib_api_path_encode(const fib_route_path_t *api_rpath, vl_api_fib_path_t *out)
Encode and decode functions from the API types to internal types.
Definition:
fib_api.c:359
fib_api_table_id_decode
int fib_api_table_id_decode(fib_protocol_t fproto, u32 table_id, u32 *fib_index)
Definition:
fib_api.c:45
fib_api_path_decode
int fib_api_path_decode(vl_api_fib_path_t *in, fib_route_path_t *out)
Definition:
fib_api.c:151
fib_types.h
table_id
u32 table_id
Definition:
wireguard.api:102
entry_flags
vl_api_mfib_entry_flags_t entry_flags
Definition:
ip.api:307
src
vnet
fib
fib_api.h
Generated on Wed Jul 14 2021 16:05:22 for FD.io VPP by
1.8.13