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

项目:fresco_floodlight    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:iTAP-controller    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:SDN-Multicast    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:arscheduler    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:floodlight1.2-delay    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:floodlight-hardware    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:ACAMPController    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:fast-failover-demo    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:floodlightLB    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:DSC    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:floodlight    文件:SwitchResourceBase.java   
protected OFFeaturesReply getSwitchFeaturesReply(DatapathId switchId) {
    IOFSwitchService switchService =
            (IOFSwitchService) getContext().getAttributes().
            get(IOFSwitchService.class.getCanonicalName());

    IOFSwitch sw = switchService.getSwitch(switchId);
    Future<OFFeaturesReply> future;
    OFFeaturesReply featuresReply = null;
    OFFeaturesRequest featuresRequest = sw.getOFFactory().buildFeaturesRequest().build();
    if (sw != null) {
        try {
            future = sw.writeRequest(featuresRequest);
            featuresReply = future.get(10, TimeUnit.SECONDS);
        } catch (Exception e) {
            log.error("Failure getting features reply from switch" + sw, e);
        }
    }

    return featuresReply;
}
项目:fresco_floodlight    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:iTAP-controller    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    channel.write(Collections.singletonList(m));
}
项目:SDN-Multicast    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:arscheduler    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:floodlight1.2-delay    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:floodlight-hardware    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:ACAMPController    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    write(m);
}
项目:fast-failover-demo    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    channel.write(Collections.singletonList(m));
}
项目:floodlightLB    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    channel.write(Collections.singletonList(m));
}
项目:DSC    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    channel.write(Collections.singletonList(m));
}
项目:floodlight    文件:OFChannelHandler.java   
/**
 * Send a features request message to the switch using the handshake
 * transactions ids.
 * @throws IOException
 */
private void sendFeaturesRequest() throws IOException {
    // Send initial Features Request
    OFFeaturesRequest m = factory.buildFeaturesRequest()
            .setXid(handshakeTransactionIds--)
            .build();
    channel.write(Collections.singletonList(m));
}
项目:Engine    文件:CompositionManager.java   
@Override
public void processUnhandledShimMessage(Message message, String originId) {
    if (bypassUnsupportedMessages) {
        boolean warn = true;
        if (message instanceof OpenFlowMessage) {
            OFMessage openFlowMessage = ((OpenFlowMessage) message).getOfMessage();
            if (openFlowMessage instanceof OFEchoRequest ||
                    openFlowMessage instanceof OFEchoReply) {
                warn = false;
            } else if (openFlowMessage instanceof OFFeaturesReply ||
                    openFlowMessage instanceof OFFeaturesRequest) {
                warn = false;
            }
        }

        if (warn && message instanceof OpenFlowMessage) {
            logger.warn("Received unsupported OpenFlow message (dpid={}) {} for composition from {}, attempting to relay instead.", message.getHeader().getDatapathId(), ((OpenFlowMessage) message).getOfMessage(), originId);
        } else if (warn) {
            logger.warn("Received unsupported message {} for composition from {}, attempting to relay instead.", message, originId);
        }

        try {
            if (message.getHeader().getModuleId() == 0) {
                logger.info("Message ID is 0 relaying to ALL backends");
                backendManager.sendMessageToAllModules(message);
            } else {
                backendManager.sendMessage(message);
            }
        } catch (Throwable ex) {
            logger.error("Could not relay unsupported message.", ex);
        }
    } else {
        logger.error("Received unsupported message {} from {} for composition, bypass is not activated.", message, originId);
    }
}