/**
* Returns the match in OF 1.0 (OFMatch) form or OF 1.0 + IPv6 extensions
* form (V6Match)
- *
+ *
* @return
*/
public OFMatch getOFMatch() {
* actually the DSCP field followed by a zero ECN
*/
byte tos = (Byte) match.getField(MatchType.NW_TOS).getValue();
- byte dscp = (byte) ((int) tos << 2);
+ byte dscp = (byte) (tos << 2);
if (!isIPv6) {
ofMatch.setNetworkTypeOfService(dscp);
wildcards &= ~OFMatch.OFPFW_NW_TOS;
/**
* Returns the list of actions in OF 1.0 form
- *
+ *
* @return
*/
public List<OFAction> getOFActions() {
continue;
}
if (action.getType() == ActionType.SET_NEXT_HOP) {
- // TODO
+ logger.info("Unsupported action: {}", action);
continue;
}
}
/**
* Utility to convert a SAL flow to an OF 1.0 (OFFlowMod) or to an OF 1.0 +
* IPv6 extension (V6FlowMod) Flow modifier Message
- *
+ *
* @param sw
* @param command
* @param port
if (ofMatch.getInputPort() != 0) {
salMatch.setField(new MatchField(MatchType.IN_PORT,
NodeConnectorCreator.createNodeConnector(
- (Short) ofMatch.getInputPort(), node)));
+ ofMatch.getInputPort(), node)));
}
if (ofMatch.getDataLayerSource() != null
&& !NetUtils
}
if (ofMatch.getTransportSource() != 0) {
salMatch.setField(MatchType.TP_SRC,
- ((Short) ofMatch.getTransportSource()));
+ ofMatch.getTransportSource());
}
if (ofMatch.getTransportDestination() != 0) {
salMatch.setField(MatchType.TP_DST,
- ((Short) ofMatch.getTransportDestination()));
+ ofMatch.getTransportDestination());
}
} else {
// Compute OF1.0 + IPv6 extensions Match
// Mask on input port is not defined
salMatch.setField(new MatchField(MatchType.IN_PORT,
NodeConnectorCreator.createOFNodeConnector(
- (Short) v6Match.getInputPort(), node)));
+ v6Match.getInputPort(), node)));
}
if (v6Match.getDataLayerSource() != null
&& !NetUtils
}
if (v6Match.getTransportSource() != 0) {
salMatch.setField(MatchType.TP_SRC,
- ((Short) v6Match.getTransportSource()));
+ (v6Match.getTransportSource()));
}
if (v6Match.getTransportDestination() != 0) {
salMatch.setField(MatchType.TP_DST,
- ((Short) v6Match.getTransportDestination()));
+ (v6Match.getTransportDestination()));
}
}
}