use of org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceivedBuilder in project genius by opendaylight.
the class ArpUtilTestUtil method createPayload.
public static PacketReceived createPayload(int oc) {
final short ID = 2;
byte[] payload = bytePayload(// Destination MAC
"1F 1F 1F 1F 1F 1F", // Source MAC
"00 01 02 03 04 05", // Ethernet type
"08 06", // Hardware type
"0 1", // Protocol type
"8 0", // Hardware size
"6", // Protocol size
"4", // Opcode
OP_CODE[oc], // Sender MAC Address
"00 01 02 03 04 05", // Sender IP Address
"C0 A8 0 2", // Target MAC Address
"00 01 02 03 04 05", // Target IP Address
"C0 A8 0 2");
return new PacketReceivedBuilder().setPacketInReason(SendToController.class).setTableId(new TableId(ID)).setPayload(payload).setIngress(new NodeConnectorRef(InstanceIdentifier.create(Node.class))).setMatch(new MatchBuilder().setMetadata(new MetadataBuilder().setMetadata(META_DATA).build()).build()).build();
}
Aggregations