vom: Add support for vtr in xconnect
[vpp.git] / extras / vom / vom / l2_vtr.cpp
1 /*
2  * Copyright (c) 2019 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 "vom/l2_vtr.hpp"
17
18 namespace VOM {
19
20 /*
21  * Make sure these are in sync with the smae enum in VPP
22  */
23 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_DISABLED(0, "disabled");
24 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_PUSH_1(1, "push-1");
25 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_PUSH_2(2, "push-2");
26 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_POP_1(3, "pop-1");
27 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_POP_2(4, "pop-2");
28 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_TRANSLATE_1_1(5, "translate-1-1");
29 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_TRANSLATE_1_2(6, "translate-1-2");
30 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_TRANSLATE_2_1(7, "translate-2-1");
31 const l2_vtr_op_t l2_vtr_op_t::L2_VTR_TRANSLATE_2_2(5, "translate-2-2");
32
33 l2_vtr_op_t::l2_vtr_op_t(int v, const std::string s)
34   : enum_base<l2_vtr_op_t>(v, s)
35 {
36 }
37 }
38
39 /*
40  * fd.io coding-style-patch-verification: ON
41  *
42  * Local Variables:
43  * eval: (c-set-style "mozilla")
44  * End:
45  */