blob: 6f92cad86294875765961ed9d9627712ac8fc62e [file] [log] [blame]
Wailok Shumfb7e7872021-06-18 17:30:08 +08001/*
2 * Copyright 2021-present Open Networking Foundation
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.pipelines.fabric.impl.behaviour;
18
19/**
20 * Constant values.
21 */
22public final class Constants {
23
24 // Used with is_infra_port metadata
25 public static final byte[] ONE = new byte[]{1};
26 public static final byte[] ZERO = new byte[]{0};
27
Daniele Moro08c9e7f2021-07-28 18:53:34 +020028 public static final byte FALSE = (byte) 0x00;
29 public static final byte TRUE = (byte) 0x01;
30
Wailok Shumfb7e7872021-06-18 17:30:08 +080031 public static final long PORT_TYPE_MASK = 0x3;
32 public static final byte PORT_TYPE_EDGE = 0x1;
33 public static final byte PORT_TYPE_INFRA = 0x2;
34 public static final byte PORT_TYPE_INTERNAL = 0x3;
35
36 // Forwarding types from P4 program (not exposed in P4Info).
37 public static final byte FWD_MPLS = 1;
38 public static final byte FWD_IPV4_ROUTING = 2;
39 public static final byte FWD_IPV6_ROUTING = 4;
40
41 public static final short ETH_TYPE_EXACT_MASK = (short) 0xFFFF;
42
43 public static final int DEFAULT_VLAN = 4094;
44 public static final int DEFAULT_PW_TRANSPORT_VLAN = 4090;
45
Daniele Moro08c9e7f2021-07-28 18:53:34 +020046 // Default Slice and Traffic Class IDs
47 public static final int DEFAULT_SLICE_ID = 0;
48 public static final int DEFAULT_TC = 0;
49 public static final byte DEFAULT_QFI = (byte) 0x00;
50
51
Wailok Shumfb7e7872021-06-18 17:30:08 +080052 // hide default constructor
53 private Constants() {
54 }
55}