Make subnetroute label and flow management more robust
[netvirt.git] / vpnmanager / impl / src / main / java / org / opendaylight / netvirt / vpnmanager / VpnConstants.java
1 /*
2  * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.netvirt.vpnmanager;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg3;
13 import org.opendaylight.yangtools.yang.common.Uint32;
14 import org.opendaylight.yangtools.yang.common.Uint64;
15
16 public interface VpnConstants {
17     String VPN_IDPOOL_NAME = "vpnservices";
18     long VPN_IDPOOL_LOW = 100000L;
19     long VPN_IDPOOL_HIGH = 130000L;
20     short DEFAULT_FLOW_PRIORITY = 10;
21     int DEFAULT_LPORT_DISPATCHER_FLOW_PRIORITY = 1;
22     int VPN_ID_LENGTH = 24;
23     Uint32 INVALID_ID = Uint32.ZERO;
24     int INVALID_IDMAN_ID = 0;
25     String SEPARATOR = ".";
26     Uint64 COOKIE_L3_BASE = Uint64.valueOf("8000000", 16).intern();
27     String FLOWID_PREFIX = "L3.";
28     long MIN_WAIT_TIME_IN_MILLISECONDS = 10000;
29     long MAX_WAIT_TIME_IN_MILLISECONDS = 180000;
30     long PER_INTERFACE_MAX_WAIT_TIME_IN_MILLISECONDS = 4000;
31     long PER_VPN_INSTANCE_MAX_WAIT_TIME_IN_MILLISECONDS = 90000;
32     long PER_VPN_INSTANCE_OPDATA_MAX_WAIT_TIME_IN_MILLISECONDS = 180000;
33     int ELAN_GID_MIN = 200000;
34     int INVALID_LABEL = 0;
35
36     String IP_MONITORING_ENTITY = "ipmonitoring";
37     String IP_MONITOR_JOB_PREFIX_KEY = "ip-monitor";
38
39     // An IdPool for Pseudo LPort tags, that is, lportTags that are no related to an interface.
40     // These lportTags must be higher than 170000 to avoid collision with interface LportTags and
41     // also VPN related IDs (vrfTags and labels)
42     String PSEUDO_LPORT_TAG_ID_POOL_NAME = System.getProperty("lport.gid.name", "lporttag");
43     long LOWER_PSEUDO_LPORT_TAG = Long.getLong("lower.lport.gid", 170001);
44     long UPPER_PSEUDO_LPORT_TAG = Long.getLong("upper.lport.gid", 270000);
45
46     int IP_V6_ETHTYPE = 0x86DD;
47     int ETHTYPE_START = 96;
48     int TWO_BYTES = 16;
49     int IP_V6_HDR_START = 112;
50
51     enum ITMTunnelLocType {
52         Invalid(0), Internal(1), External(2), Hwvtep(3);
53
54         private final int type;
55
56         ITMTunnelLocType(int id) {
57             this.type = id;
58         }
59
60         public int getValue() {
61             return type;
62         }
63     }
64
65     enum DCGWPresentStatus {
66         Invalid(0), Present(1), Absent(2);
67
68         private final int status;
69
70         DCGWPresentStatus(int id) {
71             this.status = id;
72         }
73
74         public int getValue() {
75             return status;
76         }
77     }
78
79     String DEFAULT_GATEWAY_MAC_ADDRESS = "de:ad:be:ef:00:01";
80     Class<? extends NxmNxReg> VPN_REG_ID = NxmNxReg3.class;
81 }