@SuppressWarnings("unused") private void decodeAsyncGetReply(OFAsyncGetReply rep) { long frm = rep.getFlowRemovedMaskEqualMaster(); long frs = rep.getFlowRemovedMaskSlave(); long pim = rep.getPacketInMaskEqualMaster(); long pis = rep.getPacketInMaskSlave(); long psm = rep.getPortStatusMaskEqualMaster(); long pss = rep.getPortStatusMaskSlave(); if (role == Role.MASTER || role == Role.EQUAL) { // should separate log.info("FRM:{}", HexString.toHexString((frm & TEST_FLOW_REMOVED_MASK))); log.info("PIM:{}", HexString.toHexString((pim & TEST_PACKET_IN_MASK))); log.info("PSM:{}", HexString.toHexString((psm & TEST_PORT_STATUS_MASK))); } }
private void decodeAsyncGetReply(OFAsyncGetReply rep) { long frm = rep.getFlowRemovedMaskEqualMaster(); //long frs = rep.getFlowRemovedMaskSlave(); long pim = rep.getPacketInMaskEqualMaster(); //long pis = rep.getPacketInMaskSlave(); long psm = rep.getPortStatusMaskEqualMaster(); //long pss = rep.getPortStatusMaskSlave(); if (role == RoleState.MASTER || role == RoleState.EQUAL) { // should separate log.info("FRM:{}", HexString.toHexString((frm & TEST_FLOW_REMOVED_MASK))); log.info("PIM:{}", HexString.toHexString((pim & TEST_PACKET_IN_MASK))); log.info("PSM:{}", HexString.toHexString((psm & TEST_PORT_STATUS_MASK))); } }
void processOFMessage(IOFSwitch sw, OFMessage m) throws IOException { switch (m.getType()) { case BARRIER_REPLY: processBarrierReply(m); break; case ERROR: processErrorMessage(m); break; case GET_ASYNC_REPLY: OFAsyncGetReply asrep = (OFAsyncGetReply) m; decodeAsyncGetReply(asrep); break; case PACKET_IN: // not ready to handle packet-ins break; case QUEUE_GET_CONFIG_REPLY: // not doing queue config yet break; case STATS_REPLY: processStatsReply((OFStatsReply) m); break; case ROLE_REPLY: // channelHandler should handle this case PORT_STATUS: // channelHandler should handle this case FEATURES_REPLY: // don't care case FLOW_REMOVED: // don't care default: log.debug("Received message {} during switch-driver subhandshake " + "from switch {} ... Ignoring message", m, sw.getStringId()); } }
void processOFGetAsyncReply(OFChannelHandler h, OFAsyncGetReply m) { unhandledMessageReceived(h, m); }
@Override public void processDriverHandshakeMessage(OFMessage m) { if (!startDriverHandshakeCalled) { throw new SwitchDriverSubHandshakeNotStarted(); } if (driverHandshakeComplete.get()) { throw new SwitchDriverSubHandshakeCompleted(m); } switch (m.getType()) { case BARRIER_REPLY: if (m.getXid() == barrierXidToWaitFor) { driverHandshakeComplete.set(true); } break; case ERROR: log.error("Switch {} Error {}", getStringId(), m); break; case GET_ASYNC_REPLY: OFAsyncGetReply asrep = (OFAsyncGetReply) m; decodeAsyncGetReply(asrep); break; case STATS_REPLY: processStatsReply((OFStatsReply) m); break; case PACKET_IN: case PORT_STATUS: case QUEUE_GET_CONFIG_REPLY: case ROLE_REPLY: case FEATURES_REPLY: case FLOW_REMOVED: break; default: log.debug("Received message {} during switch-driver subhandshake " + "from switch {} ... Ignoring message", m, getStringId()); } }