FD.io VPP  v18.07-34-g55fbdb9
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 
41 
42 typedef struct fib_test_lb_bucket_t_ {
44 
45  union
46  {
47  struct
48  {
54  } label_o_adj;
55  struct
56  {
61  u8 ttl;
64  struct
65  {
69  u8 ttl;
71  } label_o_lb;
72  struct
73  {
75  } adj;
76  struct
77  {
78  index_t lb;
79  } lb;
80  struct
81  {
82  index_t adj;
83  } special;
84  struct
85  {
86  union {
89  };
90  } bier;
91  };
93 
99 
100 typedef struct fib_test_rep_bucket_t_ {
102 
103  union
104  {
105  struct
106  {
111  } label_o_adj;
112  struct
113  {
115  } adj;
116  };
118 
119 
120 extern int fib_test_validate_rep_v(const replicate_t *rep,
121  u16 n_buckets,
122  va_list *ap);
123 
124 extern int fib_test_validate_lb_v(const load_balance_t *lb,
125  int n_buckets,
126  va_list *ap);
127 
128 extern int fib_test_validate_lb(const dpo_id_t *dpo,
129  int n_buckets,
130  ...);
131 
134  int n_buckets,
135  ...);
136 
137 
138 #endif
fib_mpls_lsp_mode_t mode
Definition: fib_test.h:51
struct fib_test_lb_bucket_t_::@159::@161 label_o_adj
The FIB DPO provieds;.
Definition: replicate_dpo.h:54
struct fib_test_lb_bucket_t_::@159::@166 special
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 mpls_label_t
A label value only, i.e.
Definition: packet.h:24
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:41
unsigned char u8
Definition: types.h:56
struct fib_test_lb_bucket_t_::@159::@162 label_stack_o_adj
struct fib_test_lb_bucket_t_::@159::@163 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:168
adj_index_t adj
Definition: fib_test.h:53
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:84
mpls_eos_bit_t eos
Definition: fib_test.h:107
int fib_test_validate_lb(const dpo_id_t *dpo, int n_buckets,...)
fib_test_rep_bucket_type_t type
Definition: fib_test.h:101
mpls_label_t label
Definition: fib_test.h:108
mpls_label_t label
Definition: fib_test.h:50
mpls_label_t label_stack[8]
Definition: fib_test.h:58
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
enum fib_test_lb_bucket_type_t_ fib_test_lb_bucket_type_t
fib_test_lb_bucket_type_t type
Definition: fib_test.h:43
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:94
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_::@159::@167 bier
mpls_eos_bit_t eos
Definition: fib_test.h:49
enum mpls_eos_bit_t_ mpls_eos_bit_t