FD.io VPP  v19.01.2-3-gf61a1a8
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/prefix.hpp>
18 #include <vom/types.hpp>
19 
20 #include <vapi/ip.api.vapi.hpp>
21 
22 namespace VOM {
23 
25 
26 void to_api(const ip_address_t& a, vapi_type_address& v);
27 void to_api(const boost::asio::ip::address& a, vapi_type_ip4_address& v);
29  vapi_union_address_union& u,
30  vapi_enum_address_family& af);
31 
32 ip_address_t from_api(const vapi_type_address& v);
33 ip_address_t from_api(const vapi_type_ip4_address& v);
34 ip_address_t from_api(const vapi_union_address_union& u,
35  vapi_enum_address_family af);
36 
37 void to_api(const mac_address_t& a, vapi_type_mac_address& m);
38 
39 mac_address_t from_api(const vapi_type_mac_address& v);
40 
41 route::prefix_t from_api(const vapi_type_prefix&);
42 route::mprefix_t from_api(const vapi_type_mprefix&);
43 
44 vapi_type_prefix to_api(const route::prefix_t&);
45 vapi_type_mprefix to_api(const route::mprefix_t&);
46 };
47 
48 /*
49  * fd.io coding-style-patch-verification: ON
50  *
51  * Local Variables:
52  * eval: (c-set-style "mozilla")
53  * End:
54  */
typedef address
Definition: ip_types.api:30
boost::asio::ip::address ip_address_t
Definition: api_types.hpp:24
a
Definition: bitmap.h:538
ip_address_t from_api(const vapi_type_address &v)
Definition: api_types.cpp:53
void to_api(const ip_address_t &a, vapi_type_address &v)
Definition: api_types.cpp:21
The VPP Object Model (VOM) library.
Definition: acl_binding.cpp:19
A prefix defintion.
Definition: prefix.hpp:213
Type def of a Ethernet address.
Definition: types.hpp:295
A prefix defintion.
Definition: prefix.hpp:92