misc: deprecate gbp and its dependents
[vpp.git] / extras / deprecated / vnet / vxlan-gbp / vxlan_gbp_packet.c
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  */