Package net.floodlightcontroller.packet

Examples of net.floodlightcontroller.packet.IPacket.serialize()


                .setDestinationAddress(dstIp)
                .setPayload(new UDP()
                .setSourcePort((short) 5000)
                .setDestinationPort((short) 5001)
                .setPayload(new Data(new byte[] {0x01}))));
        byte[] testPacketSerialized = testPacket.serialize();
        OFPacketIn pi;
        // build out input packet
        pi = ((OFPacketIn) BasicFactory.getInstance().getMessage(OFType.PACKET_IN))
                .setBufferId(-1)
                .setInPort((short) 1)
View Full Code Here


         .setSenderHardwareAddress(HexString.fromHexString("00:00:00:00:00:01"))
         .setSenderProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.1"))
         .setTargetHardwareAddress(HexString.fromHexString("00:00:00:00:00:00"))
         .setTargetProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.100")));

     arpRequest1Serialized = arpRequest1.serialize();

     arpRequestPacketIn1 =
             ((OFPacketIn) getMockFloodlightProvider().getOFMessageFactory().
                     getMessage(OFType.PACKET_IN))
                     .setBufferId(-1)
View Full Code Here

                .setOpCode(ARP.OP_REPLY)
                .setSenderHardwareAddress(Ethernet.toMACAddress("00:44:33:22:11:00"))
                .setSenderProtocolAddress(IPv4.toIPv4AddressBytes("192.168.1.1"))
                .setTargetHardwareAddress(Ethernet.toMACAddress("00:11:22:33:44:55"))
                .setTargetProtocolAddress(IPv4.toIPv4AddressBytes("192.168.1.2")));
        byte[] testPacketSerialized = testPacket.serialize();

        // Build the PacketIn
        OFPacketIn pi = ((OFPacketIn) BasicFactory.getInstance().getMessage(OFType.PACKET_IN))
                .setBufferId(-1)
                .setInPort((short) 1)
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.