blob: d49737000c878148ecfdc346f57b1f733a2063bc [file] [log] [blame]
Yi Tseng21629932017-06-06 11:17:43 -07001#ifndef HEADERS
2#define HEADERS
3struct intrinsic_metadata_t {
4 bit<32> ingress_global_timestamp;
5 bit<32> lf_field_list;
6 bit<16> mcast_grp;
7 bit<16> egress_rid;
8}
9
10header ethernet_t {
11 bit<48> dstAddr;
12 bit<48> srcAddr;
13 bit<16> etherType;
14}
15
16header ipv4_t {
17 bit<4> version;
18 bit<4> ihl;
19 bit<8> diffserv;
20 bit<16> totalLen;
21 bit<16> identification;
22 bit<3> flags;
23 bit<13> fragOffset;
24 bit<8> ttl;
25 bit<8> protocol;
26 bit<16> hdrChecksum;
27 bit<32> srcAddr;
28 bit<32> dstAddr;
29}
30
31header tcp_t {
32 bit<16> srcPort;
33 bit<16> dstPort;
34 bit<32> seqNo;
35 bit<32> ackNo;
36 bit<4> dataOffset;
37 bit<3> res;
38 bit<3> ecn;
39 bit<6> ctrl;
40 bit<16> window;
41 bit<16> checksum;
42 bit<16> urgentPtr;
43}
44
45header udp_t {
46 bit<16> srcPort;
47 bit<16> dstPort;
48 bit<16> length_;
49 bit<16> checksum;
50}
51
52struct headers {
53 ethernet_t ethernet;
54 ipv4_t ipv4;
55 tcp_t tcp;
56 udp_t udp;
57}
58#endif