blob: 5ff13168cc4e8eb5935e4cc2a75fe746309aa382 [file] [log] [blame]
Carmelo Casconeaa8b6292016-04-13 14:27:06 -07001/*
2 * Copyright 2016-present Open Networking Laboratory
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
17package org.onosproject.bmv2.api.runtime;
18
Carmelo Cascone9e39e312016-06-16 14:47:09 -070019import com.google.common.annotations.Beta;
20
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070021/**
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070022 * Representation of a BMv2 match parameter.
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070023 */
Carmelo Cascone9e39e312016-06-16 14:47:09 -070024@Beta
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070025public interface Bmv2MatchParam {
26
27 /**
28 * Returns the match type of this parameter.
29 *
30 * @return a match type value
31 */
32 Type type();
33
34 /**
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070035 * BMv2 match types.
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070036 */
37 enum Type {
38 /**
39 * Exact match type.
40 */
41 EXACT,
42 /**
43 * Ternary match type.
44 */
45 TERNARY,
46 /**
47 * Longest-prefix match type.
48 */
49 LPM,
50 /**
51 * Valid match type.
52 */
Jon Hall8c7b06a2017-02-22 13:37:33 -080053 VALID
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070054 }
55}