You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

12 lines
231 B

#ifndef PORT_BY_IP_ENDING
#define PORT_BY_IP_ENDING
if(hdr.ipv6.isValid()) {
set_egress_port((bit<8>) (hdr.ipv6.dst_addr & 0xff));
}
if(hdr.ipv4.isValid()) {
set_egress_port((bit<8>) (hdr.ipv4.dst_addr & 0xff));
}
#endif