blob: c8fb31f9c24e6b637b33d102fec46e4359efbc1f [file] [log] [blame]
#ifndef __HEADERS_P4__
#define __HEADERS_P4__
#ifdef __TOFINO_BUILD__
#include <tofino/intrinsic_metadata.p4>
#endif
header_type packet_in_t {
fields {
ingress_port: 9;
}
}
header_type packet_out_t {
fields {
egress_port: 9;
}
}
header_type ethernet_t {
fields {
dstAddr : 48;
srcAddr : 48;
etherType : 16;
}
}
header_type ipv4_t {
fields {
version : 4;
ihl : 4;
diffserv : 8;
totalLen : 16;
identification : 16;
flags : 3;
fragOffset : 13;
ttl : 8;
protocol : 8;
hdrChecksum : 16;
srcAddr : 32;
dstAddr: 32;
}
}
header_type tcp_t {
fields {
srcPort : 16;
dstPort : 16;
seqNo : 32;
ackNo : 32;
dataOffset : 4;
res : 3;
ecn : 3;
ctrl : 6;
window : 16;
checksum : 16;
urgentPtr : 16;
}
}
header_type udp_t {
fields {
srcPort : 16;
dstPort : 16;
length_ : 16;
checksum : 16;
}
}
#endif