-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.api.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.api.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.api.connection;
/**
* @author mirehak
+ * @author michal.polkorab
*
*/
public interface SwitchConnectionHandler {
leaf flags {
type oft:multipart-request-flags;
}
- choice body {
- case multipart-flow {
- leaf length {
- type uint16;
- }
+ choice multipart-request-body {
+ case multipart-request-flow {
leaf table-id {
type uint8;
}
- leaf duration-sec {
+ leaf out-port {
type uint32;
}
- leaf duration-nsec {
+ leaf out-group {
type uint32;
}
- leaf priority {
- type uint16;
+ leaf cookie {
+ type uint64;
}
- leaf idle-timeout {
- type uint16;
+ leaf cookie-mask {
+ type uint64;
}
- leaf hard-timeout {
- type uint16;
+ leaf match {
+ type identityref {
+ base oft:match-type-base;
+ }
}
- leaf flags {
- type uint16;
+ }
+ case multipart-request-aggregate {
+ leaf table-id {
+ type uint8;
}
- leaf cookie {
- type uint64;
+ leaf out-port {
+ type uint32;
}
- leaf packet-count {
+ leaf out-group {
+ type uint32;
+ }
+ leaf cookie {
type uint64;
}
- leaf byte-count {
+ leaf cookie-mask {
type uint64;
}
leaf match {
- type uint64;
+ type identityref {
+ base oft:match-type-base;
+ }
+ }
+ }
+ case multipart-request-port-stats {
+ leaf port-no {
+ type uint32;
+ }
+ }
+ case multipart-request-queue {
+ leaf port-no {
+ type uint32;
+ }
+ leaf queue-id {
+ type uint32;
+ }
+ }
+ case multipart-request-group {
+ leaf group-id {
+ type uint32;
+ }
+ }
+ case multipart-request-meter {
+ leaf meter-id {
+ type uint32;
+ }
+ }
+ case multipart-request-meter-config {
+ leaf meter-id {
+ type uint32;
+ }
+ }
+ case multipart-request-table-features {
+ list table_features {
+ leaf table-id {
+ type uint8;
+ }
+ leaf name {
+ type string;
+ }
+ leaf metadata-match {
+ type uint64;
+ }
+ leaf metadata-write {
+ type uint64;
+ }
+ leaf config {
+ type oft:table-config;
+ }
+ leaf max-entries {
+ type uint32;
+ }
+ }
+ }
+ case multipart-request-experimenter {
+ leaf experimenter {
+ type uint32;
+ }
+ leaf exp-type {
+ type uint32;
}
}
}
leaf flags {
type oft:multipart-request-flags;
}
- choice body {
- case multipart-desc {
+ choice multipart-reply-body {
+ case multipart-reply-desc {
leaf mfr_desc {
type string;
}
type string;
}
}
- case multipart-flow {
- leaf length {
- type uint16;
+ case multipart-reply-flow {
+ list flow-stats {
+ leaf table-id {
+ type uint8;
+ }
+ leaf duration-sec {
+ type uint32;
+ }
+ leaf duration-nsec {
+ type uint32;
+ }
+ leaf priority {
+ type uint16;
+ }
+ leaf idle-timeout {
+ type uint16;
+ }
+ leaf hard-timeout {
+ type uint16;
+ }
+ leaf flags {
+ type uint16;
+ }
+ leaf cookie {
+ type uint64;
+ }
+ leaf packet-count {
+ type uint64;
+ }
+ leaf byte-count {
+ type uint64;
+ }
+ leaf match {
+ type uint64;
+ }
}
- leaf table-id {
- type uint8;
+ }
+ case multipart-reply-aggregate {
+ leaf packet-count {
+ type uint64;
+ }
+ leaf byte-count {
+ type uint64;
+ }
+ leaf flow-count {
+ type uint32;
+ }
+ }
+ case multipart-reply-table {
+ list table-stats {
+ leaf table-id {
+ type uint8;
+ }
+ leaf active-count {
+ type uint32;
+ }
+ leaf lookup-count {
+ type uint64;
+ }
+ leaf matched-count {
+ type uint64;
+ }
+ }
+ }
+ case multipart-reply-port-stats {
+ list port-stats {
+ leaf port-no {
+ type uint32;
+ }
+ leaf rx-packets {
+ type uint64;
+ }
+ leaf tx-packets {
+ type uint64;
+ }
+ leaf rx-bytes {
+ type uint64;
+ }
+ leaf tx-bytes {
+ type uint64;
+ }
+ leaf rx-dropped {
+ type uint64;
+ }
+ leaf tx-dropped {
+ type uint64;
+ }
+ leaf rx-errors {
+ type uint64;
+ }
+ leaf tx-errors {
+ type uint64;
+ }
+ leaf rx-frame-err {
+ type uint64;
+ }
+ leaf rx-over-err {
+ type uint64;
+ }
+ leaf rx-crc-err {
+ type uint64;
+ }
+ leaf collisions {
+ type uint64;
+ }
+ leaf duration-sec {
+ type uint32;
+ }
+ leaf duration-nsec {
+ type uint32;
+ }
+ }
+ }
+ case multipart-reply-queue {
+ list queue-stats {
+ leaf port-no {
+ type uint32;
+ }
+ leaf queue-id {
+ type uint32;
+ }
+ leaf tx-bytes {
+ type uint64;
+ }
+ leaf tx-packets {
+ type uint64;
+ }
+ leaf tx-errors {
+ type uint64;
+ }
+ leaf duration-sec {
+ type uint32;
+ }
+ leaf duration-nsec {
+ type uint32;
+ }
+ }
+ }
+ case multipart-reply-group {
+ list group-stats {
+ leaf group-id {
+ type uint32;
+ }
+ leaf ref-count {
+ type uint32;
+ }
+ leaf packet-count {
+ type uint64;
+ }
+ leaf byte-count {
+ type uint64;
+ }
+ leaf duration-sec {
+ type uint32;
+ }
+ leaf duration-nsec {
+ type uint32;
+ }
+ list bucket-stats {
+ leaf packet-count {
+ type uint64;
+ }
+ leaf byte-count {
+ type uint64;
+ }
+ }
+ }
+ }
+ case multipart-reply-group-desc {
+ list group-desc {
+ leaf type {
+ type uint8;
+ }
+ leaf group-id {
+ type uint32;
+ }
+ list buckets {
+ uses bucket;
+ }
+ }
+ }
+ case multipart-reply-group-features {
+ leaf types {
+ type oft:group-types;
+ }
+ leaf capabilities {
+ type oft:group-capabilities;
}
- leaf duration-sec {
+ leaf-list max_groups {
type uint32;
}
- leaf duration-nsec {
+ leaf-list actions {
+ type ofaction:action-type;
+ }
+ }
+ case multipart-reply-meter {
+ list meter-stats {
+ leaf meter-id {
+ type uint32;
+ }
+ leaf flow-count {
+ type uint32;
+ }
+ leaf packet-in-count {
+ type uint64;
+ }
+ leaf byte-in-count {
+ type uint64;
+ }
+ leaf duration-sec {
+ type uint32;
+ }
+ leaf duration-nsec {
+ type uint32;
+ }
+ list meter-band-stats {
+ leaf packet-band-count {
+ type uint64;
+ }
+ leaf byte-band-count {
+ type uint64;
+ }
+ }
+ }
+ }
+ case multipart-reply-meter-config {
+ list meter-config {
+ leaf flags {
+ type oft:meter-mod-command;
+ }
+ leaf meter-id {
+ type uint32;
+ }
+ list bands {
+ uses meter-band-header;
+ }
+ }
+ }
+ case multipart-reply-meter-features {
+ leaf max-meter {
type uint32;
}
- leaf priority {
- type uint16;
+ leaf band-types {
+ type oft:meter-band-type;
}
- leaf idle-timeout {
- type uint16;
+ leaf capabilities {
+ type oft:meter-flags;
}
- leaf hard-timeout {
- type uint16;
+ leaf max-bands {
+ type uint8;
}
- leaf flags {
- type uint16;
+ leaf max-color {
+ type uint8;
}
- leaf cookie {
- type uint64;
+ }
+ case multipart-reply-table-features {
+ list table-features {
+ leaf table-id {
+ type uint8;
+ }
+ leaf name {
+ type string;
+ }
+ leaf metadata-match {
+ type binary;
+ }
+ leaf metadata-write {
+ type binary;
+ }
+ leaf config {
+ type oft:port-config;
+ }
+ leaf max-entries {
+ type uint32;
+ }
}
- leaf packet-count {
- type uint64;
+ }
+ case multipart-reply-port-desc {
+ list ports {
+ uses port;
}
- leaf byte-count {
- type uint64;
+ }
+ case multipart-reply-experimenter {
+ leaf experimenter {
+ type uint32;
}
- leaf match {
- type uint64;
+ leaf exp-type {
+ type uint32;
}
}
}
}
}
+
+ typedef table-config {
+ /* ofp_table_config */
+ type bits {
+ bit OFPTC_DEPRECATED_MASK {
+ /* Deprecated bits */
+ position 3;
+ }
+ }
+ }
+
+ typedef group-types {
+ /* ofp_group_type */
+ type bits {
+ bit OFPGT_ALL {
+ /* All (multicast/broadcast) group. */
+ position 0;
+ }
+ bit OFPGT_SELECT {
+ /* Select group. */
+ position 1;
+ }
+ bit OFPGT_INDIRECT {
+ /* Indirect group. */
+ position 2;
+ }
+ bit OFPGT_FF {
+ /* Fast failover group. */
+ position 3;
+ }
+ }
+ }
+
+ typedef group-capabilities {
+ /* ofp_group_capabilities */
+ type bits {
+ bit OFPGFC_SELECT_WEIGHT {
+ /* Support weight for select groups */
+ position 0;
+ }
+ bit OFPGFC_SELECT_LIVENESS {
+ /* Support liveness for select groups */
+ position 1;
+ }
+ bit OFPGFC_CHAINING {
+ /* Support chaining groups */
+ position 2;
+ }
+ bit OFPGFC_CHAINING_CHECKS {
+ /* Check chaining for loops and delete */
+ position 3;
+ }
+ }
+ }
+
}
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */\r
+\r
package org.opendaylight.openflowjava.protocol.impl.connection;\r
\r
import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;\r
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.impl.connection;
public void configure(Collection<ConnectionConfiguration> connConfigs) {
LOG.debug("Configurating ..");
- //TODO - add and configure servers according to configuration
+ //TODO - configure servers according to configuration
serverLot = new HashSet<>();
for (Iterator<ConnectionConfiguration> iterator = connConfigs.iterator(); iterator.hasNext();) {
ConnectionConfiguration connConfig = iterator.next();
* @author michal.polkorab\r
*\r
*/\r
-public class TestingConnConfigImpl implements ConnectionConfiguration{\r
+public class TestingConnConfigImpl implements ConnectionConfiguration {\r
\r
private InetAddress address;\r
private int port;\r
* Use version 1.3 for encoded message\r
* @param input ByteBuf to be checked for correct OpenFlow Protocol header\r
* @param msgType type of received message\r
- * @param length TODO\r
+ * @param length expected length of message in header\r
*/\r
public static void checkHeaderV13(ByteBuf input, byte msgType, int length) {\r
checkHeader(input, msgType, length, HelloMessageFactoryTest.VERSION_YET_SUPPORTED);\r
-/**
- * Copyright (c) 2013 Cisco Systems, Inc. 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
- */
+/* Copyright (C)2013 Pantheon Technologies, s.r.o. All rights reserved. */
package org.opendaylight.openflowjava.protocol.spi.connection;
/**
* @author mirehak
+ * @author michal.polkorab
*
*/
public interface SwitchConnectionProvider {