FD.io VPP  v21.01
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.0";
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 };
vl_api_fib_path_nh_t nh
Definition: fib_types.api:126
fib_path_type
Definition: fib_types.api:71
unsigned char u8
Definition: types.h:56
u8 preference
Definition: fib_types.api:121
u32 via_label
Definition: fib_types.api:64
typedef fib_path_nh
Definition: fib_types.api:60
option version
Definition: fib_types.api:17
typedef fib_path
FIB path.
Definition: fib_types.api:116
unsigned int u32
Definition: types.h:88
fib_path_nh_proto
brief A path's nexthop protocol
Definition: fib_types.api:32
vl_api_fib_path_type_t type
Definition: fib_types.api:123
u32 rpf_id
Definition: fib_types.api:119
typedef fib_mpls_label
MPLS label.
Definition: fib_types.api:23
u8 weight
Definition: fib_types.api:120
u32 label
Definition: fib_types.api:25
fib_path_flags
Flags for the path.
Definition: fib_types.api:43
u32 classify_table_index
Definition: fib_types.api:68
u32 obj_id
Definition: fib_types.api:66
u8 ttl
Definition: fib_types.api:26
u8 exp
Definition: fib_types.api:27
manual_print typedef address
Definition: ip_types.api:96
u8 n_labels
Definition: fib_types.api:127
vl_api_fib_mpls_label_t label_stack[16]
Definition: fib_types.api:128
u32 table_id
Definition: fib_types.api:118
vl_api_fib_path_flags_t flags
Definition: fib_types.api:124
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vl_api_fib_path_nh_proto_t proto
Definition: fib_types.api:125