// P4Testgen Protobuf template.
syntax = "proto3";

package p4testgen;

import "p4/v1/p4runtime.proto";

message InputPacketAtPort {
    // The raw bytes of the test packet.
    bytes packet = 1;
    // The raw bytes of the port associated with the packet.
    int32 port = 2;
}

message OutputPacketAtPort {
    // The raw bytes of the test packet.
    bytes packet = 1;
    // The raw bytes of the port associated with the packet.
    int32 port = 2;
    // The don't care mask of the packet.
    bytes packet_mask = 3;
}

message TestCase {
    // The input packet.
    InputPacketAtPort input_packet = 1;
    // The corresponding expected output packet.
    repeated OutputPacketAtPort expected_output_packet = 2;
    // The entities (e.g., table entries) to install on the switch before
    // injecting the `input_packet`.
    repeated p4.v1.Entity entities = 3;
    // The trace associated with this particular test.
    repeated string traces = 4;
    // Additional metadata and information.
    repeated string metadata = 5;
}
