FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
fib_types.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 option version = "2.0.1";
18 import "vnet/ip/ip_types.api";
19 
20 /** \brief MPLS label
21 */
22 typedef fib_mpls_label
23 {
24  u8 is_uniform;
28 };
29 
30 /** brief A path's nexthop protocol
31  */
33 {
39 };
40 
41 /** \brief Flags for the path
42  */
44 {
46  /* the path must resolve via an attached route */
48  /* the path must resolve via a host route */
50  /* pop a Pseudo Wire Control Word as well */
52 };
53 
54 /* \brief A description of the 'next-hop' for a path
55  * this can be something that needs resolving like an IP address
56  * (into an adjacency or another FIB entry) or the index of another
57  * VPP object that was previously created (i.e. a UDP encap object)
58  */
59 typedef fib_path_nh
60 {
61  /* proto = IP[46] */
62  vl_api_address_union_t address;
63  /* proto = MPLS */
65  /* proto = ANY, determined by path type */
67  /* path-type = CLASSIFY */
69 };
70 
72 {
73  /* Normal Paths */
75  /* local/for-us/receive = packet sent to VPP's L4 stack */
77  /* packet is dropped */
79  /* Packet is UDP encapped - set obj_id in fib_path_nh_id */
81  /* Packet is BIER encapped - set obj_id in fib_path_nh_id */
83  /* packet will generated ICMP unreach to sender */
85  /* packet will generated ICMP prohibt to sender */
87  /* perform a lookup based on the packet's source address */
89  /* Distributed Virtual router, packet is forwarded with the original
90  L2 header unchanged */
92  /* packet's RX interface is changed */
94  /* packet will be sent to a classify table */
96 };
97 
98 /** \brief FIB path
99  @param sw_if_index - index of the interface
100  @param table_id - The table ID in which to find the next-hop address
101  (for recursive routes, i.e. when the interface is
102  not given)
103  @param weight - The weight, for UCMP
104  @param preference - The preference of the path. lowest preference
105  is prefered
106  @param rpf-id - For paths that pop to multicast, this the the
107  RPF ID the packet will be given (0 and ~0 => unset)
108  @param type - the path type
109  @param flags - path flags
110  @param proto - protocol that describes the next-hop address
111  @param nh - the next-hop/net resolving object
112  @param n_labels - the number of labels present in the stack
113  @param label_stack - a stack of MPLS labels
114 */
115 typedef fib_path
116 {
122 
123  vl_api_fib_path_type_t type;
124  vl_api_fib_path_flags_t flags;
125  vl_api_fib_path_nh_proto_t proto;
126  vl_api_fib_path_nh_t nh;
128  vl_api_fib_mpls_label_t label_stack[16];
129 };
FIB_API_PATH_TYPE_DROP
@ FIB_API_PATH_TYPE_DROP
Definition: fib_types.api:78
weight
u8 weight
Definition: fib_types.api:120
label
u32 label
Definition: fib_types.api:25
ttl
u8 ttl
Definition: fib_types.api:26
FIB_API_PATH_TYPE_CLASSIFY
@ FIB_API_PATH_TYPE_CLASSIFY
Definition: fib_types.api:95
exp
u8 exp
Definition: fib_types.api:27
FIB_API_PATH_TYPE_ICMP_UNREACH
@ FIB_API_PATH_TYPE_ICMP_UNREACH
Definition: fib_types.api:84
FIB_API_PATH_NH_PROTO_BIER
@ FIB_API_PATH_NH_PROTO_BIER
Definition: fib_types.api:38
n_labels
u8 n_labels
Definition: fib_types.api:127
label_stack
vl_api_fib_mpls_label_t label_stack[16]
Definition: fib_types.api:128
FIB_API_PATH_NH_PROTO_IP4
@ FIB_API_PATH_NH_PROTO_IP4
Definition: fib_types.api:34
table_id
u32 table_id
Definition: fib_types.api:118
proto
vl_api_fib_path_nh_proto_t proto
Definition: fib_types.api:125
FIB_API_PATH_FLAG_NONE
@ FIB_API_PATH_FLAG_NONE
Definition: fib_types.api:45
FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED
@ FIB_API_PATH_FLAG_RESOLVE_VIA_ATTACHED
Definition: fib_types.api:47
flags
vl_api_fib_path_flags_t flags
Definition: fib_types.api:124
address
manual_print typedef address
Definition: ip_types.api:96
nh
vl_api_fib_path_nh_t nh
Definition: fib_types.api:126
FIB_API_PATH_NH_PROTO_ETHERNET
@ FIB_API_PATH_NH_PROTO_ETHERNET
Definition: fib_types.api:37
fib_path_type
fib_path_type
Definition: fib_types.api:71
FIB_API_PATH_TYPE_DVR
@ FIB_API_PATH_TYPE_DVR
Definition: fib_types.api:91
u32
unsigned int u32
Definition: types.h:88
FIB_API_PATH_FLAG_RESOLVE_VIA_HOST
@ FIB_API_PATH_FLAG_RESOLVE_VIA_HOST
Definition: fib_types.api:49
FIB_API_PATH_TYPE_INTERFACE_RX
@ FIB_API_PATH_TYPE_INTERFACE_RX
Definition: fib_types.api:93
FIB_API_PATH_NH_PROTO_IP6
@ FIB_API_PATH_NH_PROTO_IP6
Definition: fib_types.api:35
preference
u8 preference
Definition: fib_types.api:121
FIB_API_PATH_TYPE_UDP_ENCAP
@ FIB_API_PATH_TYPE_UDP_ENCAP
Definition: fib_types.api:80
FIB_API_PATH_TYPE_BIER_IMP
@ FIB_API_PATH_TYPE_BIER_IMP
Definition: fib_types.api:82
via_label
u32 via_label
Definition: fib_types.api:64
FIB_API_PATH_FLAG_POP_PW_CW
@ FIB_API_PATH_FLAG_POP_PW_CW
Definition: fib_types.api:51
fib_path_nh
typedef fib_path_nh
Definition: fib_types.api:60
fib_path
typedef fib_path
FIB path.
Definition: fib_types.api:116
FIB_API_PATH_TYPE_NORMAL
@ FIB_API_PATH_TYPE_NORMAL
Definition: fib_types.api:74
FIB_API_PATH_TYPE_ICMP_PROHIBIT
@ FIB_API_PATH_TYPE_ICMP_PROHIBIT
Definition: fib_types.api:86
FIB_API_PATH_TYPE_LOCAL
@ FIB_API_PATH_TYPE_LOCAL
Definition: fib_types.api:76
u8
unsigned char u8
Definition: types.h:56
fib_path_nh_proto
fib_path_nh_proto
brief A path's nexthop protocol
Definition: fib_types.api:32
version
option version
Definition: fib_types.api:17
FIB_API_PATH_NH_PROTO_MPLS
@ FIB_API_PATH_NH_PROTO_MPLS
Definition: fib_types.api:36
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
fib_mpls_label
typedef fib_mpls_label
MPLS label.
Definition: fib_types.api:23
rpf_id
u32 rpf_id
Definition: fib_types.api:119
FIB_API_PATH_TYPE_SOURCE_LOOKUP
@ FIB_API_PATH_TYPE_SOURCE_LOOKUP
Definition: fib_types.api:88
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
fib_path_flags
fib_path_flags
Flags for the path.
Definition: fib_types.api:43
classify_table_index
u32 classify_table_index
Definition: fib_types.api:68
obj_id
u32 obj_id
Definition: fib_types.api:66