Package org.openflow.protocol.factory

Examples of org.openflow.protocol.factory.OFMessageFactory.parseMessage()


                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                0x00 };
        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer oferrorBuf =
                ChannelBuffers.wrappedBuffer(oferrorRaw);
        List<OFMessage> msg = factory.parseMessage(oferrorBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertEquals(76, msg.get(0).getLengthU());
        ChannelBuffer out = ChannelBuffers.dynamicBuffer();
        msg.get(0).writeTo(out);
View Full Code Here


                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                (byte) 0xff, 0x00, (byte) 0xff, (byte) 0xff };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsRequest);
        OFStatisticsRequest sr = (OFStatisticsRequest) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.FLOW, sr.getStatisticType());
View Full Code Here

                0x00, 0x00, 0x00, 0x00, (byte) 0xff, 0x00, 0x00, 0x00,
                (byte) 0xff, (byte) 0xff, 0x4e, 0x20 };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsRequest);
        OFStatisticsRequest sr = (OFStatisticsRequest) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.VENDOR, sr.getStatisticType());
View Full Code Here

                0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0xc4, 0x00, 0x00, 0x00,
                0x08, 0x00, 0x02, 0x00, 0x00 };

        OFMessageFactory factory = BasicFactory.getInstance();
        ChannelBuffer packetBuf = ChannelBuffers.wrappedBuffer(packet);
        List<OFMessage> msg = factory.parseMessage(packetBuf);
        TestCase.assertNotNull(msg);
        TestCase.assertEquals(msg.size(), 1);
        TestCase.assertTrue(msg.get(0) instanceof OFStatisticsReply);
        OFStatisticsReply sr = (OFStatisticsReply) msg.get(0);
        TestCase.assertEquals(OFStatisticsType.FLOW, sr.getStatisticType());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.