FD.io VPP
v20.09-64-g4f7b92f0a
Vector Packet Processing
vxlan_gbp_packet.c
Go to the documentation of this file.
1
/*
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:
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
#include <
vnet/vxlan-gbp/vxlan_gbp_packet.h
>
17
18
u8
*
19
format_vxlan_gbp_header_flags
(
u8
* s, va_list * args)
20
{
21
vxlan_gbp_flags_t
flags
= va_arg (*args,
int
);
22
23
if
(
VXLAN_GBP_FLAGS_NONE
== flags)
24
{
25
s =
format
(s,
"None"
);
26
}
27
#define _(n,f) { \
28
if (VXLAN_GBP_FLAGS_##f & flags) \
29
s = format (s, #f); \
30
}
31
foreach_vxlan_gbp_flags
32
#undef _
33
return
(s);
34
}
35
36
u8
*
37
format_vxlan_gbp_header_gpflags
(
u8
* s, va_list * args)
38
{
39
vxlan_gbp_gpflags_t
flags
= va_arg (*args,
int
);
40
41
if
(
VXLAN_GBP_GPFLAGS_NONE
== flags)
42
{
43
s =
format
(s,
"None"
);
44
}
45
#define _(n,f) { \
46
if (VXLAN_GBP_GPFLAGS_##f & flags) \
47
s = format (s, #f); \
48
}
49
foreach_vxlan_gbp_gpflags
50
#undef _
51
return
(s);
52
}
53
54
/*
55
* fd.io coding-style-patch-verification: ON
56
*
57
* Local Variables:
58
* eval: (c-set-style "gnu")
59
* End:
60
*/
format_vxlan_gbp_header_flags
u8 * format_vxlan_gbp_header_flags(u8 *s, va_list *args)
Definition:
vxlan_gbp_packet.c:19
flags
vl_api_wireguard_peer_flags_t flags
Definition:
wireguard.api:103
vxlan_gbp_flags_t
vxlan_gbp_flags_t
Definition:
vxlan_gbp_packet.h:99
VXLAN_GBP_GPFLAGS_NONE
Definition:
vxlan_gbp_packet.h:118
format
u8 * format(u8 *s, const char *fmt,...)
Definition:
format.c:424
u8
unsigned char u8
Definition:
types.h:56
vxlan_gbp_packet.h
format_vxlan_gbp_header_gpflags
u8 * format_vxlan_gbp_header_gpflags(u8 *s, va_list *args)
Definition:
vxlan_gbp_packet.c:37
VXLAN_GBP_FLAGS_NONE
Definition:
vxlan_gbp_packet.h:101
foreach_vxlan_gbp_flags
Definition:
vxlan_gbp_packet.h:103
vxlan_gbp_gpflags_t
vxlan_gbp_gpflags_t
Definition:
vxlan_gbp_packet.h:116
foreach_vxlan_gbp_gpflags
Definition:
vxlan_gbp_packet.h:120
src
vnet
vxlan-gbp
vxlan_gbp_packet.c
Generated on Thu Jun 3 2021 16:06:45 for FD.io VPP by
1.8.13