FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
b
d
e
f
g
i
l
m
n
o
p
r
s
t
v
w
Functions
d
f
g
l
m
n
o
p
t
v
Variables
Typedefs
Enumerations
Enumerator
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
c
e
g
h
k
m
n
o
r
s
Related Functions
c
d
e
h
i
m
o
p
r
s
v
Source
Files
Symbols
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
util.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
/*
17
* Non-LB specific stuff comes here
18
*/
19
20
#ifndef LB_PLUGIN_LB_UTIL_H_
21
#define LB_PLUGIN_LB_UTIL_H_
22
23
#include <
vnet/vnet.h
>
24
#include <
vnet/ip/ip.h
>
25
26
#define ip46_address_type(ip46) (ip46_address_is_ip4(ip46)?IP46_TYPE_IP4:IP46_TYPE_IP6)
27
#define ip46_prefix_is_ip4(ip46, len) ((len) >= 96 && ip46_address_is_ip4(ip46))
28
#define ip46_prefix_type(ip46, len) (ip46_prefix_is_ip4(ip46, len)?IP46_TYPE_IP4:IP46_TYPE_IP6)
29
30
void
ip46_prefix_normalize
(ip46_address_t *
prefix
,
u8
plen);
31
uword
unformat_ip46_prefix
(
unformat_input_t
* input, va_list * args);
32
u8
*
format_ip46_prefix
(
u8
* s, va_list * args);
33
34
/**
35
* 32 bits integer comparison for running values.
36
* 1 > 0 is true. But 1 > 0xffffffff also is.
37
*/
38
#define clib_u32_loop_gt(a, b) (((u32)(a)) - ((u32)(b)) < 0x7fffffff)
39
40
#endif
/* LB_PLUGIN_LB_UTIL_H_ */
unformat_input_t
struct _unformat_input_t unformat_input_t
format_ip46_prefix
u8 * format_ip46_prefix(u8 *s, va_list *args)
Definition:
util.c:54
uword
u64 uword
Definition:
types.h:112
ip46_prefix_normalize
void ip46_prefix_normalize(ip46_address_t *prefix, u8 plen)
Definition:
util.c:18
ip.h
u8
unsigned char u8
Definition:
types.h:56
vnet.h
unformat_ip46_prefix
uword unformat_ip46_prefix(unformat_input_t *input, va_list *args)
Definition:
util.c:32
prefix
vl_api_prefix_t prefix
Definition:
ip.api:175
src
plugins
lb
util.h
Generated on Sat Jan 8 2022 10:35:31 for FD.io VPP by
1.8.17