8896ad176cfb63d5d6a4f1f7ee6bca866eac74e2
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / OFConstants.java
1 /**
2  * Copyright (c) 2013 Cisco Systems, Inc. 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 package org.opendaylight.openflowplugin.openflow.md;
9
10 import java.math.BigInteger;
11
12 /**
13  * OFP related constants
14  */
15 //FIXME move this class to openflowplugin-api
16 public class OFConstants {
17
18     /** reserved port: process with normal L2/L3 switching  */
19     public static final short OFPP_NORMAL = ((short)0xfffa);
20     /** reserved port: all physical ports except input port  */
21     public static final short OFPP_ALL  = ((short)0xfffc);
22     /** reserved port: local openflow port  */
23     public static final short OFPP_LOCAL = ((short)0xfffe);
24     
25     
26     /** openflow protocol 1.0 - version identifier */
27     public static final short OFP_VERSION_1_0 = 0x01;
28     /** openflow protocol 1.3 - version identifier */
29     public static final short OFP_VERSION_1_3 = 0x04;
30     
31     public static final Short OFPTT_ALL = 0xff;
32     public static final Long ANY = Long.parseLong("ffffffff", 16);
33     public static final Long OFPP_ANY = ANY;
34     public static final Long OFPG_ANY = ANY;
35     public static final Long OFPQ_ANY = ANY;
36     public static final BigInteger DEFAULT_COOKIE = BigInteger.ZERO;
37     public static final BigInteger DEFAULT_COOKIE_MASK = BigInteger.ZERO;
38     public static final Long OFP_NO_BUFFER = 0xffffffffL;
39     public static final Integer OFPCML_NO_BUFFER = 0xffff;
40
41
42     public static final int MAC_ADDRESS_LENGTH = 6;
43     public static final int SIZE_OF_LONG_IN_BYTES = 8;
44     public static final int SIGNUM_UNSIGNED = 1;
45     
46     /** RpcError application tag */
47     public static final String APPLICATION_TAG = "OPENFLOW_PLUGIN";
48     /** RpcError tag - timeout */
49     public static final String ERROR_TAG_TIMEOUT = "TIMOUT";
50 }