blob: 3b7142f7e1eaec69701ca4b5048f171f8d76a4ff [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
19/**
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070020 * Representation of a BMv2 match parameter.
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070021 */
22public interface Bmv2MatchParam {
23
24 /**
25 * Returns the match type of this parameter.
26 *
27 * @return a match type value
28 */
29 Type type();
30
31 /**
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070032 * BMv2 match types.
Carmelo Casconeaa8b6292016-04-13 14:27:06 -070033 */
34 enum Type {
35 /**
36 * Exact match type.
37 */
38 EXACT,
39 /**
40 * Ternary match type.
41 */
42 TERNARY,
43 /**
44 * Longest-prefix match type.
45 */
46 LPM,
47 /**
48 * Valid match type.
49 */
50 VALID;
51 }
52}