Search in sources :

Example 6 with OFOxms

use of org.projectfloodlight.openflow.protocol.oxm.OFOxms in project open-kilda by telstra.

the class RoundTripLatencyFlowGenerator method actionAddRxTimestamp.

private static OFAction actionAddRxTimestamp(final IOFSwitch sw) {
    OFOxms oxms = sw.getOFFactory().oxms();
    OFActions actions = sw.getOFFactory().actions();
    return actions.buildNoviflowCopyField().setNBits(ROUND_TRIP_LATENCY_TIMESTAMP_SIZE).setSrcOffset(0).setDstOffset(ROUND_TRIP_LATENCY_T1_OFFSET).setOxmSrcHeader(oxms.buildNoviflowRxtimestamp().getTypeLen()).setOxmDstHeader(oxms.buildNoviflowPacketOffset().getTypeLen()).build();
}
Also used : OFOxms(org.projectfloodlight.openflow.protocol.oxm.OFOxms) OFActions(org.projectfloodlight.openflow.protocol.action.OFActions)

Example 7 with OFOxms

use of org.projectfloodlight.openflow.protocol.oxm.OFOxms in project open-kilda by telstra.

the class SwitchFlowUtils method actionSetDstMac.

/**
 * Create set destination MAC address OpenFlow action.
 *
 * @param ofFactory OpenFlow factory
 * @param macAddress MAC address to set
 * @return OpenFlow Action
 */
public static OFAction actionSetDstMac(OFFactory ofFactory, final MacAddress macAddress) {
    OFOxms oxms = ofFactory.oxms();
    OFActions actions = ofFactory.actions();
    return actions.buildSetField().setField(oxms.buildEthDst().setValue(macAddress).build()).build();
}
Also used : OFOxms(org.projectfloodlight.openflow.protocol.oxm.OFOxms) OFActions(org.projectfloodlight.openflow.protocol.action.OFActions)

Aggregations

OFOxms (org.projectfloodlight.openflow.protocol.oxm.OFOxms)7 OFActions (org.projectfloodlight.openflow.protocol.action.OFActions)6 OFFactory (org.projectfloodlight.openflow.protocol.OFFactory)1 Match (org.projectfloodlight.openflow.protocol.match.Match)1 OFVlanVidMatch (org.projectfloodlight.openflow.types.OFVlanVidMatch)1