1 /* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
\r
2 package org.opendaylight.openflowjava.protocol.impl.util;
\r
5 * Stores common constants
\r
6 * @author michal.polkorab
\r
8 public abstract class EncodeConstants {
\r
10 /** Default OF padding (in bytes) */
\r
11 public static final byte PADDING = EncodeConstants.SIZE_OF_LONG_IN_BYTES;
\r
12 /** OpenFlow v1.0 wire protocol number */
\r
13 public static final byte OF10_VERSION_ID = 0x01;
\r
14 /** OpenFlow v1.0 wire protocol number */
\r
15 public static final byte OF13_VERSION_ID = 0x04;
\r
17 /** Length of mac address */
\r
18 public static final byte MAC_ADDRESS_LENGTH = 6;
\r
19 /** Number of groups in ipv4 address */
\r
20 public static final byte GROUPS_IN_IPV4_ADDRESS = 4;
\r
21 /** Number of groups in ipv6 address */
\r
22 public static final byte GROUPS_IN_IPV6_ADDRESS = 8;
\r
23 /** Length of ipv6 address in bytes */
\r
24 public static final byte SIZE_OF_IPV6_ADDRESS_IN_BYTES = (8 * Short.SIZE) / Byte.SIZE;
\r
26 /** Length of long in bytes */
\r
27 public static final byte SIZE_OF_LONG_IN_BYTES = Long.SIZE / Byte.SIZE;
\r
28 /** Length of int in bytes */
\r
29 public static final byte SIZE_OF_INT_IN_BYTES = Integer.SIZE / Byte.SIZE;
\r
30 /** Length of short in bytes */
\r
31 public static final byte SIZE_OF_SHORT_IN_BYTES = Short.SIZE / Byte.SIZE;
\r
32 /** Length of byte in bytes */
\r
33 public static final byte SIZE_OF_BYTE_IN_BYTES = Byte.SIZE / Byte.SIZE;
\r
36 /** OF v1.0 maximal port name length */
\r
37 public static final byte MAX_PORT_NAME_LENGTH = 16;
\r