Browse Source

Try to add real headers

master
Nico Schottelius 3 years ago
parent
commit
ad8988bb41
  1. 22
      p4src/minip4_solution.p4

22
p4src/minip4_solution.p4

@ -2,16 +2,18 @@
#include <sume_switch.p4>
#include "headers.p4"
typedef bit<48> EthAddr_t;
header Ethernet_h {
EthAddr_t dstAddr;
EthAddr_t srcAddr;
bit<16> etherType;
}
struct Parsed_packet {
Ethernet_h ethernet;
}
// typedef bit<48> EthAddr_t;
// header Ethernet_h {
// EthAddr_t dstAddr;
// EthAddr_t srcAddr;
// bit<16> etherType;
// }
typedef struct headers Parsed_packet;
//struct Parsed_packet {
// Ethernet_h ethernet;
//}
// user defined metadata: can be used to share information between
// TopParser, TopPipe, and TopDeparser

Loading…
Cancel
Save