当前位置: 首页>>代码示例>>Java>>正文


Java OFFlowStatsEntry.getMatch方法代码示例

本文整理汇总了Java中org.projectfloodlight.openflow.protocol.OFFlowStatsEntry.getMatch方法的典型用法代码示例。如果您正苦于以下问题:Java OFFlowStatsEntry.getMatch方法的具体用法?Java OFFlowStatsEntry.getMatch怎么用?Java OFFlowStatsEntry.getMatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.projectfloodlight.openflow.protocol.OFFlowStatsEntry的用法示例。


在下文中一共展示了OFFlowStatsEntry.getMatch方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FlowEntryBuilder

import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry; //导入方法依赖的package包/类
public FlowEntryBuilder(DeviceId deviceId, OFFlowStatsEntry entry, DriverService driverService) {
    this.stat = entry;
    this.match = entry.getMatch();
    this.instructions = getInstructions(entry);
    this.deviceId = deviceId;
    this.removed = null;
    this.flowMod = null;
    this.type = FlowType.STAT;
    this.driverService = driverService;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:11,代码来源:FlowEntryBuilder.java

示例2: FlowEntryBuilder

import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry; //导入方法依赖的package包/类
public FlowEntryBuilder(Dpid dpid, OFFlowStatsEntry entry, Type tableType) {
    this.stat = entry;
    this.match = entry.getMatch();
    this.instructions = getInstructions(entry);
    this.dpid = dpid;
    this.removed = null;
    this.flowMod = null;
    this.type = FlowType.STAT;
    this.tableType = tableType;
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:11,代码来源:FlowEntryBuilder.java

示例3: FlowEntryBuilder

import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry; //导入方法依赖的package包/类
public FlowEntryBuilder(DeviceId deviceId, OFFlowStatsEntry entry, DriverHandler driverHandler) {
    this.stat = entry;
    this.match = entry.getMatch();
    this.instructions = getInstructions(entry);
    this.deviceId = deviceId;
    this.removed = null;
    this.flowMod = null;
    this.type = FlowType.STAT;
    this.driverHandler = driverHandler;
    this.afsc = null;
    this.lightWeightStat = null;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:13,代码来源:FlowEntryBuilder.java

示例4: getPairFlowSet

import org.projectfloodlight.openflow.protocol.OFFlowStatsEntry; //导入方法依赖的package包/类
public Map<OFFlowStatsEntry, Boolean> getPairFlowSet(Map<OFFlowStatsEntry, FlowEntry> table) {
    Map<OFFlowStatsEntry, Boolean> pairFlowSet = new HashMap<>();
    Map<OFFlowStatsEntry, int[]> pairFlowInfo = new HashMap<>();
    for (Map.Entry<OFFlowStatsEntry, FlowEntry> entry : table.entrySet()) {
        OFFlowStatsEntry e = entry.getKey();
        Match match = e.getMatch();
        //0 - src, 1 - dst, 2 - proto
        int[] vals = new int[3];
        vals[0] = 0;
        vals[1] = 0;
        vals[2] = 0;
        for (MatchField<?> field : match.getMatchFields()) {
            switch (field.id) {
                case IPV4_SRC:
                    vals[0] = match.get(MatchField.IPV4_SRC).getInt();
                    break;
                case IPV4_DST:
                    vals[1] = match.get(MatchField.IPV4_DST).getInt();
                    break;
                case IP_PROTO:
                    vals[2] = match.get(MatchField.IP_PROTO).getIpProtocolNumber();
                    break;
                default:
                    break;
            }
        }
        if (vals[0] == 0 || vals[1] == 0) {
            continue;
        }
        pairFlowInfo.put(e, vals);
    }

    //extract pairflow
    for (Map.Entry<OFFlowStatsEntry, int[]> entryCur : pairFlowInfo.entrySet()) {
        boolean pairflow = false;
        int[] valsCur = entryCur.getValue();

        for (Map.Entry<OFFlowStatsEntry, int[]> entryTar : pairFlowInfo.entrySet()) {
            int[] valsTar = entryTar.getValue();

            //src(cur) == dst(tar), src(cur) == dst(tar), proto ==
            if ((valsCur[0] == valsTar[1]) &&
                    (valsCur[1] == valsTar[0]) &&
                    (valsCur[2] == valsTar[2])
                    ) {
                pairflow = true;
                break;
            }
        }

        if (pairflow) {
            pairFlowSet.put(entryCur.getKey(), true);
        }
    }
    return pairFlowSet;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:57,代码来源:FeatureCollectorProvider.java


注:本文中的org.projectfloodlight.openflow.protocol.OFFlowStatsEntry.getMatch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。