From b7bb8d08405c79a9b7dff0922d8bba59d810e0c6 Mon Sep 17 00:00:00 2001 From: Korel Date: Sun, 15 Jun 2025 00:11:13 -0700 Subject: [PATCH 1/2] Consolidate Headers Consolidate System headers to common.h Signed-off-by: Korel --- common.h | 3 +++ main.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common.h b/common.h index c90ba55..78dafe2 100644 --- a/common.h +++ b/common.h @@ -18,6 +18,9 @@ #include #include #include +#include +#include +#include #endif diff --git a/main.c b/main.c index ab0ff54..66ea72d 100644 --- a/main.c +++ b/main.c @@ -4,10 +4,7 @@ #include "rate_limit.h" #include "vlan.h" #include "errno.h" -#include -#include -#include -#include +#include "common.h" bool globally_enabled_DAI = false; //Default is false From d2ad6bd2d56cebc697aed89b565af472720d92f1 Mon Sep 17 00:00:00 2001 From: Korel Date: Sun, 15 Jun 2025 00:32:50 -0700 Subject: [PATCH 2/2] Fix: Python Helper Tests Naming Python Helper Tests naming was changed to confirm to C standards Signed-off-by: Korel --- tests/core_dai_features/test_above_rate_limit.sh | 4 ++-- tests/core_dai_features/test_arp_poisoning.sh | 4 ++-- tests/core_dai_features/test_below_rate_limit.sh | 4 ++-- .../test_communication_after_dhcp_snooping.sh | 6 +++--- .../test_communication_from_unacknowledged_sources.sh | 4 ++-- .../core_dai_features/test_static_entry_in_the_arp_table.sh | 4 ++-- tests/core_dai_features/test_trusted_interfaces.sh | 4 ++-- tests/core_dai_features/test_untrusted_interfaces.sh | 4 ++-- tests/edge_cases/test_malformed_arp_request.sh | 4 ++-- tests/param_behavior/test_dai_vlan_filtering.sh | 6 +++--- tests/param_behavior/test_globally_enabled_dai.sh | 6 +++--- tests/param_behavior/test_static_acl_enabled.sh | 6 +++--- .../arp_request_and_response_with_vlan_id.py} | 0 .../arp_request_and_response_without_vlan_id.py} | 0 .../dhcp_with_vlan_10.py} | 0 .../dhcp_without_vlan.py} | 0 .../send_arp_packets_above_limit.py} | 0 .../send_arp_packets_above_limit_original.py} | 0 .../send_arp_packets_below_limit.py} | 0 .../send_arp_packets_below_limit_original.py} | 0 .../send_arp_packets_vlan10.py} | 0 .../send_arp_packets_vlan20.py} | 0 .../test_malformed_arp_with_vlan.py} | 0 tests/set_params/test_add_trusted_interface.sh | 2 +- tests/set_params/test_add_trusted_interfaces.sh | 2 +- tests/set_params/test_add_trusted_interfaces_malformed.sh | 2 +- tests/set_params/test_add_vlan.sh | 2 +- tests/set_params/test_add_vlans.sh | 2 +- tests/set_params/test_add_vlans_malformed.sh | 2 +- tests/set_params/test_set_globally_enabled_dai.sh | 2 +- tests/set_params/test_set_globally_enabled_dai_malformed.sh | 2 +- tests/set_params/test_set_static_acl_enabled.sh | 2 +- tests/set_params/test_set_static_acl_enabled_malformed.sh | 2 +- 33 files changed, 38 insertions(+), 38 deletions(-) rename tests/{helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py => python_helpers/arp_request_and_response_with_vlan_id.py} (100%) rename tests/{helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py => python_helpers/arp_request_and_response_without_vlan_id.py} (100%) rename tests/{helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py => python_helpers/dhcp_with_vlan_10.py} (100%) rename tests/{helperPythonFilesForCustomPackets/DHCP_without_VLAN.py => python_helpers/dhcp_without_vlan.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit.py => python_helpers/send_arp_packets_above_limit.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit_original.py => python_helpers/send_arp_packets_above_limit_original.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit.py => python_helpers/send_arp_packets_below_limit.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit_original.py => python_helpers/send_arp_packets_below_limit_original.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN10.py => python_helpers/send_arp_packets_vlan10.py} (100%) rename tests/{helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN20.py => python_helpers/send_arp_packets_vlan20.py} (100%) rename tests/{helperPythonFilesForCustomPackets/Test_Malformed_ARP_with_VLAN.py => python_helpers/test_malformed_arp_with_vlan.py} (100%) diff --git a/tests/core_dai_features/test_above_rate_limit.sh b/tests/core_dai_features/test_above_rate_limit.sh index e3367cb..f76fbdf 100644 --- a/tests/core_dai_features/test_above_rate_limit.sh +++ b/tests/core_dai_features/test_above_rate_limit.sh @@ -45,7 +45,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -64,7 +64,7 @@ echo echo "=== Testing DAI Drops Packets When Rate Limit is Reached ===" echo #Send arp packets above the rate limit -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit.py +sudo ip netns exec ns1 python3 ../python_helpers/send_arp_packets_above_limit.py sudo dmesg | grep "DROPPING" sudo dmesg | grep "Packet hit the rate limit." diff --git a/tests/core_dai_features/test_arp_poisoning.sh b/tests/core_dai_features/test_arp_poisoning.sh index 45148c5..5f86cbd 100644 --- a/tests/core_dai_features/test_arp_poisoning.sh +++ b/tests/core_dai_features/test_arp_poisoning.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -65,7 +65,7 @@ echo echo "=== Testing DAI Drops Spoofed Packets ===" echo #Update the DHCP table with 192.168.1.1 and 192.168.1.2 -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/DHCP_without_VLAN.py +sudo ip netns exec ns1 python3 ../python_helpers/dhcp_without_vlan.py #Tell 192.168.1.11 you are somebody else already on the network (Perform Arp poisoning attack) sudo ip netns exec ns1 sudo arpspoof -i veth0 -t 192.168.1.11 192.168.1.2 & sleep 3 diff --git a/tests/core_dai_features/test_below_rate_limit.sh b/tests/core_dai_features/test_below_rate_limit.sh index 99393b9..9fa9ac4 100644 --- a/tests/core_dai_features/test_below_rate_limit.sh +++ b/tests/core_dai_features/test_below_rate_limit.sh @@ -45,7 +45,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -65,7 +65,7 @@ echo "=== Testing DAI Accepts Packets when Rate Limit is Not Yet Reached ===" echo #Send arp packets above the rate limit -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit.py +sudo ip netns exec ns1 python3 ../python_helpers/send_arp_packets_below_limit.py if ! dmesg | grep -q "Packet hit the rate limit."; then # Pattern not found echo "Packet hit the rate limit.' was NOT found" diff --git a/tests/core_dai_features/test_communication_after_dhcp_snooping.sh b/tests/core_dai_features/test_communication_after_dhcp_snooping.sh index 1863161..031461c 100644 --- a/tests/core_dai_features/test_communication_after_dhcp_snooping.sh +++ b/tests/core_dai_features/test_communication_after_dhcp_snooping.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -64,9 +64,9 @@ echo echo "=== Testing DAI Accepts Packets From DHCP Acknowledged Sources ===" echo # Create and send the switch a Cusotm DHCP packet ACK for both 192.168.1.1 and 192.168.1.2 with VLAN_ID 10 -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py +sudo ip netns exec ns1 python3 ../python_helpers/dhcp_with_vlan_10.py #Send and ARP Request and wait for a Response -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py sudo dmesg | grep "ACCEPTING" sudo dmesg | grep "The DHCP Snooping table matched." diff --git a/tests/core_dai_features/test_communication_from_unacknowledged_sources.sh b/tests/core_dai_features/test_communication_from_unacknowledged_sources.sh index e0cea31..8406bc7 100644 --- a/tests/core_dai_features/test_communication_from_unacknowledged_sources.sh +++ b/tests/core_dai_features/test_communication_from_unacknowledged_sources.sh @@ -45,7 +45,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -63,7 +63,7 @@ echo echo "=== Testing DAI Filtering From Unacknowledged Sources ===" echo #Send arp request without first being added to the DHCP or Static ARP table -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py sudo dmesg | tail -n 20 | grep "DROPPING" sudo dmesg | tail -n 20 | grep "It is not possible to Validate Source." diff --git a/tests/core_dai_features/test_static_entry_in_the_arp_table.sh b/tests/core_dai_features/test_static_entry_in_the_arp_table.sh index cb32664..5f92bee 100644 --- a/tests/core_dai_features/test_static_entry_in_the_arp_table.sh +++ b/tests/core_dai_features/test_static_entry_in_the_arp_table.sh @@ -45,7 +45,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -71,7 +71,7 @@ sudo ip netns exec ns2 ip link set veth3 up sudo arp -s 192.168.1.1 e2:c8:14:a6:4f:ed -i veth1 sudo arp -s 192.168.1.2 3a:18:70:ca:91:b2 -i veth2 #Test communicaiton after static entries were added -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py sudo dmesg | grep "ACCEPTING" sudo dmesg | grep "A Known Mac Adress with the same Source IP was the same as the received Mac Address" diff --git a/tests/core_dai_features/test_trusted_interfaces.sh b/tests/core_dai_features/test_trusted_interfaces.sh index c40220f..558ef12 100644 --- a/tests/core_dai_features/test_trusted_interfaces.sh +++ b/tests/core_dai_features/test_trusted_interfaces.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -66,7 +66,7 @@ echo "=== Testing DAI Accepts Packets From Trusted Interfaces ===" echo #Send and ARP Request and wait for a Response #Requests will default to VLAN 1, and will match with veth0 and veth3 -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg | grep "ACCEPTING" sudo dmesg | grep "The Interface was Trusted" diff --git a/tests/core_dai_features/test_untrusted_interfaces.sh b/tests/core_dai_features/test_untrusted_interfaces.sh index a27aa42..91a9835 100644 --- a/tests/core_dai_features/test_untrusted_interfaces.sh +++ b/tests/core_dai_features/test_untrusted_interfaces.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -64,7 +64,7 @@ echo echo "=== Testing DAI Accepts Packets From Untrusted Interfaces ===" echo #Send and ARP Request and wait for a Response -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg | grep "Interface is UNTRUSTED" sudo dmesg | grep "It is not possible to Validate Source." diff --git a/tests/edge_cases/test_malformed_arp_request.sh b/tests/edge_cases/test_malformed_arp_request.sh index e989358..856f2b0 100644 --- a/tests/edge_cases/test_malformed_arp_request.sh +++ b/tests/edge_cases/test_malformed_arp_request.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -63,7 +63,7 @@ echo echo "=== Testing DAI Malformed ARP Request ===" echo #Send a Malformed ARP request -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/Test_Malformed_ARP_with_VLAN.py +sudo ip netns exec ns1 python3 ../python_helpers/test_malformed_arp_with_vlan.py sudo dmesg | grep "DROPPING" diff --git a/tests/param_behavior/test_dai_vlan_filtering.sh b/tests/param_behavior/test_dai_vlan_filtering.sh index 53ce88e..6abf197 100644 --- a/tests/param_behavior/test_dai_vlan_filtering.sh +++ b/tests/param_behavior/test_dai_vlan_filtering.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -64,9 +64,9 @@ echo echo "=== Testing DAI compares VLAN_IDs to added entries ===" echo #Send ARP Request with a VLAN that is configured for inspection -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py #Send ARP Request with a VLAN that is NOT configured for inspection (Default VLAN_ID) -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg | grep "vlan_id 10 WAS FOUND in the hash table. INSPECTING" sudo dmesg | grep "vlan_id 1 was NOT in the HASH TABLE" diff --git a/tests/param_behavior/test_globally_enabled_dai.sh b/tests/param_behavior/test_globally_enabled_dai.sh index 62d188f..998dc7d 100644 --- a/tests/param_behavior/test_globally_enabled_dai.sh +++ b/tests/param_behavior/test_globally_enabled_dai.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -65,9 +65,9 @@ echo echo "=== Testing DAI Inspects all packets ===" echo # Create and send the switch a Cusotm DHCP packet ACK for both 192.168.1.1 and 192.168.1.2 with VLAN_ID 10 -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py +sudo ip netns exec ns1 python3 ../python_helpers/dhcp_with_vlan_10.py #Send and ARP Request and wait for a Response -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py sudo dmesg | grep "globally_enabled_DAI was ENABLED" diff --git a/tests/param_behavior/test_static_acl_enabled.sh b/tests/param_behavior/test_static_acl_enabled.sh index 1b51e91..cbd151b 100644 --- a/tests/param_behavior/test_static_acl_enabled.sh +++ b/tests/param_behavior/test_static_acl_enabled.sh @@ -47,7 +47,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo @@ -66,9 +66,9 @@ echo echo "=== Testing DAI rejcets all non Static Configurations ===" echo # Create and send the switch a Cusotm DHCP packet ACK for both 192.168.1.1 and 192.168.1.2 with VLAN_ID 10 -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py +sudo ip netns exec ns1 python3 ../python_helpers/dhcp_with_vlan_10.py #Send and ARP Request and wait for a Response -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_with_vlan_id.py sudo dmesg | grep "DROPPING" sudo dmesg | grep "Implicit Drop was Added since static_ACL was Enabled" diff --git a/tests/helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py b/tests/python_helpers/arp_request_and_response_with_vlan_id.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/ARP_Request_And_Response_With_VLAN_ID.py rename to tests/python_helpers/arp_request_and_response_with_vlan_id.py diff --git a/tests/helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py b/tests/python_helpers/arp_request_and_response_without_vlan_id.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py rename to tests/python_helpers/arp_request_and_response_without_vlan_id.py diff --git a/tests/helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py b/tests/python_helpers/dhcp_with_vlan_10.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/DHCP_with_VLAN_10.py rename to tests/python_helpers/dhcp_with_vlan_10.py diff --git a/tests/helperPythonFilesForCustomPackets/DHCP_without_VLAN.py b/tests/python_helpers/dhcp_without_vlan.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/DHCP_without_VLAN.py rename to tests/python_helpers/dhcp_without_vlan.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit.py b/tests/python_helpers/send_arp_packets_above_limit.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit.py rename to tests/python_helpers/send_arp_packets_above_limit.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit_original.py b/tests/python_helpers/send_arp_packets_above_limit_original.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Above_Limit_original.py rename to tests/python_helpers/send_arp_packets_above_limit_original.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit.py b/tests/python_helpers/send_arp_packets_below_limit.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit.py rename to tests/python_helpers/send_arp_packets_below_limit.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit_original.py b/tests/python_helpers/send_arp_packets_below_limit_original.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_Below_Limit_original.py rename to tests/python_helpers/send_arp_packets_below_limit_original.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN10.py b/tests/python_helpers/send_arp_packets_vlan10.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN10.py rename to tests/python_helpers/send_arp_packets_vlan10.py diff --git a/tests/helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN20.py b/tests/python_helpers/send_arp_packets_vlan20.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/send_ARP_Packets_VLAN20.py rename to tests/python_helpers/send_arp_packets_vlan20.py diff --git a/tests/helperPythonFilesForCustomPackets/Test_Malformed_ARP_with_VLAN.py b/tests/python_helpers/test_malformed_arp_with_vlan.py similarity index 100% rename from tests/helperPythonFilesForCustomPackets/Test_Malformed_ARP_with_VLAN.py rename to tests/python_helpers/test_malformed_arp_with_vlan.py diff --git a/tests/set_params/test_add_trusted_interface.sh b/tests/set_params/test_add_trusted_interface.sh index 311b247..d829cc8 100644 --- a/tests/set_params/test_add_trusted_interface.sh +++ b/tests/set_params/test_add_trusted_interface.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_add_trusted_interfaces.sh b/tests/set_params/test_add_trusted_interfaces.sh index 8e31297..edd3d3e 100644 --- a/tests/set_params/test_add_trusted_interfaces.sh +++ b/tests/set_params/test_add_trusted_interfaces.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_add_trusted_interfaces_malformed.sh b/tests/set_params/test_add_trusted_interfaces_malformed.sh index 9787a68..8212f1c 100644 --- a/tests/set_params/test_add_trusted_interfaces_malformed.sh +++ b/tests/set_params/test_add_trusted_interfaces_malformed.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -#sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +#sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_add_vlan.sh b/tests/set_params/test_add_vlan.sh index f6697a3..8e04502 100644 --- a/tests/set_params/test_add_vlan.sh +++ b/tests/set_params/test_add_vlan.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_add_vlans.sh b/tests/set_params/test_add_vlans.sh index 88423a4..3b523e5 100644 --- a/tests/set_params/test_add_vlans.sh +++ b/tests/set_params/test_add_vlans.sh @@ -46,7 +46,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_add_vlans_malformed.sh b/tests/set_params/test_add_vlans_malformed.sh index 4773f87..c09639b 100644 --- a/tests/set_params/test_add_vlans_malformed.sh +++ b/tests/set_params/test_add_vlans_malformed.sh @@ -46,7 +46,7 @@ sudo dmesg -n 3 echo echo "=== Ensure Working Test Environment ===" echo -#sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +#sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_set_globally_enabled_dai.sh b/tests/set_params/test_set_globally_enabled_dai.sh index 24256b3..c4e134f 100644 --- a/tests/set_params/test_set_globally_enabled_dai.sh +++ b/tests/set_params/test_set_globally_enabled_dai.sh @@ -47,7 +47,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_set_globally_enabled_dai_malformed.sh b/tests/set_params/test_set_globally_enabled_dai_malformed.sh index f923e97..1500a7e 100644 --- a/tests/set_params/test_set_globally_enabled_dai_malformed.sh +++ b/tests/set_params/test_set_globally_enabled_dai_malformed.sh @@ -46,7 +46,7 @@ sudo dmesg -n 3 echo echo "=== Ensure Working Test Environment ===" echo -#sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +#sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_set_static_acl_enabled.sh b/tests/set_params/test_set_static_acl_enabled.sh index 405896e..8dc5fd8 100644 --- a/tests/set_params/test_set_static_acl_enabled.sh +++ b/tests/set_params/test_set_static_acl_enabled.sh @@ -48,7 +48,7 @@ sudo ../testenv/setup_test_env.sh echo echo "=== Ensure Working Test Environment ===" echo -sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo diff --git a/tests/set_params/test_set_static_acl_enabled_malformed.sh b/tests/set_params/test_set_static_acl_enabled_malformed.sh index e6fc578..8c5b747 100644 --- a/tests/set_params/test_set_static_acl_enabled_malformed.sh +++ b/tests/set_params/test_set_static_acl_enabled_malformed.sh @@ -46,7 +46,7 @@ sudo dmesg -n 3 echo echo "=== Ensure Working Test Environment ===" echo -#sudo ip netns exec ns1 python3 ../helperPythonFilesForCustomPackets/ARP_Request_And_Response_Without_VLAN_ID.py +#sudo ip netns exec ns1 python3 ../python_helpers/arp_request_and_response_without_vlan_id.py sudo dmesg -C echo