FD.io VPP  v21.06-1-gbb7418cf9
Vector Packet Processing
fib_test.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_TEST_H__
17 #define __FIB_TEST_H__
18 
19 #include <vnet/fib/fib_types.h>
20 #include <vnet/mpls/mpls_types.h>
21 #include <vnet/fib/fib_types.h>
22 #include <vnet/mpls/packet.h>
23 #include <vnet/dpo/load_balance.h>
24 #include <vnet/adj/adj_types.h>
25 #include <vnet/dpo/replicate_dpo.h>
26 
42 
43 typedef struct fib_test_lb_bucket_t_ {
45 
46  union
47  {
48  struct
49  {
55  } label_o_adj;
56  struct
57  {
62  u8 ttl;
65  struct
66  {
71  u8 ttl;
74  struct
75  {
79  u8 ttl;
81  } label_o_lb;
82  struct
83  {
85  } adj;
86  struct
87  {
88  index_t lb;
89  } lb;
90  struct
91  {
92  index_t adj;
93  } special;
94  struct
95  {
96  union {
99  };
100  } bier;
101  };
103 
109 
110 typedef struct fib_test_rep_bucket_t_ {
112 
113  union
114  {
115  struct
116  {
121  } label_o_adj;
122  struct
123  {
125  } adj;
126  };
128 
129 
130 extern int fib_test_validate_rep_v(const replicate_t *rep,
131  u16 n_buckets,
132  va_list *ap);
133 
134 extern int fib_test_validate_lb_v(const load_balance_t *lb,
135  int n_buckets,
136  va_list *ap);
137 
138 extern int fib_test_validate_lb(const dpo_id_t *dpo,
139  int n_buckets,
140  ...);
141 
144  int n_buckets,
145  ...);
146 
147 
148 #endif
fib_mpls_lsp_mode_t mode
Definition: fib_test.h:52
The FIB DPO provieds;.
Definition: replicate_dpo.h:63
enum mpls_eos_bit_t_ mpls_eos_bit_t
int fib_test_validate_lb_v(const load_balance_t *lb, int n_buckets, va_list *ap)
int fib_test_validate_rep_v(const replicate_t *rep, u16 n_buckets, va_list *ap)
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
u32 mpls_label_t
A label value only, i.e.
Definition: packet.h:26
unsigned char u8
Definition: types.h:56
struct fib_test_lb_bucket_t_::@324::@328 label_stack_o_adj
struct fib_test_lb_bucket_t_::@324::@326 label_o_adj
struct fib_test_lb_bucket_t_::@324::@329 label_o_lb
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
Definition: dpo.h:172
adj_index_t adj
Definition: fib_test.h:54
unsigned short u16
Definition: types.h:57
enum fib_mpls_lsp_mode_t_ fib_mpls_lsp_mode_t
MPLS LSP mode - only valid at the head and tail.
int fib_test_validate_entry(fib_node_index_t fei, fib_forward_chain_type_t fct, int n_buckets,...)
The FIB DPO provieds;.
Definition: load_balance.h:106
struct fib_test_lb_bucket_t_::@324::@332 special
mpls_eos_bit_t eos
Definition: fib_test.h:117
int fib_test_validate_lb(const dpo_id_t *dpo, int n_buckets,...)
fib_test_rep_bucket_type_t type
Definition: fib_test.h:111
mpls_label_t label
Definition: fib_test.h:118
mpls_label_t label
Definition: fib_test.h:51
mpls_label_t label_stack[8]
Definition: fib_test.h:68
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:29
struct fib_test_lb_bucket_t_::@324::@327 label_chain_o_adj
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
mpls_label_t label_chain[8]
Definition: fib_test.h:59
enum fib_test_lb_bucket_type_t_ fib_test_lb_bucket_type_t
fib_test_lb_bucket_type_t type
Definition: fib_test.h:44
enum fib_forward_chain_type_t_ fib_forward_chain_type_t
FIB output chain type.
fib_test_rep_bucket_type_t_
Definition: fib_test.h:104
struct fib_test_lb_bucket_t_ fib_test_lb_bucket_t
struct fib_test_rep_bucket_t_ fib_test_rep_bucket_t
enum fib_test_rep_bucket_type_t_ fib_test_rep_bucket_type_t
fib_test_lb_bucket_type_t_
Definition: fib_test.h:27
struct fib_test_lb_bucket_t_::@324::@333 bier
mpls_eos_bit_t eos
Definition: fib_test.h:50