Wailok Shum | fac26d4 | 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 | |
| 28 | public static final long PORT_TYPE_MASK = 0x3; |
| 29 | public static final byte PORT_TYPE_EDGE = 0x1; |
| 30 | public static final byte PORT_TYPE_INFRA = 0x2; |
| 31 | public static final byte PORT_TYPE_INTERNAL = 0x3; |
| 32 | |
| 33 | // Forwarding types from P4 program (not exposed in P4Info). |
| 34 | public static final byte FWD_MPLS = 1; |
| 35 | public static final byte FWD_IPV4_ROUTING = 2; |
| 36 | public static final byte FWD_IPV6_ROUTING = 4; |
| 37 | |
| 38 | public static final short ETH_TYPE_EXACT_MASK = (short) 0xFFFF; |
| 39 | |
| 40 | public static final int DEFAULT_VLAN = 4094; |
| 41 | public static final int DEFAULT_PW_TRANSPORT_VLAN = 4090; |
| 42 | |
| 43 | // hide default constructor |
| 44 | private Constants() { |
| 45 | } |
| 46 | } |