blob: b727162206d77aa5e0222be27e900feba65a9f86 [file] [log] [blame]
Matteo Scandoloc9306e42016-08-04 16:24:30 -07001namespace java org.p4.bmv2.thrift
2/* Copyright 2013-present Barefoot Networks, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * Antonin Bas (antonin@barefootnetworks.com)
19 *
20 */
21
22namespace cpp bm_runtime.simple_pre
23namespace py bm_runtime.simple_pre
24
25typedef i32 BmMcMgrp
26typedef i32 BmMcRid
27typedef i32 BmMcMgrpHandle
28typedef i32 BmMcL1Handle
29typedef string BmMcPortMap // string of 0s and 1s
30
31enum McOperationErrorCode {
32 TABLE_FULL = 1,
33 INVALID_HANDLE = 2,
34 INVALID_MGID = 3,
35 INVALID_L1_HANDLE = 4,
36 INVALID_L2_HANLDE = 5,
37 ERROR = 6
38}
39
40exception InvalidMcOperation {
41 1:McOperationErrorCode code
42}
43
44service SimplePre {
45
46 BmMcMgrpHandle bm_mc_mgrp_create(
47 1:i32 cxt_id,
48 2:BmMcMgrp mgrp
49 ) throws (1:InvalidMcOperation ouch),
50
51 void bm_mc_mgrp_destroy(
52 1:i32 cxt_id,
53 2:BmMcMgrpHandle mgrp_handle
54 ) throws (1:InvalidMcOperation ouch),
55
56 BmMcL1Handle bm_mc_node_create(
57 1:i32 cxt_id,
58 2:BmMcRid rid
59 3:BmMcPortMap port_map
60 ) throws (1:InvalidMcOperation ouch),
61
62 void bm_mc_node_associate(
63 1:i32 cxt_id,
64 2:BmMcMgrpHandle mgrp_handle,
65 3:BmMcL1Handle l1_handle
66 ) throws (1:InvalidMcOperation ouch),
67
68 void bm_mc_node_dissociate(
69 1:i32 cxt_id,
70 2:BmMcMgrpHandle mgrp_handle,
71 3:BmMcL1Handle l1_handle
72 ) throws (1:InvalidMcOperation ouch),
73
74 void bm_mc_node_destroy(
75 1:i32 cxt_id,
76 2:BmMcL1Handle l1_handle
77 ) throws (1:InvalidMcOperation ouch),
78
79 void bm_mc_node_update(
80 1:i32 cxt_id,
81 2:BmMcL1Handle l1_handle,
82 3:BmMcPortMap port_map
83 ) throws (1:InvalidMcOperation ouch),
84}