|
|
|
@ -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 |
|
|
|
|