.setDestinationMACAddress("ff:ff:ff:ff:ff:ff")
.setEtherType(Ethernet.TYPE_ARP)
.setVlanID((short) 0)
.setPriorityCode((byte) 0)
.setPayload(
new ARP()
.setHardwareType(ARP.HW_TYPE_ETHERNET)
.setProtocolType(ARP.PROTO_TYPE_IP)
.setHardwareAddressLength((byte) 6)
.setProtocolAddressLength((byte) 4)
.setOpCode(ARP.OP_REQUEST)
.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)
.setInPort((short) 1)
.setPacketData(arpRequest1Serialized)
.setReason(OFPacketInReason.NO_MATCH)
.setTotalLength((short) arpRequest1Serialized.length);
IFloodlightProviderService.bcStore.put(cntx,
IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
(Ethernet) arpRequest1);
// Mock proxy arp packet-out
arpReply1 = new Ethernet()
.setSourceMACAddress(LBVip.LB_PROXY_MAC)
.setDestinationMACAddress(HexString.fromHexString("00:00:00:00:00:01"))
.setEtherType(Ethernet.TYPE_ARP)
.setVlanID((short) 0)
.setPriorityCode((byte) 0)
.setPayload(
new ARP()
.setHardwareType(ARP.HW_TYPE_ETHERNET)
.setProtocolType(ARP.PROTO_TYPE_IP)
.setHardwareAddressLength((byte) 6)
.setProtocolAddressLength((byte) 4)
.setOpCode(ARP.OP_REPLY)