Package net.floodlightcontroller.packet

Examples of net.floodlightcontroller.packet.IPv4


            .setDestinationMACAddress("00:11:22:33:44:55")
            .setSourceMACAddress("00:44:33:22:11:00")
            .setVlanID((short) 42)
            .setEtherType(Ethernet.TYPE_IPv4)
            .setPayload(
                new IPv4()
                .setTtl((byte) 128)
                .setSourceAddress("192.168.1.1")
                .setDestinationAddress("192.168.1.2")
                .setPayload(new UDP()
                            .setSourcePort((short) 5000)
                            .setDestinationPort((short) 5001)
                            .setPayload(new Data(new byte[] {0x01}))));
        this.testPacketSerialized = testPacket.serialize();
        // Build a broadcast packet
        this.broadcastPacket = new Ethernet()
            .setDestinationMACAddress("FF:FF:FF:FF:FF:FF")
            .setSourceMACAddress("00:44:33:22:11:00")
            .setVlanID((short) 42)
            .setEtherType(Ethernet.TYPE_IPv4)
            .setPayload(
                new IPv4()
                .setTtl((byte) 128)
                .setSourceAddress("192.168.1.1")
                .setDestinationAddress("192.168.255.255")
                .setPayload(new UDP()
                        .setSourcePort((short) 5000)
                        .setDestinationPort((short) 5001)
                        .setPayload(new Data(new byte[] {0x01}))));

        this.broadcastPacketSerialized = broadcastPacket.serialize();
        this.testPacketReply = new Ethernet()
            .setDestinationMACAddress("00:44:33:22:11:00")
            .setSourceMACAddress("00:11:22:33:44:55")
            .setVlanID((short) 42)
            .setEtherType(Ethernet.TYPE_IPv4)
            .setPayload(
                    new IPv4()
                    .setTtl((byte) 128)
                    .setSourceAddress("192.168.1.2")
                    .setDestinationAddress("192.168.1.1")
                    .setPayload(new UDP()
                    .setSourcePort((short) 5001)
View Full Code Here


        Ethernet requestPacket = new Ethernet();
        requestPacket.setSourceMACAddress(hostMac.toBytes())
        .setDestinationMACAddress(broadcastMac)
        .setEtherType(Ethernet.TYPE_IPv4)
        .setPayload(
                new IPv4()
                .setVersion((byte)4)
                .setDiffServ((byte)0)
                .setIdentification((short)100)
                .setFlags((byte)0)
                .setFragmentOffset((short)0)
View Full Code Here

        .setDestinationMACAddress(dstMAC)
        .setSourceMACAddress(srcMAC)
        .setVlanID(vlan)
        .setEtherType(Ethernet.TYPE_IPv4)
        .setPayload(
                new IPv4()
                .setTtl((byte) 128)
                .setSourceAddress(srcIp)
                .setDestinationAddress(dstIp)
                .setPayload(new UDP()
                .setSourcePort((short) 5000)
View Full Code Here

     .setDestinationMACAddress(LBVip.LB_PROXY_MAC)
     .setEtherType(Ethernet.TYPE_IPv4)
     .setVlanID((short) 0)
     .setPriorityCode((byte) 0)
     .setPayload(
         new IPv4()
         .setSourceAddress("10.0.0.1")
         .setDestinationAddress("10.0.0.100")
         .setProtocol(IPv4.PROTOCOL_ICMP)
         .setPayload(new ICMP()
         .setIcmpCode((byte) 0)
         .setIcmpType((byte) 0)));

     icmpPacket1Serialized = icmpPacket1.serialize();

     icmpPacketIn1 =
             ((OFPacketIn) getMockFloodlightProvider().getOFMessageFactory().
                     getMessage(OFType.PACKET_IN))
                     .setBufferId(-1)
                     .setInPort((short) 1)
                     .setPacketData(icmpPacket1Serialized)
                     .setReason(OFPacketInReason.NO_MATCH)
                     .setTotalLength((short) icmpPacket1Serialized.length);

     icmpPacket2 = new Ethernet()
     .setSourceMACAddress("00:00:00:00:00:02")
     .setDestinationMACAddress(LBVip.LB_PROXY_MAC)
     .setEtherType(Ethernet.TYPE_IPv4)
     .setVlanID((short) 0)
     .setPriorityCode((byte) 0)
     .setPayload(
         new IPv4()
         .setSourceAddress("10.0.0.2")
         .setDestinationAddress("10.0.0.100")
         .setProtocol(IPv4.PROTOCOL_ICMP)
         .setPayload(new ICMP()
         .setIcmpCode((byte) 0)
View Full Code Here

        .setSourceMACAddress("00:11:22:33:44:55")
        .setDestinationMACAddress("00:44:33:22:11:01")
        .setEtherType(Ethernet.TYPE_IPv4)
        .setVlanID((short)5)
        .setPayload(
                    new IPv4()
                    .setTtl((byte) 128)
                    .setSourceAddress("192.168.1.2")
                    .setDestinationAddress("192.168.1.1")
                    .setPayload(new UDP()
                    .setSourcePort((short) 5000)
View Full Code Here

TOP

Related Classes of net.floodlightcontroller.packet.IPv4

Copyright © 2018 www.massapicom. 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.