本文整理汇总了Java中org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType类的典型用法代码示例。如果您正苦于以下问题:Java L2SubType类的具体用法?Java L2SubType怎么用?Java L2SubType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
L2SubType类属于org.onosproject.net.flow.instructions.L2ModificationInstruction包,在下文中一共展示了L2SubType类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isPseudowire
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Determines if the filtering objective will be used for a pseudowire.
*
* @param filteringObjective
* @return True if objective was created for a pseudowire, false otherwise.
*/
private boolean isPseudowire(FilteringObjective filteringObjective) {
if (filteringObjective.meta() != null) {
TrafficTreatment treatment = filteringObjective.meta();
for (Instruction instr : treatment.immediate()) {
if (instr.type().equals(Instruction.Type.L2MODIFICATION)) {
L2ModificationInstruction l2Instr = (L2ModificationInstruction) instr;
if (l2Instr.subtype().equals(L2SubType.TUNNEL_ID)) {
return true;
}
}
}
}
return false;
}
开发者ID:opennetworkinglab,项目名称:onos,代码行数:26,代码来源:Ofdpa3Pipeline.java
示例2: readLabelFromTreatment
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Returns the MPLS label-id in a traffic treatment.
*
* @param tt the traffic treatment
* @return an integer representing the MPLS label-id, or -1 if not found
*/
static int readLabelFromTreatment(TrafficTreatment tt) {
for (Instruction ins : tt.allInstructions()) {
if (ins.type() == Instruction.Type.L2MODIFICATION) {
L2ModificationInstruction insl2 = (L2ModificationInstruction) ins;
if (insl2.subtype() == L2SubType.MPLS_LABEL) {
return ((L2ModificationInstruction.ModMplsLabelInstruction) insl2)
.label().id();
}
}
}
return -1;
}
开发者ID:opennetworkinglab,项目名称:onos,代码行数:19,代码来源:OfdpaGroupHandlerUtility.java
示例3: modL2Src
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a l2 src modification.
*
* @param addr the mac address to modify to
* @return a l2 modification
*/
public static L2ModificationInstruction modL2Src(MacAddress addr) {
checkNotNull(addr, "Src l2 address cannot be null");
return new ModEtherInstruction(L2SubType.ETH_SRC, addr);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:11,代码来源:Instructions.java
示例4: modL2Dst
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a L2 dst modification.
*
* @param addr the mac address to modify to
* @return a L2 modification
*/
public static L2ModificationInstruction modL2Dst(MacAddress addr) {
checkNotNull(addr, "Dst l2 address cannot be null");
return new ModEtherInstruction(L2SubType.ETH_DST, addr);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:11,代码来源:Instructions.java
示例5: pushMpls
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a push MPLS header instruction.
*
* @return a L2 modification.
*/
public static Instruction pushMpls() {
return new PushHeaderInstructions(L2SubType.MPLS_PUSH,
Ethernet.MPLS_UNICAST);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:10,代码来源:Instructions.java
示例6: popMpls
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a pop MPLS header instruction.
*
* @return a L2 modification.
*/
public static Instruction popMpls() {
return new PushHeaderInstructions(L2SubType.MPLS_POP,
Ethernet.MPLS_UNICAST);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:10,代码来源:Instructions.java
示例7: popVlan
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a pop VLAN header instruction.
*
* @return a L2 modification
*/
public static Instruction popVlan() {
return new PopVlanInstruction(L2SubType.VLAN_POP);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:9,代码来源:Instructions.java
示例8: pushVlan
import org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType; //导入依赖的package包/类
/**
* Creates a push VLAN header instruction.
*
* @return a L2 modification
*/
public static Instruction pushVlan() {
return new PushHeaderInstructions(L2SubType.VLAN_PUSH, Ethernet.TYPE_VLAN);
}
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:9,代码来源:Instructions.java
注:本文中的org.onosproject.net.flow.instructions.L2ModificationInstruction.L2SubType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论