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


Java OFFlowDelete类代码示例

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


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

示例1: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的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;
}
 
开发者ID:shlee89,项目名称:athena,代码行数:18,代码来源:FlowModBuilderVer10.java

示例2: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的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;
}
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:19,代码来源:FlowModBuilderVer13.java

示例3: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的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();
}
 
开发者ID:fp7-netide,项目名称:Engine,代码行数:23,代码来源:FlowModBuilderVer10.java

示例4: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的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())
            .setHardTimeout(flowRule().hardTimeout())
            .build();

    return fm;
}
 
开发者ID:opennetworkinglab,项目名称:onos,代码行数:19,代码来源:FlowModBuilderVer10.java

示例5: deleteFlow

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public ImmutablePair<Long, Boolean> deleteFlow(final DatapathId dpid, final String flowId, final Long cookie) {
    logger.info("deleting flows {} from switch {}", flowId, dpid.toString());

    IOFSwitch sw = ofSwitchService.getSwitch(dpid);
    OFFactory ofFactory = sw.getOFFactory();
    OFFlowDelete flowDelete = ofFactory.buildFlowDelete()
            .setCookie(U64.of(cookie))
            .setCookieMask(NON_SYSTEM_MASK)
            .build();

    boolean response = sw.write(flowDelete);
    return new ImmutablePair<>(flowDelete.getXid(), response);
}
 
开发者ID:telstra,项目名称:open-kilda,代码行数:18,代码来源:SwitchManager.java

示例6: clearFlowMods

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的package包/类
/**
 * @param sw
 *            The switch we wish to remove flows from
 * @param outPort
 *            The specific Output Action OutPort of specific flows we wish
 *            to delete
 */
public void clearFlowMods(IOFSwitch sw, OFPort outPort) {
	// Delete all pre-existing flows with the same output action port or
	// outPort
	Match match = sw.getOFFactory().buildMatch().build();
	OFFlowDelete fm = sw.getOFFactory().buildFlowDelete()
			.setMatch(match)
			.setOutPort(outPort)
			.build();
	try {
		sw.write(fm);
	} catch (Exception e) {
		log.error("Failed to clear flows on switch {} - {}", this, e);
	}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:22,代码来源:PortDownReconciliation.java

示例7: toFlowDelete

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的package包/类
public static OFFlowDelete toFlowDelete(OFFlowMod fm) {
	OFVersion version = fm.getVersion();
	OFFlowDelete.Builder b = OFFactories.getFactory(version).buildFlowDelete();
	if (b.getVersion().compareTo(OFVersion.OF_10) == 0) {
		return b.setActions(fm.getActions())
				.setBufferId(fm.getBufferId())
				.setCookie(fm.getCookie())
				// cookie-mask not supported
				.setFlags(fm.getFlags())
				.setHardTimeout(fm.getHardTimeout())
				.setIdleTimeout(fm.getIdleTimeout())
				// instructions not supported
				.setMatch(fm.getMatch())
				// out-group not supported
				.setOutPort(fm.getOutPort())
				.setPriority(fm.getPriority())
				// table-id not supported
				.setXid(fm.getXid())
				.build();
	} else {
		return b.setActions(fm.getActions())
				.setBufferId(fm.getBufferId())
				.setCookie(fm.getCookie())
				.setCookieMask(fm.getCookieMask()) // added in OF1.1
				.setFlags(fm.getFlags())
				.setHardTimeout(fm.getHardTimeout())
				.setIdleTimeout(fm.getIdleTimeout())
				.setInstructions(fm.getInstructions()) // added in OF1.1
				.setMatch(fm.getMatch())
				.setOutGroup(fm.getOutGroup()) // added in OF1.1
				.setOutPort(fm.getOutPort())
				.setPriority(fm.getPriority())
				.setTableId(fm.getTableId())
				.setXid(fm.getXid())
				.build();
	}
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:38,代码来源:FlowModUtils.java

示例8: buildFlowDel

import org.projectfloodlight.openflow.protocol.OFFlowDelete; //导入依赖的package包/类
/**
 * Builds a DELETE flow mod.
 *
 * @return the flow mod
 */
public abstract OFFlowDelete buildFlowDel();
 
开发者ID:ravikumaran2015,项目名称:ravikumaran201504,代码行数:7,代码来源:FlowModBuilder.java


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