Wailok Shum | fb7e787 | 2021-06-18 17:30:08 +0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package org.onosproject.pipelines.fabric.impl.behaviour; |
| 18 | |
| 19 | /** |
| 20 | * Constant values. |
| 21 | */ |
| 22 | public 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 Moro | 08c9e7f | 2021-07-28 18:53:34 +0200 | [diff] [blame^] | 28 | public static final byte FALSE = (byte) 0x00; |
| 29 | public static final byte TRUE = (byte) 0x01; |
| 30 | |
Wailok Shum | fb7e787 | 2021-06-18 17:30:08 +0800 | [diff] [blame] | 31 | 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 Moro | 08c9e7f | 2021-07-28 18:53:34 +0200 | [diff] [blame^] | 46 | // 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 Shum | fb7e787 | 2021-06-18 17:30:08 +0800 | [diff] [blame] | 52 | // hide default constructor |
| 53 | private Constants() { |
| 54 | } |
| 55 | } |