Skip to content
Snippets Groups Projects
Commit 024e7295 authored by Gregor Maier's avatar Gregor Maier
Browse files

Move com.bigswitch.floodlight.vendor into floodlight tree.

* Don't rename the package yet though.
* Add OFBsnL2TableSetVendorData.java and OFBsnL2TableVendorData.java
parent 1d910ad8
No related branches found
No related tags found
No related merge requests found
package com.bigswitch.floodlight.vendor;
import org.jboss.netty.buffer.ChannelBuffer;
import org.openflow.protocol.action.OFActionVendor;
import org.openflow.protocol.factory.OFVendorActionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class OFNiciraVendorActionFactory implements OFVendorActionFactory {
protected static Logger logger =
LoggerFactory.getLogger(OFNiciraVendorActionFactory.class);
static class OFActionNiciraVendorDemux extends OFActionNiciraVendor {
OFActionNiciraVendorDemux() {
super((short) 0);
}
}
@Override
public OFActionVendor readFrom(ChannelBuffer data) {
data.markReaderIndex();
OFActionNiciraVendorDemux demux = new OFActionNiciraVendorDemux();
demux.readFrom(data);
data.resetReaderIndex();
switch(demux.getSubtype()) {
case OFActionNiciraTtlDecrement.TTL_DECREMENT_SUBTYPE:
OFActionNiciraTtlDecrement ttlAction = new OFActionNiciraTtlDecrement();
ttlAction.readFrom(data);
return ttlAction;
default:
logger.error("Unknown Nicira vendor action subtype: "+demux.getSubtype());
return null;
}
}
}
package com.bigswitch.floodlight.vendor;
import org.openflow.protocol.factory.OFVendorActionRegistry;
public final class OFVendorActions {
public static final void registerStandardVendorActions() {
OFVendorActionRegistry registry = OFVendorActionRegistry.getInstance();
registry.register(OFActionBigSwitchVendor.BSN_VENDOR_ID, new OFBigSwitchVendorActionFactory());
registry.register(OFActionNiciraVendor.NICIRA_VENDOR_ID, new OFNiciraVendorActionFactory());
}
}
\ 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