2 * Copyright (c) 2018 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 #include <vppinfra/types.h>
17 #include <vppinfra/bihash_24_8.h>
25 void (*add) (struct lpm_ *lpm, void *addr_v, u8 pfxlen, u32 value);
26 void (*delete) (struct lpm_ *lpm, void *addr_v, u8 pfxlen);
27 u32 (*lookup) (struct lpm_ *lpm, void *addr_v, u8 pfxlen);
33 BVT (clib_bihash) bihash;
34 uword *prefix_lengths_bitmap;
35 u32 prefix_length_refcount[129];
38 lpm_t *lpm_table_init (enum lpm_type_e lpm_type);