Search in sources :

Example 1 with OFCalientFlowStatsRequest

use of org.projectfloodlight.openflow.protocol.OFCalientFlowStatsRequest in project onos by opennetworkinglab.

the class CalientFiberSwitchHandshaker method sendMsg.

@Override
public final void sendMsg(OFMessage m) {
    OFMessage newMsg = m;
    if (m.getType() == OFType.STATS_REQUEST) {
        OFStatsRequest sr = (OFStatsRequest) m;
        log.debug("Rebuilding stats request type {}", sr.getStatsType());
        switch(sr.getStatsType()) {
            case FLOW:
                OFCalientFlowStatsRequest request = this.factory().buildCalientFlowStatsRequest().setCookie(((OFFlowStatsRequest) sr).getCookie()).setCookieMask(((OFFlowStatsRequest) sr).getCookieMask()).setMatch(this.factory().matchWildcardAll()).setOutGroup(((OFFlowStatsRequest) sr).getOutGroup().getGroupNumber()).setOutPort(OFPort.ANY).setTableId(TableId.ALL).setXid(sr.getXid()).setFlags(sr.getFlags()).build();
                newMsg = request;
                break;
            case PORT:
                // TODO
                break;
            default:
                break;
        }
    }
    super.sendMsg(newMsg);
}
Also used : OFMessage(org.projectfloodlight.openflow.protocol.OFMessage) OFStatsRequest(org.projectfloodlight.openflow.protocol.OFStatsRequest) OFFlowStatsRequest(org.projectfloodlight.openflow.protocol.OFFlowStatsRequest) OFCalientFlowStatsRequest(org.projectfloodlight.openflow.protocol.OFCalientFlowStatsRequest)

Aggregations

OFCalientFlowStatsRequest (org.projectfloodlight.openflow.protocol.OFCalientFlowStatsRequest)1 OFFlowStatsRequest (org.projectfloodlight.openflow.protocol.OFFlowStatsRequest)1 OFMessage (org.projectfloodlight.openflow.protocol.OFMessage)1 OFStatsRequest (org.projectfloodlight.openflow.protocol.OFStatsRequest)1