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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef __FIB_TEST_H__
17 #define __FIB_TEST_H__
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>
27 typedef enum fib_test_lb_bucket_type_t_ {
29 FT_LB_LABEL_STACK_O_ADJ,
32 FT_LB_MPLS_DISP_PIPE_O_ADJ,
40 } fib_test_lb_bucket_type_t;
42 typedef struct fib_test_lb_bucket_t_ {
43 fib_test_lb_bucket_type_t type;
51 fib_mpls_lsp_mode_t mode;
58 mpls_label_t label_stack[8];
59 fib_mpls_lsp_mode_t mode;
68 fib_mpls_lsp_mode_t mode;
92 } fib_test_lb_bucket_t;
94 typedef enum fib_test_rep_bucket_type_t_ {
96 FT_REP_DISP_MFIB_LOOKUP,
98 } fib_test_rep_bucket_type_t;
100 typedef struct fib_test_rep_bucket_t_ {
101 fib_test_rep_bucket_type_t type;
117 } fib_test_rep_bucket_t;
120 extern int fib_test_validate_rep_v(const replicate_t *rep,
124 extern int fib_test_validate_lb_v(const load_balance_t *lb,
128 extern int fib_test_validate_lb(const dpo_id_t *dpo,
132 extern int fib_test_validate_entry(fib_node_index_t fei,
133 fib_forward_chain_type_t fct,