Java 类org.projectfloodlight.openflow.protocol.OFFlowModFlags 实例源码

项目:athena    文件:FlowModBuilderVer13.java   
@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;
}
项目:athena    文件:FlowModBuilderVer10.java   
@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;
}
项目:athena    文件:FlowModBuilderVer10.java   
@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;
}
项目:athena    文件:FlowModBuilderVer10.java   
@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;
}
项目:ravikumaran201504    文件:FlowModBuilderVer13.java   
@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;
}
项目:ravikumaran201504    文件:FlowModBuilderVer10.java   
@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;
}
项目:ravikumaran201504    文件:FlowModBuilderVer10.java   
@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;
}
项目:ravikumaran201504    文件:FlowModBuilderVer10.java   
@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;
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer12.java   
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;
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer13.java   
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);
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer10.java   
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;
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer11.java   
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;
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer14.java   
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);
}
项目:Engine    文件:FlowModBuilderVer13.java   
@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();
}
项目:Engine    文件:FlowModBuilderVer10.java   
@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();
}
项目:Engine    文件:FlowModBuilderVer10.java   
@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();
}
项目:Engine    文件:FlowModBuilderVer10.java   
@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();
}
项目:onos    文件:FlowModBuilderVer13.java   
@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;
}
项目:onos    文件:FlowModBuilderVer10.java   
@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;
}
项目:onos    文件:FlowModBuilderVer10.java   
@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())
            .setHardTimeout(flowRule().hardTimeout())
            .build();

    return fm;
}
项目:onos    文件:FlowModBuilderVer10.java   
@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;
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer12.java   
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;
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer13.java   
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);
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer10.java   
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;
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer15.java   
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);
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer11.java   
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;
}
项目:loxigen-artifacts    文件:OFFlowModFlagsSerializerVer14.java   
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);
}
项目:fresco_floodlight    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:iTAP-controller    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:SDN-Multicast    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:arscheduler    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:floodlight1.2-delay    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:floodlight-hardware    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY)
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:ACAMPController    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:fast-failover-demo    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:ravikumaran201504    文件:FlowModBuilderVer13.java   
@Override
public OFFlowAdd buildFlowAdd() {
    Match match = buildMatch();
    List<OFAction> deferredActions = buildActions(treatment.deferred());
    List<OFAction> immediateActions = buildActions(treatment.immediate());
    List<OFInstruction> instructions = Lists.newLinkedList();


    if (immediateActions.size() > 0) {
        instructions.add(factory().instructions().applyActions(immediateActions));
    }
    if (treatment.clearedDeferred()) {
        instructions.add(factory().instructions().clearActions());
    }
    if (deferredActions.size() > 0) {
        instructions.add(factory().instructions().writeActions(deferredActions));
    }
    if (treatment.tableTransition() != null) {
        instructions.add(buildTableGoto(treatment.tableTransition()));
    }

    long cookie = flowRule().id().value();

    OFFlowAdd fm = factory().buildFlowAdd()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setInstructions(instructions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().type().ordinal()))
            .build();

    return fm;
}
项目:ravikumaran201504    文件:FlowModBuilderVer13.java   
@Override
public OFFlowMod buildFlowMod() {
    Match match = buildMatch();
    List<OFAction> deferredActions = buildActions(treatment.deferred());
    List<OFAction> immediateActions = buildActions(treatment.immediate());
    List<OFInstruction> instructions = Lists.newLinkedList();


    if (immediateActions.size() > 0) {
        instructions.add(factory().instructions().applyActions(immediateActions));
    }
    if (treatment.clearedDeferred()) {
        instructions.add(factory().instructions().clearActions());
    }
    if (deferredActions.size() > 0) {
        instructions.add(factory().instructions().writeActions(deferredActions));
    }
    if (treatment.tableTransition() != null) {
        instructions.add(buildTableGoto(treatment.tableTransition()));
    }

    long cookie = flowRule().id().value();

    OFFlowMod fm = factory().buildFlowModify()
            .setXid(xid)
            .setCookie(U64.of(cookie))
            .setBufferId(OFBufferId.NO_BUFFER)
            .setInstructions(instructions)
            .setMatch(match)
            .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM))
            .setPriority(flowRule().priority())
            .setTableId(TableId.of(flowRule().type().ordinal()))
            .build();

    return fm;
}
项目:floodlightLB    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:DSC    文件:StaticFlowEntries.java   
/**
 * Sets defaults for an OFFlowMod used in the StaticFlowEntryPusher
 * @param fm The OFFlowMod to set defaults for
 * @param entryName The name of the entry. Used to compute the cookie.
 */
public static void initDefaultFlowMod(OFFlowMod.Builder fmb, String entryName) {
    fmb.setIdleTimeout(INFINITE_TIMEOUT) // not setting these would also work
    .setHardTimeout(INFINITE_TIMEOUT)
    .setBufferId(OFBufferId.NO_BUFFER)
    .setOutPort(OFPort.ANY) 
    .setCookie(computeEntryCookie(0, entryName))
    .setPriority(Integer.MAX_VALUE)
    .setFlags(Collections.singleton(OFFlowModFlags.SEND_FLOW_REM));
    return;
}
项目:openflowj-otn    文件:OFFlowModFlagsSerializerVer12.java   
public static Set<OFFlowModFlags> readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}