Skip to content
Snippets Groups Projects
Commit bc71db27 authored by Djojomoenawie, N.E. (Nathan, Student M-CS)'s avatar Djojomoenawie, N.E. (Nathan, Student M-CS) :speech_balloon:
Browse files

Add set_direction() stub

parent 8fb945aa
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ parser MyParser(packet_in packet,
************ C H E C K S U M V E R I F I C A T I O N *************
*************************************************************************/
control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
apply { }
}
......@@ -108,7 +108,7 @@ control MyIngress(inout headers hdr,
action drop() {
mark_to_drop(standard_metadata);
}
action compute_hashes(ip4Addr_t ipAddr1, ip4Addr_t ipAddr2, bit<16> port1, bit<16> port2){
//Get register position
hash(reg_pos_one, HashAlgorithm.crc16, (bit<32>)0, {ipAddr1,
......@@ -128,7 +128,10 @@ control MyIngress(inout headers hdr,
action ipv4_forward(macAddr_t dstAddr, egressSpec_t port) {
}
action set_direction(bit dir){
}
table ipv4_lpm {
key = {
hdr.ipv4.dstAddr: lpm;
......@@ -154,7 +157,7 @@ control MyIngress(inout headers hdr,
size = 1024;
default_action = NoAction();
}
apply {
ipv4_lpm.apply();
/*
......@@ -179,7 +182,7 @@ control MyIngress(inout headers hdr,
Here is a PSEUDOCODE of a possible solution.
if(tcp_is_valid(packet)):
if(packet_ports_must_be_filtered(packet)):
packet_flow = direction
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment