本文整理汇总了Java中org.openflow.protocol.OFFlowMod.OFPFC_MODIFY属性的典型用法代码示例。如果您正苦于以下问题:Java OFFlowMod.OFPFC_MODIFY属性的具体用法?Java OFFlowMod.OFPFC_MODIFY怎么用?Java OFFlowMod.OFPFC_MODIFY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.openflow.protocol.OFFlowMod
的用法示例。
在下文中一共展示了OFFlowMod.OFPFC_MODIFY属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
public PolicyUpdateTable update(OVXFlowMod ofm) {
PlumbingFlowMod pmod = new PlumbingFlowMod(ofm, this);
// update flow table for this node
PolicyUpdateTable updateTable = this.flowTable.update(pmod);
// calculate the update table for the real switch
switch (pmod.getCommand()) {
case OFFlowMod.OFPFC_ADD:
return doFlowModAdd(pmod);
case OFFlowMod.OFPFC_MODIFY:
case OFFlowMod.OFPFC_MODIFY_STRICT:
throw new NotImplementedException("don't allow OFPFC_MODIFY and OFPFC_MODIFY_STRICT");
case OFFlowMod.OFPFC_DELETE:
case OFFlowMod.OFPFC_DELETE_STRICT:
return doFlowModDelete(pmod, updateTable);
default:
return null;
}
}
示例2: handleFlowMods
/**
* Processes FlowMods according to command field, writing out FlowMods south
* if needed.
*
* @param fm The FlowMod to apply to this table
* @return if the FlowMod needs to be sent south during devirtualization.
*/
public boolean handleFlowMods(OVXFlowMod fm) {
switch (fm.getCommand()) {
case OFFlowMod.OFPFC_ADD:
return doFlowModAdd(fm);
case OFFlowMod.OFPFC_MODIFY:
case OFFlowMod.OFPFC_MODIFY_STRICT:
return doFlowModModify(fm);
case OFFlowMod.OFPFC_DELETE:
return doFlowModDelete(fm, false);
case OFFlowMod.OFPFC_DELETE_STRICT:
return doFlowModDelete(fm, true);
default:
/* we don't know what it is. drop. */
return false;
}
}
示例3: setupMinorParameters
protected void setupMinorParameters(TestConfig c, int idx) {
switch (idx % 4) {
case 0:
c.doFlush = true;
c.requestFlowRemovedNotifn = true;
c.flowModCmd = OFFlowMod.OFPFC_ADD;
break;
case 1:
c.doFlush = true;
c.requestFlowRemovedNotifn = true;
c.flowModCmd = OFFlowMod.OFPFC_MODIFY;
break;
case 2:
c.doFlush = true;
c.requestFlowRemovedNotifn = false;
c.flowModCmd = OFFlowMod.OFPFC_MODIFY;
case 3:
c.doFlush = false;
c.requestFlowRemovedNotifn = true;
c.flowModCmd = OFFlowMod.OFPFC_ADD;
break;
}
}
示例4: update
public PolicyUpdateTable update (OVXFlowMod fm) {
switch (fm.getCommand()) {
case OFFlowMod.OFPFC_ADD:
return doFlowModAdd(fm);
case OFFlowMod.OFPFC_MODIFY:
case OFFlowMod.OFPFC_MODIFY_STRICT:
throw new NotImplementedException("don't allow OFPFC_MODIFY and OFPFC_MODIFY_STRICT");
case OFFlowMod.OFPFC_DELETE:
case OFFlowMod.OFPFC_DELETE_STRICT:
return doFlowModDelete(fm);
default:
return null;
}
}