X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflow-protocol-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowjava%2Fprotocol%2Fimpl%2Futil%2FEncodeConstants.java;h=098ba8d9fe506b7ccbbc3771bc6f68d97bcb91e7;hb=0d942e8fb70b2c21f97eea3ed8904336ab5c54a4;hp=74d7ce310614041b36a0e8390c56a9327dce35da;hpb=537927d0952c74dd362ede53fbbed7db8d53fc7b;p=openflowjava.git diff --git a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/EncodeConstants.java b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/EncodeConstants.java index 74d7ce31..098ba8d9 100644 --- a/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/EncodeConstants.java +++ b/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/EncodeConstants.java @@ -1,38 +1,45 @@ -/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */ -package org.opendaylight.openflowjava.protocol.impl.util; - -/** - * Stores common constants - * @author michal.polkorab - */ -public abstract class EncodeConstants { - - /** Default OF padding (in bytes) */ - public static final byte PADDING = EncodeConstants.SIZE_OF_LONG_IN_BYTES; - /** OpenFlow v1.0 wire protocol number */ - public static final byte OF10_VERSION_ID = 0x01; - /** OpenFlow v1.0 wire protocol number */ - public static final byte OF13_VERSION_ID = 0x04; - - /** Length of mac address */ - public static final byte MAC_ADDRESS_LENGTH = 6; - /** Number of groups in ipv4 address */ - public static final byte GROUPS_IN_IPV4_ADDRESS = 4; - /** Number of groups in ipv6 address */ - public static final byte GROUPS_IN_IPV6_ADDRESS = 8; - /** Length of ipv6 address in bytes */ - public static final byte SIZE_OF_IPV6_ADDRESS_IN_BYTES = (8 * Short.SIZE) / Byte.SIZE; - - /** Length of long in bytes */ - public static final byte SIZE_OF_LONG_IN_BYTES = Long.SIZE / Byte.SIZE; - /** Length of int in bytes */ - public static final byte SIZE_OF_INT_IN_BYTES = Integer.SIZE / Byte.SIZE; - /** Length of short in bytes */ - public static final byte SIZE_OF_SHORT_IN_BYTES = Short.SIZE / Byte.SIZE; - /** Length of byte in bytes */ - public static final byte SIZE_OF_BYTE_IN_BYTES = Byte.SIZE / Byte.SIZE; - - - /** OF v1.0 maximal port name length */ - public static final byte MAX_PORT_NAME_LENGTH = 16; -} +/* + * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ + +package org.opendaylight.openflowjava.protocol.impl.util; + +/** + * Stores common constants + * @author michal.polkorab + */ +public abstract class EncodeConstants { + + /** Default OF padding (in bytes) */ + public static final byte PADDING = EncodeConstants.SIZE_OF_LONG_IN_BYTES; + /** OpenFlow v1.0 wire protocol number */ + public static final byte OF10_VERSION_ID = 0x01; + /** OpenFlow v1.0 wire protocol number */ + public static final byte OF13_VERSION_ID = 0x04; + + /** Length of mac address */ + public static final byte MAC_ADDRESS_LENGTH = 6; + /** Number of groups in ipv4 address */ + public static final byte GROUPS_IN_IPV4_ADDRESS = 4; + /** Number of groups in ipv6 address */ + public static final byte GROUPS_IN_IPV6_ADDRESS = 8; + /** Length of ipv6 address in bytes */ + public static final byte SIZE_OF_IPV6_ADDRESS_IN_BYTES = (8 * Short.SIZE) / Byte.SIZE; + + /** Length of long in bytes */ + public static final byte SIZE_OF_LONG_IN_BYTES = Long.SIZE / Byte.SIZE; + /** Length of int in bytes */ + public static final byte SIZE_OF_INT_IN_BYTES = Integer.SIZE / Byte.SIZE; + /** Length of short in bytes */ + public static final byte SIZE_OF_SHORT_IN_BYTES = Short.SIZE / Byte.SIZE; + /** Length of byte in bytes */ + public static final byte SIZE_OF_BYTE_IN_BYTES = Byte.SIZE / Byte.SIZE; + + + /** OF v1.0 maximal port name length */ + public static final byte MAX_PORT_NAME_LENGTH = 16; +}