FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
api_types.hpp
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 <boost/asio/ip/address.hpp>
17 #include <vom/neighbour.hpp>
18 #include <vom/prefix.hpp>
19 #include <vom/types.hpp>
20 
21 #include <vapi/ip.api.vapi.hpp>
22 #include <vapi/ip_neighbor.api.vapi.hpp>
23 
24 namespace VOM {
25 
27 {
30 };
31 
33 
34 vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t& f);
35 const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f);
36 
37 void to_api(const ip_address_t& a, vapi_type_address& v);
38 void to_api(const boost::asio::ip::address_v4& a, vapi_type_ip4_address& v);
39 void to_api(const boost::asio::ip::address_v6& a, vapi_type_ip6_address& v);
41  vapi_union_address_union& u,
42  vapi_enum_address_family& af);
43 void to_api(const boost::asio::ip::address& a, vapi_union_address_union& u);
44 vapi_enum_address_family to_api(const l3_proto_t p);
45 
46 boost::asio::ip::address_v4 from_api(const vapi_type_ip4_address& v);
47 boost::asio::ip::address_v6 from_api(const vapi_type_ip6_address& v);
48 ip_address_t from_api(const vapi_type_address& v);
49 ip_address_t from_api(const vapi_union_address_union& u,
50  vapi_enum_address_family af);
51 ip_address_t from_api(const vapi_union_address_union& u,
52  vapi_enum_fib_path_nh_proto proto);
53 
54 void to_api(const mac_address_t& a, vapi_type_mac_address& m);
55 
56 mac_address_t from_api(const vapi_type_mac_address& v);
57 
58 route::prefix_t from_api(const vapi_type_prefix&);
59 route::mprefix_t from_api(const vapi_type_mprefix&);
60 
61 vapi_type_prefix to_api(const route::prefix_t&);
62 vapi_type_mprefix to_api(const route::mprefix_t&);
63 
64 vapi_enum_fib_path_nh_proto to_api(const nh_proto_t&);
65 const nh_proto_t& from_api(vapi_enum_fib_path_nh_proto);
66 
67 }; // VOM
68 
69 /*
70  * fd.io coding-style-patch-verification: OFF
71  *
72  * Local Variables:
73  * eval: (c-set-style "mozilla")
74  * End:
75  */
VOM::route::prefix_t
A prefix defintion.
Definition: prefix.hpp:131
neighbour.hpp
VOM
The VPP Object Model (VOM) library.
Definition: acl_binding.cpp:19
f
vlib_frame_t * f
Definition: interface_output.c:1098
types.hpp
VOM::route::mprefix_t
A prefix defintion.
Definition: prefix.hpp:252
VOM::invalid_decode::reason
const std::string reason
Definition: api_types.hpp:29
address
manual_print typedef address
Definition: ip_types.api:96
VOM::to_api
vapi_enum_ip_neighbor_flags to_api(const neighbour::flags_t &f)
Definition: api_types.cpp:21
VOM::l3_proto_t
An L3 protocol can be used to construct a prefix that is used to match packets are part of a route.
Definition: prefix.hpp:52
VOM::ip_address_t
boost::asio::ip::address ip_address_t
Definition: api_types.hpp:32
af
vl_api_address_family_t af
Definition: ip.api:619
prefix.hpp
VOM::mac_address_t
Type def of a Ethernet address.
Definition: types.hpp:295
VOM::nh_proto_t
Types belonging to Routing.
Definition: prefix.hpp:31
a
a
Definition: bitmap.h:525
VOM::invalid_decode::invalid_decode
invalid_decode(const std::string reason)
Definition: api_types.cpp:48
VOM::invalid_decode
Definition: api_types.hpp:26
proto
vl_api_ip_proto_t proto
Definition: acl_types.api:51
VOM::neighbour::flags_t
Definition: neighbour.hpp:30
VOM::from_api
const neighbour::flags_t from_api(vapi_enum_ip_neighbor_flags f)
Definition: api_types.cpp:36
string
const char *const string
Definition: cJSON.h:172