Skip to content
Snippets Groups Projects
Commit c9fe2288 authored by abat's avatar abat
Browse files

Merge into master from pull request #3816:

parents 31242988 0319b7bb
No related branches found
No related tags found
No related merge requests found
Showing
with 124 additions and 7 deletions
......@@ -95,4 +95,20 @@ public class OFActionMirror extends OFActionBigSwitchVendor {
data.writeByte(this.pad1);
data.writeByte(this.pad2);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append("BSN-MIRROR");
builder.append(", Dest Port: ");
builder.append(destPort);
builder.append(", Vlan: ");
builder.append(vlanTag);
builder.append(", Copy Stage: ");
builder.append(copyStage);
builder.append("]");
return builder.toString();
}
}
......@@ -24,5 +24,13 @@ public class OFActionNiciraTtlDecrement extends OFActionNiciraVendor {
data.writeZero(6);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append("NICIRA-TTL-DECR");
builder.append("]");
return builder.toString();
}
}
......@@ -64,6 +64,13 @@ public class OFActionTunnelDstIP extends OFActionBigSwitchVendor {
@Override
public String toString() {
return super.toString() + "; dstIP=" + IPv4.fromIPv4Address(dstIPAddr);
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append("BSN-SET-TUNNEL-DST-IP");
builder.append(", IP: ");
builder.append(IPv4.fromIPv4Address(dstIPAddr));
builder.append("]");
return builder.toString();
}
}
......@@ -12,6 +12,7 @@ import net.floodlightcontroller.debugevent.IDebugEventService.EventFieldType;
import net.floodlightcontroller.devicemanager.SwitchPort;
import net.floodlightcontroller.packet.IPv4;
import org.openflow.protocol.OFFlowMod;
import org.openflow.util.HexString;
public class Event {
......@@ -143,6 +144,25 @@ public class Event {
case IPv4:
retMap.put(ec.name(), IPv4.fromIPv4Address((Integer) obj));
break;
case FLOW_MOD_FLAGS:
int flags = (Integer)obj;
StringBuilder builder = new StringBuilder();
if (flags == 0) {
builder.append("None");
}
else {
if ((flags & OFFlowMod.OFPFF_SEND_FLOW_REM) != 0) {
builder.append("SEND_FLOW_REM ");
}
if ((flags & OFFlowMod.OFPFF_CHECK_OVERLAP) != 0) {
builder.append("CHECK_OVERLAP ");
}
if ((flags & OFFlowMod.OFPFF_EMERG) != 0) {
builder.append("EMERG ");
}
}
retMap.put(ec.name(), builder.toString());
break;
case LIST_IPV4:
@SuppressWarnings("unchecked")
List<Integer> ipv4Addresses = (List<Integer>)obj;
......@@ -216,6 +236,7 @@ public class Event {
} else {
retMap.put(ec.name(), "-- reference not available --");
}
break;
case STRING:
case OBJECT:
case PRIMITIVE:
......
......@@ -27,6 +27,7 @@ public interface IDebugEventService extends IFloodlightService {
enum EventFieldType {
DPID, IPv4, MAC, STRING, OBJECT, PRIMITIVE, LIST_IPV4,
LIST_ATTACHMENT_POINT, LIST_OBJECT, SREF_LIST_OBJECT, SREF_OBJECT,
FLOW_MOD_FLAGS
}
/**
......
......@@ -23,6 +23,7 @@ package org.openflow.protocol.action;
import java.util.Arrays;
import net.floodlightcontroller.core.web.serializers.ByteArrayMACSerializer;
import net.floodlightcontroller.util.MACAddress;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jboss.netty.buffer.ChannelBuffer;
......@@ -95,4 +96,14 @@ public abstract class OFActionDataLayer extends OFAction {
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append(MACAddress.valueOf(dataLayerAddress).toString());
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
......@@ -20,7 +20,6 @@
*/
package org.openflow.protocol.action;
import org.jboss.netty.buffer.ChannelBuffer;
/**
......@@ -121,4 +120,17 @@ public class OFActionEnqueue extends OFAction {
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append("Port: ");
builder.append(port);
builder.append(", Queue Id: ");
builder.append(queueId);
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
......@@ -21,6 +21,8 @@
package org.openflow.protocol.action;
import net.floodlightcontroller.packet.IPv4;
import org.jboss.netty.buffer.ChannelBuffer;
/**
......@@ -83,4 +85,14 @@ public abstract class OFActionNetworkLayerAddress extends OFAction {
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append(IPv4.fromIPv4Address(networkAddress));
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
......@@ -20,7 +20,6 @@
*/
package org.openflow.protocol.action;
import org.jboss.netty.buffer.ChannelBuffer;
/**
......@@ -98,4 +97,14 @@ public class OFActionNetworkTypeOfService extends OFAction {
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append(networkTypeOfService);
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
......@@ -22,7 +22,6 @@ package org.openflow.protocol.action;
import org.jboss.netty.buffer.ChannelBuffer;
import org.openflow.util.U16;
/**
* @author David Erickson (daviderickson@cs.stanford.edu) - Mar 11, 2010
......@@ -152,7 +151,11 @@ public class OFActionOutput extends OFAction implements Cloneable {
*/
@Override
public String toString() {
return "OFActionOutput [maxLength=" + maxLength + ", port=" + U16.f(port)
+ ", length=" + length + ", type=" + type + "]";
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append(port);
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
......@@ -50,4 +50,11 @@ public class OFActionStripVirtualLan extends OFAction {
// PAD
data.writeInt(0);
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
return builder.toString();
}
}
\ No newline at end of file
......@@ -85,4 +85,14 @@ public abstract class OFActionTransportLayer extends OFAction {
}
return true;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append(type);
builder.append("[");
builder.append(transportPort);
builder.append("]");
return builder.toString();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment