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

项目:athena    文件:OFChannelHandler.java   
@Override
void processOFError(OFChannelHandler h, OFErrorMsg m)
        throws IOException, SwitchStateException {
    // if we get here, then the error message is for something else
    if (m.getErrType() == OFErrorType.BAD_REQUEST &&
            ((OFBadRequestErrorMsg) m).getCode() ==
            OFBadRequestCode.EPERM) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert

        h.sw.reassertRole();
    } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED &&
            ((OFFlowModFailedErrorMsg) m).getCode() ==
            OFFlowModFailedCode.ALL_TABLES_FULL) {
        h.sw.setTableFull(true);
    } else {
        logError(h, m);
    }
    h.dispatchMessage(m);
}
项目:ravikumaran201504    文件:OFChannelHandler.java   
@Override
void processOFError(OFChannelHandler h, OFErrorMsg m)
        throws IOException, SwitchStateException {
    // if we get here, then the error message is for something else
    if (m.getErrType() == OFErrorType.BAD_REQUEST &&
            ((OFBadRequestErrorMsg) m).getCode() ==
            OFBadRequestCode.EPERM) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert

        h.sw.reassertRole();
    } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED &&
            ((OFFlowModFailedErrorMsg) m).getCode() ==
            OFFlowModFailedCode.ALL_TABLES_FULL) {
        h.sw.setTableFull(true);
    } else {
        logError(h, m);
    }
    h.dispatchMessage(m);
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer12.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.2: " + val);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer12.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.2: " + e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer13.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.3: " + val);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer13.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.3: " + e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer10.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case ALL_TABLES_FULL_VAL:
            return OFFlowModFailedCode.ALL_TABLES_FULL;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_EMERG_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_EMERG_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case UNSUPPORTED_VAL:
            return OFFlowModFailedCode.UNSUPPORTED;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.0: " + val);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer10.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case ALL_TABLES_FULL:
            return ALL_TABLES_FULL_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_EMERG_TIMEOUT:
            return BAD_EMERG_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case UNSUPPORTED:
            return UNSUPPORTED_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.0: " + e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer11.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.1: " + val);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer11.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.1: " + e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer14.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        case CANT_SYNC_VAL:
            return OFFlowModFailedCode.CANT_SYNC;
        case BAD_PRIORITY_VAL:
            return OFFlowModFailedCode.BAD_PRIORITY;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.4: " + val);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer14.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        case CANT_SYNC:
            return CANT_SYNC_VAL;
        case BAD_PRIORITY:
            return BAD_PRIORITY_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.4: " + e);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer12.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.2: " + val);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer12.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.2: " + e);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer13.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.3: " + val);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer13.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.3: " + e);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer10.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case ALL_TABLES_FULL_VAL:
            return OFFlowModFailedCode.ALL_TABLES_FULL;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_EMERG_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_EMERG_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case UNSUPPORTED_VAL:
            return OFFlowModFailedCode.UNSUPPORTED;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.0: " + val);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer10.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case ALL_TABLES_FULL:
            return ALL_TABLES_FULL_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_EMERG_TIMEOUT:
            return BAD_EMERG_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case UNSUPPORTED:
            return UNSUPPORTED_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.0: " + e);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer11.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.1: " + val);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer11.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.1: " + e);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer14.java   
public static OFFlowModFailedCode ofWireValue(short val) {
    switch(val) {
        case UNKNOWN_VAL:
            return OFFlowModFailedCode.UNKNOWN;
        case TABLE_FULL_VAL:
            return OFFlowModFailedCode.TABLE_FULL;
        case BAD_TABLE_ID_VAL:
            return OFFlowModFailedCode.BAD_TABLE_ID;
        case OVERLAP_VAL:
            return OFFlowModFailedCode.OVERLAP;
        case EPERM_VAL:
            return OFFlowModFailedCode.EPERM;
        case BAD_TIMEOUT_VAL:
            return OFFlowModFailedCode.BAD_TIMEOUT;
        case BAD_COMMAND_VAL:
            return OFFlowModFailedCode.BAD_COMMAND;
        case BAD_FLAGS_VAL:
            return OFFlowModFailedCode.BAD_FLAGS;
        case CANT_SYNC_VAL:
            return OFFlowModFailedCode.CANT_SYNC;
        case BAD_PRIORITY_VAL:
            return OFFlowModFailedCode.BAD_PRIORITY;
        default:
            throw new IllegalArgumentException("Illegal wire value for type OFFlowModFailedCode in version 1.4: " + val);
    }
}
项目:loxigen-artifacts    文件:OFFlowModFailedCodeSerializerVer14.java   
public static short toWireValue(OFFlowModFailedCode e) {
    switch(e) {
        case UNKNOWN:
            return UNKNOWN_VAL;
        case TABLE_FULL:
            return TABLE_FULL_VAL;
        case BAD_TABLE_ID:
            return BAD_TABLE_ID_VAL;
        case OVERLAP:
            return OVERLAP_VAL;
        case EPERM:
            return EPERM_VAL;
        case BAD_TIMEOUT:
            return BAD_TIMEOUT_VAL;
        case BAD_COMMAND:
            return BAD_COMMAND_VAL;
        case BAD_FLAGS:
            return BAD_FLAGS_VAL;
        case CANT_SYNC:
            return CANT_SYNC_VAL;
        case BAD_PRIORITY:
            return BAD_PRIORITY_VAL;
        default:
            throw new IllegalArgumentException("Illegal enum value for type OFFlowModFailedCode in version 1.4: " + e);
    }
}
项目:fresco_floodlight    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:iTAP-controller    文件:OFSwitchHandshakeHandler.java   
@LogMessageDoc(level="WARN",
        message="Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                explanation="The switch has denied an operation likely " +
                        "indicating inconsistent controller roles",
                        recommendation="This situation can occurs transiently during role" +
                                " changes. If, however, the condition persists or happens" +
                                " frequently this indicates a role inconsistency. " +
                                LogMessageDoc.CHECK_CONTROLLER )
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:SDN-Multicast    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:SDN-Multicast    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the EQUAL controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_EQUAL);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:arscheduler    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:floodlight1.2-delay    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:floodlight-hardware    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:ACAMPController    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:fast-failover-demo    文件:OFSwitchHandshakeHandler.java   
@LogMessageDoc(level="WARN",
        message="Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                explanation="The switch has denied an operation likely " +
                        "indicating inconsistent controller roles",
                        recommendation="This situation can occurs transiently during role" +
                                " changes. If, however, the condition persists or happens" +
                                " frequently this indicates a role inconsistency. " +
                                LogMessageDoc.CHECK_CONTROLLER )
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:floodlightLB    文件:OFSwitchHandshakeHandler.java   
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:DSC    文件:OFSwitchHandshakeHandler.java   
@LogMessageDoc(level="WARN",
        message="Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                explanation="The switch has denied an operation likely " +
                        "indicating inconsistent controller roles",
                        recommendation="This situation can occurs transiently during role" +
                                " changes. If, however, the condition persists or happens" +
                                " frequently this indicates a role inconsistency. " +
                                LogMessageDoc.CHECK_CONTROLLER )
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:floodlight    文件:OFSwitchHandshakeHandler.java   
@LogMessageDoc(level="WARN",
        message="Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                explanation="The switch has denied an operation likely " +
                        "indicating inconsistent controller roles",
                        recommendation="This situation can occurs transiently during role" +
                                " changes. If, however, the condition persists or happens" +
                                " frequently this indicates a role inconsistency. " +
                                LogMessageDoc.CHECK_CONTROLLER )
@Override
void processOFError(OFErrorMsg m) {
    // role changer will ignore the error if it isn't for it
    boolean didHandle = roleChanger.deliverError(m);
    if (didHandle)
        return;
    if ((m.getErrType() == OFErrorType.BAD_REQUEST) &&
            (((OFBadRequestErrorMsg)m).getCode() == OFBadRequestCode.EPERM)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert
        switchManagerCounters.epermErrorWhileSwitchIsMaster.increment();
        log.warn("Received permission error from switch {} while" +
                "being master. Reasserting master role.",
                getSwitchInfoString());
        reassertRole(OFControllerRole.ROLE_MASTER);
    }
    else if ((m.getErrType() == OFErrorType.FLOW_MOD_FAILED) &&
            (((OFFlowModFailedErrorMsg)m).getCode() == OFFlowModFailedCode.ALL_TABLES_FULL)) {
        sw.setTableFull(true);
    }
    else {
        logError(m);
    }
    dispatchMessage(m);
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer12.java   
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer13.java   
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer10.java   
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer11.java   
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:openflowj-otn    文件:OFFlowModFailedCodeSerializerVer14.java   
public static OFFlowModFailedCode readFrom(ChannelBuffer bb) throws OFParseError {
    try {
        return ofWireValue(bb.readShort());
    } catch (IllegalArgumentException e) {
        throw new OFParseError(e);
    }
}
项目:onos    文件:OFChannelHandler.java   
@Override
void processOFError(OFChannelHandler h, OFErrorMsg m)
        throws IOException, SwitchStateException {
    // if we get here, then the error message is for something else
    if (m.getErrType() == OFErrorType.BAD_REQUEST &&
            (((OFBadRequestErrorMsg) m).getCode() ==
               OFBadRequestCode.EPERM ||
            ((OFBadRequestErrorMsg) m).getCode() ==
               OFBadRequestCode.IS_SLAVE)) {
        // We are the master controller and the switch returned
        // a permission error. This is a likely indicator that
        // the switch thinks we are slave. Reassert our
        // role
        // FIXME: this could be really bad during role transitions
        // if two controllers are master (even if its only for
        // a brief period). We might need to see if these errors
        // persist before we reassert

        h.sw.reassertRole();
    } else if (m.getErrType() == OFErrorType.FLOW_MOD_FAILED &&
            ((OFFlowModFailedErrorMsg) m).getCode() ==
            OFFlowModFailedCode.ALL_TABLES_FULL) {
        h.sw.setTableFull(true);
    } else {
        logError(h, m);
    }
    h.dispatchMessage(m);
}