本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFFlowModFlags类的典型用法代码示例。如果您正苦于以下问题:Java OFFlowModFlags类的具体用法?Java OFFlowModFlags怎么用?Java OFFlowModFlags使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OFFlowModFlags类属于org.projectfloodlight.openflow.protocol包,在下文中一共展示了OFFlowModFlags类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDeleteStrict fm = factory().buildFlowDeleteStrict()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setTableId(TableId.of(flowRule().tableId()))
.build();
return fm;
}
示例2: buildFlowAdd
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
Match match = buildMatch();
List<OFAction> actions = buildActions();
long cookie = flowRule().id().value();
OFFlowAdd fm = factory().buildFlowAdd()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setActions(actions)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.build();
return fm;
}
示例3: buildFlowMod
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowMod() {
Match match = buildMatch();
List<OFAction> actions = buildActions();
long cookie = flowRule().id().value();
OFFlowMod fm = factory().buildFlowModify()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setActions(actions)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.build();
return fm;
}
示例4: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDelete fm = factory().buildFlowDelete()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.build();
return fm;
}
示例5: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDelete fm = factory().buildFlowDelete()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setTableId(TableId.of(flowRule().type().ordinal()))
.build();
return fm;
}
示例6: toWireValue
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
short wireValue = 0;
for(OFFlowModFlags e: set) {
switch(e) {
case SEND_FLOW_REM:
wireValue |= SEND_FLOW_REM_VAL;
break;
case CHECK_OVERLAP:
wireValue |= CHECK_OVERLAP_VAL;
break;
case RESET_COUNTS:
wireValue |= RESET_COUNTS_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.2: " + e);
}
}
return wireValue;
}
示例7: ofWireValue
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static Set<OFFlowModFlags> ofWireValue(short val) {
EnumSet<OFFlowModFlags> set = EnumSet.noneOf(OFFlowModFlags.class);
if((val & SEND_FLOW_REM_VAL) != 0)
set.add(OFFlowModFlags.SEND_FLOW_REM);
if((val & CHECK_OVERLAP_VAL) != 0)
set.add(OFFlowModFlags.CHECK_OVERLAP);
if((val & RESET_COUNTS_VAL) != 0)
set.add(OFFlowModFlags.RESET_COUNTS);
if((val & NO_PKT_COUNTS_VAL) != 0)
set.add(OFFlowModFlags.NO_PKT_COUNTS);
if((val & NO_BYT_COUNTS_VAL) != 0)
set.add(OFFlowModFlags.NO_BYT_COUNTS);
if((val & BSN_SEND_IDLE_VAL) != 0)
set.add(OFFlowModFlags.BSN_SEND_IDLE);
return Collections.unmodifiableSet(set);
}
示例8: toWireValue
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
short wireValue = 0;
for(OFFlowModFlags e: set) {
switch(e) {
case SEND_FLOW_REM:
wireValue |= SEND_FLOW_REM_VAL;
break;
case CHECK_OVERLAP:
wireValue |= CHECK_OVERLAP_VAL;
break;
case EMERG:
wireValue |= EMERG_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.0: " + e);
}
}
return wireValue;
}
示例9: toWireValue
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
public static short toWireValue(Set<OFFlowModFlags> set) {
short wireValue = 0;
for(OFFlowModFlags e: set) {
switch(e) {
case SEND_FLOW_REM:
wireValue |= SEND_FLOW_REM_VAL;
break;
case CHECK_OVERLAP:
wireValue |= CHECK_OVERLAP_VAL;
break;
default:
throw new IllegalArgumentException("Illegal enum value for type OFFlowModFlags in version 1.1: " + e);
}
}
return wireValue;
}
示例10: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDeleteStrict.Builder fm = factory().buildFlowDeleteStrict()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setTableId(TableId.of(flowRule().tableId()));
if (flowRule().timeout() != 0) {
fm.setIdleTimeout(flowRule().timeout());
} else {
fm.setHardTimeout(flowRule().hardTimeout());
}
return fm.build();
}
示例11: buildFlowAdd
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
Match match = buildMatch();
List<OFAction> actions = buildActions();
long cookie = flowRule().id().value();
OFFlowAdd.Builder fm = factory().buildFlowAdd()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setActions(actions)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority());
if (flowRule().timeout() != 0) {
fm.setIdleTimeout(flowRule().timeout());
} else {
fm.setHardTimeout(flowRule().hardTimeout());
}
return fm.build();
}
示例12: buildFlowMod
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowMod() {
Match match = buildMatch();
List<OFAction> actions = buildActions();
long cookie = flowRule().id().value();
OFFlowMod.Builder fm = factory().buildFlowModify()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setActions(actions)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setPriority(flowRule().priority());
if (flowRule().timeout() != 0) {
fm.setIdleTimeout(flowRule().timeout());
} else {
fm.setHardTimeout(flowRule().hardTimeout());
}
return fm.build();
}
示例13: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowDelete buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDelete.Builder fm = factory().buildFlowDelete()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority());
if (flowRule().timeout() != 0) {
fm.setIdleTimeout(flowRule().timeout());
} else {
fm.setHardTimeout(flowRule().hardTimeout());
}
return fm.build();
}
示例14: buildFlowDel
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowMod buildFlowDel() {
Match match = buildMatch();
long cookie = flowRule().id().value();
OFFlowDeleteStrict fm = factory().buildFlowDeleteStrict()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setTableId(TableId.of(flowRule().tableId()))
.setHardTimeout(flowRule().hardTimeout())
.build();
return fm;
}
示例15: buildFlowAdd
import org.projectfloodlight.openflow.protocol.OFFlowModFlags; //导入依赖的package包/类
@Override
public OFFlowAdd buildFlowAdd() {
Match match = buildMatch();
List<OFAction> actions = buildActions();
long cookie = flowRule().id().value();
OFFlowAdd fm = factory().buildFlowAdd()
.setXid(xid)
.setCookie(U64.of(cookie))
.setBufferId(OFBufferId.NO_BUFFER)
.setActions(actions)
.setMatch(match)
.setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
.setPriority(flowRule().priority())
.setHardTimeout(flowRule().hardTimeout())
.build();
return fm;
}