TNSM_Latency_Prediction / code / parser / 19_testcase3_edge_parser / constants.p4
constants.p4
Raw
const bit<16> ETHERTYPE_MPLS = 0x8847;
const bit<16> ETHERTYPE_IPV4 = 0x0800;
const bit<16> ETHERTYPE_IPV6 = 0x86DD;

const bit<8> IPPROTO_TCP = 0x06;
const bit<8> IPPROTO_UDP = 0x11;

const bit<1> MPLS_END = 0x1;

const bit<4> NEXT_HEADER_IPV4   = 0x0; //This should be 0x4. Cannot generate EoMPLS packets, so we trick the parser.
const bit<4> NEXT_HEADER_IPV6   = 0x1; //Should be 0x6
const bit<4> NEXT_HEADER_EOMPLS = 0x4; //Make it think it is a PW Control Word when it is 0x4 in reality