├── sdn_nfv_tests ├── .Dockerfile.swp ├── ubuntu │ ├── public-html │ │ └── logo-tec.jpg │ └── Dockerfile ├── Dockerfile1 └── client_traffic.sh ├── flowCollector ├── .gradle │ ├── 4.4.1 │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileHashes │ │ │ ├── fileHashes.bin │ │ │ ├── fileHashes.lock │ │ │ └── resourceHashesCache.bin │ │ ├── fileContent │ │ │ ├── fileContent.lock │ │ │ └── annotation-processors.bin │ │ └── taskHistory │ │ │ ├── taskHistory.bin │ │ │ └── taskHistory.lock │ └── buildOutputCleanup │ │ ├── cache.properties │ │ ├── outputFiles.bin │ │ └── buildOutputCleanup.lock ├── settings.gradle ├── target │ ├── maven-archiver │ │ └── pom.properties │ ├── maven-status │ │ └── maven-compiler-plugin │ │ │ ├── testCompile │ │ │ └── default-testCompile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ ├── surefire-reports │ │ ├── null-output.txt │ │ └── mx.itesm.intelligentddosmitigation.intelligentddosmitigationTest.txt │ ├── classes │ │ └── mx │ │ │ └── itesm │ │ │ ├── api │ │ │ ├── ApiResponse.class │ │ │ └── flow │ │ │ │ ├── FlowApi.class │ │ │ │ └── FlowRuleId.class │ │ │ └── intelligentddosmitigation │ │ │ ├── Helpers.class │ │ │ ├── jnetpcap │ │ │ ├── Utils.class │ │ │ ├── Protocol.class │ │ │ ├── TcpState.class │ │ │ ├── BasicFlow.class │ │ │ ├── MutableInt.class │ │ │ ├── DateFormatter.class │ │ │ ├── FlowFeature$1.class │ │ │ ├── FlowFeature.class │ │ │ ├── FlowGenerator.class │ │ │ ├── IdGenerator.class │ │ │ ├── PacketReader.class │ │ │ ├── PcapIfWrapper.class │ │ │ ├── BasicPacketInfo.class │ │ │ ├── TcpState$State.class │ │ │ └── worker │ │ │ │ ├── PcapReader.class │ │ │ │ ├── InsertCsvRow.class │ │ │ │ ├── FlowGenListener.class │ │ │ │ ├── ReadPcapFileWorker.class │ │ │ │ ├── TrafficFlowWorker.class │ │ │ │ ├── TrafficFlowWorkerY.class │ │ │ │ ├── LoadPcapInterfaceWorker.class │ │ │ │ ├── PcapReader$FlowListener.class │ │ │ │ └── ReadPcapFileWorker$FlowListener.class │ │ │ ├── Mitigation │ │ │ ├── Mitigation.class │ │ │ └── Mitigation$InternalIntentListener.class │ │ │ ├── TopoMonitor │ │ │ └── TopologyMonitor.class │ │ │ ├── intelligentddosmitigation$1.class │ │ │ ├── intelligentddosmitigation.class │ │ │ ├── intelligentddosmitigation$PacketCollector.class │ │ │ └── intelligentddosmitigation$ReactivePacketProcessor.class │ ├── intelligentddosmitigation-1.0-SNAPSHOT.jar │ ├── intelligentddosmitigation-1.0-SNAPSHOT.oar │ ├── intelligentddosmitigation-1.0-SNAPSHOT-tests.jar │ ├── test-classes │ │ └── mx │ │ │ └── itesm │ │ │ └── intelligentddosmitigation │ │ │ └── intelligentddosmitigationTest.class │ └── oar │ │ ├── m2 │ │ └── mx │ │ │ └── itesm │ │ │ └── intelligentddosmitigation │ │ │ └── intelligentddosmitigation │ │ │ └── 1.0-SNAPSHOT │ │ │ ├── intelligentddosmitigation-1.0-SNAPSHOT.jar │ │ │ └── intelligentddosmitigation-1.0-SNAPSHOT-features.xml │ │ └── app.xml ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── jnetpcap │ ├── jnetpcap-src-1.3.0-1.zip │ ├── jnetpcap-javadoc-1.3.0-1.zip │ ├── jnetpcap-src-1.4.r1425-1.zip │ ├── win │ │ ├── jnetpcap-1.3.0 │ │ │ ├── jnetpcap.dll │ │ │ ├── jnetpcap.jar │ │ │ └── include │ │ │ │ ├── winpcap_ext.h │ │ │ │ ├── export.h │ │ │ │ ├── winpcap_stat_ex.h │ │ │ │ ├── jnetpcap_bpf.h │ │ │ │ ├── jnetpcap_dumper.h │ │ │ │ ├── winpcap_ids.h │ │ │ │ ├── analysis.h │ │ │ │ ├── util_in_cksum.h │ │ │ │ ├── packet_flow.h │ │ │ │ ├── nio_jmemory.h │ │ │ │ ├── util_debug.h │ │ │ │ ├── jnetpcap_ids.h │ │ │ │ ├── util_crc16.h │ │ │ │ └── util_crc32.h │ │ └── jnetpcap-1.4.r1425 │ │ │ ├── jnetpcap.dll │ │ │ ├── jnetpcap.jar │ │ │ ├── jnetpcap-pcap100.dll │ │ │ └── include │ │ │ ├── mac_addr.h │ │ │ ├── winpcap_ext.h │ │ │ ├── export.h │ │ │ ├── winpcap_stat_ex.h │ │ │ ├── jnetpcap_bpf.h │ │ │ ├── jnetpcap_dumper.h │ │ │ ├── winpcap_ids.h │ │ │ ├── analysis.h │ │ │ ├── util_in_cksum.h │ │ │ ├── packet_flow.h │ │ │ ├── util_debug.h │ │ │ ├── jnetpcap_ids.h │ │ │ ├── util_crc16.h │ │ │ ├── nio_jmemory.h │ │ │ └── util_crc32.h │ ├── jnetpcap-javadoc-1.4.r1425-1.zip │ └── linux │ │ ├── jnetpcap-1.3.0 │ │ ├── jnetpcap.jar │ │ ├── libjnetpcap.so │ │ └── include │ │ │ ├── winpcap_ext.h │ │ │ ├── export.h │ │ │ ├── winpcap_stat_ex.h │ │ │ ├── jnetpcap_bpf.h │ │ │ ├── jnetpcap_dumper.h │ │ │ ├── winpcap_ids.h │ │ │ ├── analysis.h │ │ │ ├── util_in_cksum.h │ │ │ ├── packet_flow.h │ │ │ ├── nio_jmemory.h │ │ │ ├── util_debug.h │ │ │ ├── jnetpcap_ids.h │ │ │ ├── util_crc16.h │ │ │ └── util_crc32.h │ │ └── jnetpcap-1.4.r1425 │ │ ├── jnetpcap.jar │ │ ├── libjnetpcap.so │ │ ├── libjnetpcap-pcap100.so │ │ └── include │ │ ├── mac_addr.h │ │ ├── winpcap_ext.h │ │ ├── export.h │ │ ├── winpcap_stat_ex.h │ │ ├── jnetpcap_bpf.h │ │ ├── jnetpcap_dumper.h │ │ ├── winpcap_ids.h │ │ ├── analysis.h │ │ ├── util_in_cksum.h │ │ ├── packet_flow.h │ │ ├── util_debug.h │ │ ├── jnetpcap_ids.h │ │ ├── util_crc16.h │ │ ├── nio_jmemory.h │ │ └── util_crc32.h ├── build │ └── classes │ │ └── java │ │ └── main │ │ └── mx │ │ └── itesm │ │ └── FlowCollector │ │ ├── FlowCollector$1.class │ │ ├── FlowCollector.class │ │ ├── jnetpcap │ │ ├── Utils.class │ │ ├── Protocol.class │ │ ├── TcpState.class │ │ ├── BasicFlow.class │ │ ├── FlowFeature.class │ │ ├── IdGenerator.class │ │ ├── MutableInt.class │ │ ├── DateFormatter.class │ │ ├── FlowFeature$1.class │ │ ├── FlowGenerator.class │ │ ├── PacketReader.class │ │ ├── PcapIfWrapper.class │ │ ├── BasicPacketInfo.class │ │ ├── TcpState$State.class │ │ └── worker │ │ │ ├── PcapReader.class │ │ │ ├── InsertCsvRow.class │ │ │ ├── FlowGenListener.class │ │ │ ├── ReadPcapFileWorker.class │ │ │ ├── TrafficFlowWorker.class │ │ │ ├── LoadPcapInterfaceWorker.class │ │ │ ├── PcapReader$FlowListener.class │ │ │ └── ReadPcapFileWorker$FlowListener.class │ │ └── FlowCollectorTest.class ├── src │ ├── main │ │ └── java │ │ │ └── mx │ │ │ └── itesm │ │ │ └── FlowCollector │ │ │ └── jnetpcap │ │ │ ├── worker │ │ │ ├── FlowGenListener.java │ │ │ ├── LoadPcapInterfaceWorker.java │ │ │ └── InsertCsvRow.java │ │ │ ├── IdGenerator.java │ │ │ ├── PcapIfWrapper.java │ │ │ ├── Protocol.java │ │ │ ├── DateFormatter.java │ │ │ └── Utils.java │ └── test │ │ └── java │ │ └── mx │ │ └── itesm │ │ └── FlowCollector │ │ └── FlowCollectorTest.java ├── LICENSE.txt ├── Flow_Saving.py └── gradlew.bat ├── ips ├── config.pyc ├── utils.pyc ├── manager.pyc ├── __pycache__ │ ├── agent.cpython-38.pyc │ ├── agentq.cpython-38.pyc │ ├── config.cpython-38.pyc │ ├── utils.cpython-38.pyc │ ├── consume.cpython-38.pyc │ ├── manager.cpython-38.pyc │ └── enviroment.cpython-38.pyc ├── config.py ├── test_metering_manager.py ├── utils.py └── agentq.py ├── fwd_ ├── target │ ├── maven-archiver │ │ └── pom.properties │ ├── maven-status │ │ └── maven-compiler-plugin │ │ │ ├── testCompile │ │ │ └── default-testCompile │ │ │ │ ├── createdFiles.lst │ │ │ │ └── inputFiles.lst │ │ │ └── compile │ │ │ └── default-compile │ │ │ ├── inputFiles.lst │ │ │ └── createdFiles.lst │ ├── reactiveFwd-1.0-SNAPSHOT.jar │ ├── reactiveFwd-1.0-SNAPSHOT.oar │ ├── reactiveFwd-1.0-SNAPSHOT-tests.jar │ ├── surefire-reports │ │ ├── null-output.txt │ │ └── mx.itesm.reactiveFwd.reactiveFwdTest.txt │ ├── classes │ │ ├── mx │ │ │ └── itesm │ │ │ │ └── reactiveFwd │ │ │ │ ├── reactiveFwd.class │ │ │ │ ├── OsgiPropertyConstants.class │ │ │ │ ├── ReactiveForwardMetrics.class │ │ │ │ ├── reactiveFwd$SrcDstPair.class │ │ │ │ ├── reactiveFwd$SRLinkWeigher.class │ │ │ │ ├── reactiveFwd$ReactivePacketProcessor.class │ │ │ │ └── reactiveFwd$InternalTopologyListener.class │ │ └── META-INF │ │ │ └── MANIFEST.MF │ ├── test-classes │ │ └── mx │ │ │ └── itesm │ │ │ └── reactiveFwd │ │ │ └── reactiveFwdTest.class │ └── oar │ │ ├── m2 │ │ └── mx │ │ │ └── itesm │ │ │ └── reactiveFwd │ │ │ └── reactiveFwd │ │ │ └── 1.0-SNAPSHOT │ │ │ ├── reactiveFwd-1.0-SNAPSHOT.jar │ │ │ └── reactiveFwd-1.0-SNAPSHOT-features.xml │ │ └── app.xml ├── src │ ├── test │ │ └── java │ │ │ └── mx │ │ │ └── itesm │ │ │ └── reactiveFwd │ │ │ └── reactiveFwdTest.java │ └── main │ │ └── java │ │ └── mx │ │ └── itesm │ │ └── reactiveFwd │ │ ├── ReactiveForwardMetrics.java │ │ └── OsgiPropertyConstants.java └── pom.xml ├── ids └── slow_rate │ └── lstm_testbed_based │ ├── LSTM │ ├── model.h5 │ ├── sc.joblib │ └── pca.joblib │ └── __pycache__ │ ├── lstm_server_for_ips.cpython-38.pyc │ └── lstm_server_for_ips_improved.cpython-38.pyc ├── traffic_engineering ├── target │ ├── traffic-engineering-1.0-SNAPSHOT.jar │ ├── traffic-engineering-1.0-SNAPSHOT.oar │ ├── classes │ │ └── org │ │ │ └── itesm │ │ │ ├── trafficEngineering │ │ │ ├── Route.class │ │ │ ├── Routes.class │ │ │ ├── TrafficEngineeringResource.class │ │ │ ├── TrafficEngineeringApplication.class │ │ │ └── TrafficEngineeringResource$SRLinkWeigher.class │ │ │ ├── linkDelay │ │ │ ├── impl │ │ │ │ ├── LinkQualityManager.class │ │ │ │ ├── LinkQualityManager$1.class │ │ │ │ ├── OsgiPropertyConstants.class │ │ │ │ ├── LinkQualityManager$LinkProbeReceiver.class │ │ │ │ ├── LinkQualityManager$ProbeLinkQualityTask.class │ │ │ │ └── LinkQualityManager$CalculateLinkQualityTask.class │ │ │ └── intf │ │ │ │ └── LinkQualityService.class │ │ │ └── resetConnection │ │ │ ├── impl │ │ │ ├── ResetConnection.class │ │ │ ├── ResetConnection$1.class │ │ │ ├── OsgiPropertyConstants.class │ │ │ └── ResetConnection$MyPacketProcessor.class │ │ │ └── intf │ │ │ └── ResetConnectionService.class │ ├── oar │ │ ├── m2 │ │ │ └── org │ │ │ │ └── itesm │ │ │ │ └── traffic-engineering │ │ │ │ └── 1.0-SNAPSHOT │ │ │ │ ├── traffic-engineering-1.0-SNAPSHOT.jar │ │ │ │ └── traffic-engineering-1.0-SNAPSHOT-features.xml │ │ └── app.xml │ └── maven-status │ │ └── maven-compiler-plugin │ │ └── compile │ │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst └── src │ └── main │ ├── java │ └── org │ │ └── itesm │ │ ├── trafficEngineering │ │ ├── TrafficEngineeringApplication.java │ │ ├── package-info.java │ │ ├── Routes.java │ │ └── Route.java │ │ ├── resetConnection │ │ ├── intf │ │ │ └── ResetConnectionService.java │ │ └── impl │ │ │ └── OsgiPropertyConstants.java │ │ └── linkDelay │ │ └── intf │ │ └── LinkQualityService.java │ └── webapp │ └── WEB-INF │ └── web.xml ├── LICENSE └── README.md /sdn_nfv_tests/.Dockerfile.swp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /flowCollector/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'CICFlowMeter' 2 | -------------------------------------------------------------------------------- /ips/config.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/config.pyc -------------------------------------------------------------------------------- /ips/utils.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/utils.pyc -------------------------------------------------------------------------------- /ips/manager.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/manager.pyc -------------------------------------------------------------------------------- /flowCollector/.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Fri May 14 09:57:15 CDT 2021 2 | gradle.version=4.4.1 3 | -------------------------------------------------------------------------------- /fwd_/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | artifactId=reactiveFwd 2 | groupId=mx.itesm.reactiveFwd 3 | version=1.0-SNAPSHOT 4 | -------------------------------------------------------------------------------- /flowCollector/target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | artifactId=FlowCollector 2 | groupId=mx.itesm.FlowCollector 3 | version=1.0-SNAPSHOT 4 | -------------------------------------------------------------------------------- /fwd_/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | mx/itesm/reactiveFwd/reactiveFwdTest.class 2 | -------------------------------------------------------------------------------- /ips/__pycache__/agent.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/agent.cpython-38.pyc -------------------------------------------------------------------------------- /ips/__pycache__/agentq.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/agentq.cpython-38.pyc -------------------------------------------------------------------------------- /ips/__pycache__/config.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/config.cpython-38.pyc -------------------------------------------------------------------------------- /ips/__pycache__/utils.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/utils.cpython-38.pyc -------------------------------------------------------------------------------- /ips/__pycache__/consume.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/consume.cpython-38.pyc -------------------------------------------------------------------------------- /ips/__pycache__/manager.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/manager.cpython-38.pyc -------------------------------------------------------------------------------- /flowCollector/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | mx/itesm/FlowCollector/FlowCollectorTest.class 2 | -------------------------------------------------------------------------------- /fwd_/target/reactiveFwd-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/reactiveFwd-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /fwd_/target/reactiveFwd-1.0-SNAPSHOT.oar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/reactiveFwd-1.0-SNAPSHOT.oar -------------------------------------------------------------------------------- /ips/__pycache__/enviroment.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ips/__pycache__/enviroment.cpython-38.pyc -------------------------------------------------------------------------------- /flowCollector/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /flowCollector/jnetpcap/jnetpcap-src-1.3.0-1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/jnetpcap-src-1.3.0-1.zip -------------------------------------------------------------------------------- /fwd_/target/reactiveFwd-1.0-SNAPSHOT-tests.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/reactiveFwd-1.0-SNAPSHOT-tests.jar -------------------------------------------------------------------------------- /ids/slow_rate/lstm_testbed_based/LSTM/model.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ids/slow_rate/lstm_testbed_based/LSTM/model.h5 -------------------------------------------------------------------------------- /ids/slow_rate/lstm_testbed_based/LSTM/sc.joblib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ids/slow_rate/lstm_testbed_based/LSTM/sc.joblib -------------------------------------------------------------------------------- /sdn_nfv_tests/ubuntu/public-html/logo-tec.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/sdn_nfv_tests/ubuntu/public-html/logo-tec.jpg -------------------------------------------------------------------------------- /ids/slow_rate/lstm_testbed_based/LSTM/pca.joblib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ids/slow_rate/lstm_testbed_based/LSTM/pca.joblib -------------------------------------------------------------------------------- /flowCollector/jnetpcap/jnetpcap-javadoc-1.3.0-1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/jnetpcap-javadoc-1.3.0-1.zip -------------------------------------------------------------------------------- /flowCollector/jnetpcap/jnetpcap-src-1.4.r1425-1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/jnetpcap-src-1.4.r1425-1.zip -------------------------------------------------------------------------------- /fwd_/target/surefire-reports/null-output.txt: -------------------------------------------------------------------------------- 1 | [WARNING] Couldn't load group class 'org.onlab.junit.IntegrationTest' in Surefire|Failsafe plugin. The group class is ignored! 2 | -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/jnetpcap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/win/jnetpcap-1.3.0/jnetpcap.dll -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/jnetpcap.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/win/jnetpcap-1.3.0/jnetpcap.jar -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileContent/fileContent.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/fileContent/fileContent.lock -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/taskHistory/taskHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/taskHistory/taskHistory.bin -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/taskHistory/taskHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/taskHistory/taskHistory.lock -------------------------------------------------------------------------------- /flowCollector/.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /flowCollector/jnetpcap/jnetpcap-javadoc-1.4.r1425-1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/jnetpcap-javadoc-1.4.r1425-1.zip -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/jnetpcap.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/linux/jnetpcap-1.3.0/jnetpcap.jar -------------------------------------------------------------------------------- /flowCollector/target/surefire-reports/null-output.txt: -------------------------------------------------------------------------------- 1 | [WARNING] Couldn't load group class 'org.onlab.junit.IntegrationTest' in Surefire|Failsafe plugin. The group class is ignored! 2 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/libjnetpcap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/linux/jnetpcap-1.3.0/libjnetpcap.so -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap.dll -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap.jar -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/api/ApiResponse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/api/ApiResponse.class -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd.class -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/jnetpcap.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/jnetpcap.jar -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/libjnetpcap.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/libjnetpcap.so -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/api/flow/FlowApi.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/api/flow/FlowApi.class -------------------------------------------------------------------------------- /flowCollector/.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/api/flow/FlowRuleId.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/api/flow/FlowRuleId.class -------------------------------------------------------------------------------- /flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT.oar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT.oar -------------------------------------------------------------------------------- /traffic_engineering/target/traffic-engineering-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/traffic-engineering-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /traffic_engineering/target/traffic-engineering-1.0-SNAPSHOT.oar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/traffic-engineering-1.0-SNAPSHOT.oar -------------------------------------------------------------------------------- /flowCollector/.gradle/4.4.1/fileContent/annotation-processors.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/.gradle/4.4.1/fileContent/annotation-processors.bin -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap-pcap100.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/jnetpcap-pcap100.dll -------------------------------------------------------------------------------- /flowCollector/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /home/marcelo/Documents/FlowCollector/src/test/java/mx/itesm/FlowCollector/FlowCollectorTest.java 2 | -------------------------------------------------------------------------------- /fwd_/target/test-classes/mx/itesm/reactiveFwd/reactiveFwdTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/test-classes/mx/itesm/reactiveFwd/reactiveFwdTest.class -------------------------------------------------------------------------------- /flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT-tests.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/intelligentddosmitigation-1.0-SNAPSHOT-tests.jar -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/OsgiPropertyConstants.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/OsgiPropertyConstants.class -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/ReactiveForwardMetrics.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/ReactiveForwardMetrics.class -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$SrcDstPair.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$SrcDstPair.class -------------------------------------------------------------------------------- /fwd_/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/fwd_/src/test/java/mx/itesm/reactiveFwd/reactiveFwdTest.java 2 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/libjnetpcap-pcap100.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/libjnetpcap-pcap100.so -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$SRLinkWeigher.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$SRLinkWeigher.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Helpers.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Helpers.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/trafficEngineering/Route.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/trafficEngineering/Route.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/trafficEngineering/Routes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/trafficEngineering/Routes.class -------------------------------------------------------------------------------- /ids/slow_rate/lstm_testbed_based/__pycache__/lstm_server_for_ips.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ids/slow_rate/lstm_testbed_based/__pycache__/lstm_server_for_ips.cpython-38.pyc -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollector$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollector$1.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollector.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollector.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/Utils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/Utils.class -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$ReactivePacketProcessor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$ReactivePacketProcessor.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollectorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/FlowCollectorTest.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/Protocol.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/Protocol.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/TcpState.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/TcpState.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/Utils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/Utils.class -------------------------------------------------------------------------------- /fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$InternalTopologyListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/classes/mx/itesm/reactiveFwd/reactiveFwd$InternalTopologyListener.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/intf/LinkQualityService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/intf/LinkQualityService.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/BasicFlow.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/BasicFlow.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowFeature.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowFeature.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/IdGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/IdGenerator.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/MutableInt.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/MutableInt.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/Protocol.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/Protocol.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/TcpState.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/TcpState.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$1.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/OsgiPropertyConstants.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/OsgiPropertyConstants.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/DateFormatter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/DateFormatter.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowFeature$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowFeature$1.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/FlowGenerator.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/PacketReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/PacketReader.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/PcapIfWrapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/PcapIfWrapper.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/BasicFlow.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/BasicFlow.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/MutableInt.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/MutableInt.class -------------------------------------------------------------------------------- /ids/slow_rate/lstm_testbed_based/__pycache__/lstm_server_for_ips_improved.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/ids/slow_rate/lstm_testbed_based/__pycache__/lstm_server_for_ips_improved.cpython-38.pyc -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection$1.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/BasicPacketInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/BasicPacketInfo.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/TcpState$State.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/TcpState$State.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Mitigation/Mitigation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Mitigation/Mitigation.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/DateFormatter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/DateFormatter.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowFeature$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowFeature$1.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowFeature.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowFeature.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/FlowGenerator.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/IdGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/IdGenerator.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/PacketReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/PacketReader.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/PcapIfWrapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/PcapIfWrapper.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/PcapReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/PcapReader.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/BasicPacketInfo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/BasicPacketInfo.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/TcpState$State.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/TcpState$State.class -------------------------------------------------------------------------------- /fwd_/target/oar/m2/mx/itesm/reactiveFwd/reactiveFwd/1.0-SNAPSHOT/reactiveFwd-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/fwd_/target/oar/m2/mx/itesm/reactiveFwd/reactiveFwd/1.0-SNAPSHOT/reactiveFwd-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/resetConnection/impl/OsgiPropertyConstants.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/resetConnection/impl/OsgiPropertyConstants.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/resetConnection/intf/ResetConnectionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/resetConnection/intf/ResetConnectionService.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/InsertCsvRow.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/InsertCsvRow.class -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/mac_addr.h: -------------------------------------------------------------------------------- 1 | #ifndef __MAC_ADDR_HDR__ 2 | #define __MAC_ADDR_HDR__ 3 | 4 | extern "C" int mac_addr_dlpi ( char *dev, u_char *addr); 5 | extern "C" int mac_addr_sys ( char *dev, u_char *addr); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/mac_addr.h: -------------------------------------------------------------------------------- 1 | #ifndef __MAC_ADDR_HDR__ 2 | #define __MAC_ADDR_HDR__ 3 | 4 | extern "C" int mac_addr_dlpi ( char *dev, u_char *addr); 5 | extern "C" int mac_addr_sys ( char *dev, u_char *addr); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/TopoMonitor/TopologyMonitor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/TopoMonitor/TopologyMonitor.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$1.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/PcapReader.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/PcapReader.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringResource.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringResource.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/FlowGenListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/FlowGenListener.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/InsertCsvRow.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/InsertCsvRow.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringApplication.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorker.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/FlowGenListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/FlowGenListener.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$LinkProbeReceiver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$LinkProbeReceiver.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/ReadPcapFileWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/ReadPcapFileWorker.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/TrafficFlowWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/TrafficFlowWorker.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/TrafficFlowWorkerY.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/TrafficFlowWorkerY.class -------------------------------------------------------------------------------- /flowCollector/target/test-classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigationTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/test-classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigationTest.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/LoadPcapInterfaceWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/LoadPcapInterfaceWorker.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/PcapReader$FlowListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/PcapReader$FlowListener.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$ProbeLinkQualityTask.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$ProbeLinkQualityTask.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection$MyPacketProcessor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/resetConnection/impl/ResetConnection$MyPacketProcessor.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/LoadPcapInterfaceWorker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/LoadPcapInterfaceWorker.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/PcapReader$FlowListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/PcapReader$FlowListener.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$CalculateLinkQualityTask.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/linkDelay/impl/LinkQualityManager$CalculateLinkQualityTask.class -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/FlowGenListener.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap.worker; 2 | 3 | import mx.itesm.FlowCollector.jnetpcap.BasicFlow; 4 | 5 | public interface FlowGenListener { 6 | void onFlowGenerated(BasicFlow flow); 7 | } 8 | -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$PacketCollector.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$PacketCollector.class -------------------------------------------------------------------------------- /traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringResource$SRLinkWeigher.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/classes/org/itesm/trafficEngineering/TrafficEngineeringResource$SRLinkWeigher.class -------------------------------------------------------------------------------- /flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker$FlowListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/build/classes/java/main/mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker$FlowListener.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Mitigation/Mitigation$InternalIntentListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/Mitigation/Mitigation$InternalIntentListener.class -------------------------------------------------------------------------------- /ips/config.py: -------------------------------------------------------------------------------- 1 | ONOS_IP = 'localhost' 2 | ONOS_PORT = 8181 3 | ONOS_USER = 'onos' 4 | ONOS_PASS = 'rocks' 5 | 6 | EDGE_BANDWIDTH_LIMIT = 25e3 # unit: Kbps 7 | LINK_BANDWIDTH_LIMIT = 25e3 # unit: Kbps 8 | BANDWIDTH_THRESHOLD = 1.0 9 | 10 | POLLING_INTERVAL = 5 11 | STATISTICS_INTERVAL = 4 12 | -------------------------------------------------------------------------------- /traffic_engineering/target/oar/m2/org/itesm/traffic-engineering/1.0-SNAPSHOT/traffic-engineering-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/traffic_engineering/target/oar/m2/org/itesm/traffic-engineering/1.0-SNAPSHOT/traffic-engineering-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /flowCollector/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri May 25 10:05:01 ADT 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.2-all.zip 7 | -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/ReadPcapFileWorker$FlowListener.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/jnetpcap/worker/ReadPcapFileWorker$FlowListener.class -------------------------------------------------------------------------------- /flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$ReactivePacketProcessor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/classes/mx/itesm/intelligentddosmitigation/intelligentddosmitigation$ReactivePacketProcessor.class -------------------------------------------------------------------------------- /flowCollector/target/oar/m2/mx/itesm/intelligentddosmitigation/intelligentddosmitigation/1.0-SNAPSHOT/intelligentddosmitigation-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmarcelo/SDNFV_Framework_DDoS_Solution/HEAD/flowCollector/target/oar/m2/mx/itesm/intelligentddosmitigation/intelligentddosmitigation/1.0-SNAPSHOT/intelligentddosmitigation-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /fwd_/target/surefire-reports/mx.itesm.reactiveFwd.reactiveFwdTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: mx.itesm.reactiveFwd.reactiveFwdTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in mx.itesm.reactiveFwd.reactiveFwdTest 5 | -------------------------------------------------------------------------------- /sdn_nfv_tests/Dockerfile1: -------------------------------------------------------------------------------- 1 | FROM httpd:2.4 2 | COPY ./public-html/ /usr/local/apache2/htdocs/ 3 | COPY ./my-httpd.conf /usr/local/apache2/conf/httpd.conf 4 | 5 | # Install dependencies required for Containernet. 6 | RUN apt-get update && apt-get install -y \ 7 | net-tools \ 8 | iputils-ping \ 9 | iproute2 \ 10 | build-essential \ 11 | htop \ 12 | apache2 \ 13 | wget\ 14 | systemctl -------------------------------------------------------------------------------- /sdn_nfv_tests/ubuntu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest 2 | COPY ./public-html/ /var/www/html/index.html 3 | 4 | 5 | 6 | # Install dependencies required for Containernet. 7 | RUN apt-get update && apt-get install -y \ 8 | net-tools \ 9 | iputils-ping \ 10 | iproute2 \ 11 | build-essential \ 12 | htop \ 13 | apache2 \ 14 | wget\ 15 | systemctl\ 16 | iperf 17 | 18 | RUN service apache2 start 19 | 20 | -------------------------------------------------------------------------------- /flowCollector/target/surefire-reports/mx.itesm.intelligentddosmitigation.intelligentddosmitigationTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: mx.itesm.FlowCollector.FlowCollectorTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.009 s - in mx.itesm.FlowCollector.FlowCollectorTest 5 | -------------------------------------------------------------------------------- /fwd_/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/fwd_/src/main/java/mx/itesm/reactiveFwd/OsgiPropertyConstants.java 2 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/fwd_/src/main/java/mx/itesm/reactiveFwd/ReactiveForwardMetrics.java 3 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/fwd_/src/main/java/mx/itesm/reactiveFwd/reactiveFwd.java 4 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/winpcap_ext.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinPcapExtensions 5 | #define _Included_org_jnetpcap_WinPcapExtensions 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winPcapClass; 12 | 13 | // Prototypes 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/winpcap_ext.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinPcapExtensions 5 | #define _Included_org_jnetpcap_WinPcapExtensions 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winPcapClass; 12 | 13 | // Prototypes 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/IdGenerator.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap; 2 | 3 | public class IdGenerator { 4 | 5 | private long id = 0L; 6 | 7 | public IdGenerator(long id) { 8 | super(); 9 | this.id = id; 10 | } 11 | 12 | public IdGenerator() { 13 | super(); 14 | this.id = 0L; 15 | } 16 | 17 | public synchronized long nextId(){ 18 | this.id++; 19 | return this.id; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ips/test_metering_manager.py: -------------------------------------------------------------------------------- 1 | from config import * 2 | from manager import TopoManager, StatisticsAndRuleManager 3 | 4 | test_meter = {} 5 | 6 | topoManager = TopoManager() 7 | statisticsRuleManager = StatisticsAndRuleManager() 8 | test_meter["conn1"] = {'macsrc': "00:00:00:00:00:01", 'macdst':"00:00:00:00:00:03"} 9 | 10 | if __name__ == '__main__': 11 | 12 | if topoManager.is_topo_available(): 13 | statisticsRuleManager.meterCommand(test_meter) -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/winpcap_ext.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinPcapExtensions 5 | #define _Included_org_jnetpcap_WinPcapExtensions 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winPcapClass; 12 | 13 | // Prototypes 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /fwd_/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | mx/itesm/reactiveFwd/reactiveFwd.class 2 | mx/itesm/reactiveFwd/reactiveFwd$ReactivePacketProcessor.class 3 | mx/itesm/reactiveFwd/reactiveFwd$SRLinkWeigher.class 4 | mx/itesm/reactiveFwd/reactiveFwd$SrcDstPair.class 5 | mx/itesm/reactiveFwd/OsgiPropertyConstants.class 6 | mx/itesm/reactiveFwd/ReactiveForwardMetrics.class 7 | mx/itesm/reactiveFwd/reactiveFwd$InternalTopologyListener.class 8 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/winpcap_ext.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinPcapExtensions 5 | #define _Included_org_jnetpcap_WinPcapExtensions 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winPcapClass; 12 | 13 | // Prototypes 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/trafficEngineering/TrafficEngineeringApplication.java: -------------------------------------------------------------------------------- 1 | package org.itesm.trafficEngineering; 2 | 3 | import org.onlab.rest.AbstractWebApplication; 4 | 5 | import java.util.Set; 6 | 7 | /** 8 | * Sample REST API web application. 9 | */ 10 | public class TrafficEngineeringApplication extends AbstractWebApplication { 11 | @Override 12 | public Set> getClasses() { 13 | return getClasses(TrafficEngineeringResource.class); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/export.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_export_h 6 | #define Include_export_h 7 | 8 | // JNIEXPORT is designed for microsoft compilers, we're using gcc to compile 9 | #ifdef JNIEXPORT 10 | #undef JNIEXPORT 11 | #endif 12 | #undef JNIEXPORT 13 | #define JNIEXPORT extern "C" 14 | 15 | #undef __declspec 16 | #define __declspec(a) extern "C" 17 | 18 | #ifndef FALSE 19 | #define TRUE 1 20 | #define FALSE !TRUE 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/winpcap_stat_ex.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinWinPcapStat 5 | #define _Included_org_jnetpcap_WinWinPcapStat 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winWinPcapStatClass; 12 | 13 | // Prototypes 14 | jobject newWinPcapStat(JNIEnv *env); 15 | void setWinPcapStat(JNIEnv *env, jobject jstats, struct pcap_stat *stats, 16 | int size); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/export.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_export_h 6 | #define Include_export_h 7 | 8 | // JNIEXPORT is designed for microsoft compilers, we're using gcc to compile 9 | #ifdef JNIEXPORT 10 | #undef JNIEXPORT 11 | #endif 12 | #undef JNIEXPORT 13 | #define JNIEXPORT extern "C" 14 | 15 | #undef __declspec 16 | #define __declspec(a) extern "C" 17 | 18 | #ifndef FALSE 19 | #define TRUE 1 20 | #define FALSE !TRUE 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/winpcap_stat_ex.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinWinPcapStat 5 | #define _Included_org_jnetpcap_WinWinPcapStat 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winWinPcapStatClass; 12 | 13 | // Prototypes 14 | jobject newWinPcapStat(JNIEnv *env); 15 | void setWinPcapStat(JNIEnv *env, jobject jstats, struct pcap_stat *stats, 16 | int size); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/export.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_export_h 6 | #define Include_export_h 7 | 8 | // JNIEXPORT is designed for microsoft compilers, we're using gcc to compile 9 | #ifdef JNIEXPORT 10 | #undef JNIEXPORT 11 | #endif 12 | #undef JNIEXPORT 13 | #define JNIEXPORT extern "C" 14 | 15 | #undef __declspec 16 | #define __declspec(a) extern "C" 17 | 18 | #ifndef FALSE 19 | #define TRUE 1 20 | #define FALSE !TRUE 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/winpcap_stat_ex.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinWinPcapStat 5 | #define _Included_org_jnetpcap_WinWinPcapStat 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winWinPcapStatClass; 12 | 13 | // Prototypes 14 | jobject newWinPcapStat(JNIEnv *env); 15 | void setWinPcapStat(JNIEnv *env, jobject jstats, struct pcap_stat *stats, 16 | int size); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/export.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_export_h 6 | #define Include_export_h 7 | 8 | // JNIEXPORT is designed for microsoft compilers, we're using gcc to compile 9 | #ifdef JNIEXPORT 10 | #undef JNIEXPORT 11 | #endif 12 | #undef JNIEXPORT 13 | #define JNIEXPORT extern "C" 14 | 15 | #undef __declspec 16 | #define __declspec(a) extern "C" 17 | 18 | #ifndef FALSE 19 | #define TRUE 1 20 | #define FALSE !TRUE 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/winpcap_stat_ex.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_utils utility methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_WinWinPcapStat 5 | #define _Included_org_jnetpcap_WinWinPcapStat 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass winWinPcapStatClass; 12 | 13 | // Prototypes 14 | jobject newWinPcapStat(JNIEnv *env); 15 | void setWinPcapStat(JNIEnv *env, jobject jstats, struct pcap_stat *stats, 16 | int size); 17 | 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/jnetpcap_bpf.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_bpf_h 4 | #define _Included_jnetpcap_bpf_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | extern jclass bpfProgramClass; 15 | 16 | extern jfieldID bpfProgramPhysicalFID; 17 | 18 | // Prototypes 19 | bpf_program *getBpfProgram(JNIEnv *env, jobject obj); 20 | void setBpfProgramPhysical(JNIEnv *env, jobject obj, jlong value); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/jnetpcap_bpf.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_bpf_h 4 | #define _Included_jnetpcap_bpf_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | extern jclass bpfProgramClass; 15 | 16 | extern jfieldID bpfProgramPhysicalFID; 17 | 18 | // Prototypes 19 | bpf_program *getBpfProgram(JNIEnv *env, jobject obj); 20 | void setBpfProgramPhysical(JNIEnv *env, jobject obj, jlong value); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/jnetpcap_bpf.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_bpf_h 4 | #define _Included_jnetpcap_bpf_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | extern jclass bpfProgramClass; 15 | 16 | extern jfieldID bpfProgramPhysicalFID; 17 | 18 | // Prototypes 19 | bpf_program *getBpfProgram(JNIEnv *env, jobject obj); 20 | void setBpfProgramPhysical(JNIEnv *env, jobject obj, jlong value); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/jnetpcap_bpf.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_bpf_h 4 | #define _Included_jnetpcap_bpf_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | extern jclass bpfProgramClass; 15 | 16 | extern jfieldID bpfProgramPhysicalFID; 17 | 18 | // Prototypes 19 | bpf_program *getBpfProgram(JNIEnv *env, jobject obj); 20 | void setBpfProgramPhysical(JNIEnv *env, jobject obj, jlong value); 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /sdn_nfv_tests/client_traffic.sh: -------------------------------------------------------------------------------- 1 | #! usr/bin/bash 2 | 3 | echo "Started" 4 | 5 | # Parameters 6 | start_time="$(date -u +%s)" 7 | echo "Time out in seconds: " 8 | read TIMEOUT_SEC 9 | current_time="$(date -u +%s)" 10 | elapsed_seconds=$(($current_time-$start_time)) 11 | # Loop until TIMEOUT 12 | while [ $elapsed_seconds -lt $TIMEOUT_SEC ]; 13 | do 14 | echo "connect to server" 15 | remaining_seconds=$(($TIMEOUT_SEC-$elapsed_seconds)) 16 | echo "******** Remaining time: " $remaining_seconds 17 | iperf -c 10.0.0.250 -t $remaining_seconds -b 10M 18 | current_time="$(date -u +%s)" 19 | elapsed_seconds=$(($current_time-$start_time)) 20 | done 21 | # end traffic 22 | echo "Done" 23 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/jnetpcap_dumper.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_dumper methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_PcapDumper 5 | #define _Included_org_jnetpcap_PcapDumper 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass pcapDumperClass; 12 | 13 | extern jclass pcapDumperClass; 14 | 15 | extern jmethodID pcapDumperConstructorMID; 16 | 17 | extern jfieldID pcapDumperPhysicalFID; 18 | 19 | // Prototypes 20 | void setPcapDumper(JNIEnv *env, jobject obj, pcap_dumper_t *dumper); 21 | pcap_dumper_t *getPcapDumper(JNIEnv *env, jobject obj); 22 | jobject newPcapDumper(JNIEnv *env, pcap_dumper_t *dumper); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/jnetpcap_dumper.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_dumper methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_PcapDumper 5 | #define _Included_org_jnetpcap_PcapDumper 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass pcapDumperClass; 12 | 13 | extern jclass pcapDumperClass; 14 | 15 | extern jmethodID pcapDumperConstructorMID; 16 | 17 | extern jfieldID pcapDumperPhysicalFID; 18 | 19 | // Prototypes 20 | void setPcapDumper(JNIEnv *env, jobject obj, pcap_dumper_t *dumper); 21 | pcap_dumper_t *getPcapDumper(JNIEnv *env, jobject obj); 22 | jobject newPcapDumper(JNIEnv *env, pcap_dumper_t *dumper); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/jnetpcap_dumper.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_dumper methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_PcapDumper 5 | #define _Included_org_jnetpcap_PcapDumper 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass pcapDumperClass; 12 | 13 | extern jclass pcapDumperClass; 14 | 15 | extern jmethodID pcapDumperConstructorMID; 16 | 17 | extern jfieldID pcapDumperPhysicalFID; 18 | 19 | // Prototypes 20 | void setPcapDumper(JNIEnv *env, jobject obj, pcap_dumper_t *dumper); 21 | pcap_dumper_t *getPcapDumper(JNIEnv *env, jobject obj); 22 | jobject newPcapDumper(JNIEnv *env, pcap_dumper_t *dumper); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/jnetpcap_dumper.h: -------------------------------------------------------------------------------- 1 | #include 2 | /* Header for jnetpcap_dumper methods */ 3 | 4 | #ifndef _Included_org_jnetpcap_PcapDumper 5 | #define _Included_org_jnetpcap_PcapDumper 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #define EXTERN extern "C" 9 | #endif 10 | 11 | extern jclass pcapDumperClass; 12 | 13 | extern jclass pcapDumperClass; 14 | 15 | extern jmethodID pcapDumperConstructorMID; 16 | 17 | extern jfieldID pcapDumperPhysicalFID; 18 | 19 | // Prototypes 20 | void setPcapDumper(JNIEnv *env, jobject obj, pcap_dumper_t *dumper); 21 | pcap_dumper_t *getPcapDumper(JNIEnv *env, jobject obj); 22 | jobject newPcapDumper(JNIEnv *env, pcap_dumper_t *dumper); 23 | 24 | #ifdef __cplusplus 25 | } 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/winpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_winpcap_ids_h 4 | #define _Included_winpcap_ids_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | // WinPcapSamp 15 | extern jclass winPcapSampClass; 16 | extern jfieldID winPcapSampPhysicalFID; 17 | extern jmethodID winPcapSampConstructorMID; 18 | 19 | // WinPcapStat 20 | extern jclass WinPcapStatClass; 21 | extern jmethodID WinPcapStatConstructorMID; 22 | 23 | // WinPcapRmtAuth 24 | extern jclass winPcapRmtAuthClass; 25 | extern jfieldID winPcapRmtAuthTypeFID; 26 | extern jfieldID winPcapRmtAuthUsernameFID; 27 | extern jfieldID winPcapRmtAuthPasswordFID; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/winpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_winpcap_ids_h 4 | #define _Included_winpcap_ids_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | // WinPcapSamp 15 | extern jclass winPcapSampClass; 16 | extern jfieldID winPcapSampPhysicalFID; 17 | extern jmethodID winPcapSampConstructorMID; 18 | 19 | // WinPcapStat 20 | extern jclass WinPcapStatClass; 21 | extern jmethodID WinPcapStatConstructorMID; 22 | 23 | // WinPcapRmtAuth 24 | extern jclass winPcapRmtAuthClass; 25 | extern jfieldID winPcapRmtAuthTypeFID; 26 | extern jfieldID winPcapRmtAuthUsernameFID; 27 | extern jfieldID winPcapRmtAuthPasswordFID; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/winpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_winpcap_ids_h 4 | #define _Included_winpcap_ids_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | // WinPcapSamp 15 | extern jclass winPcapSampClass; 16 | extern jfieldID winPcapSampPhysicalFID; 17 | extern jmethodID winPcapSampConstructorMID; 18 | 19 | // WinPcapStat 20 | extern jclass WinPcapStatClass; 21 | extern jmethodID WinPcapStatConstructorMID; 22 | 23 | // WinPcapRmtAuth 24 | extern jclass winPcapRmtAuthClass; 25 | extern jfieldID winPcapRmtAuthTypeFID; 26 | extern jfieldID winPcapRmtAuthUsernameFID; 27 | extern jfieldID winPcapRmtAuthPasswordFID; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/winpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_winpcap_ids_h 4 | #define _Included_winpcap_ids_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include "export.h" 11 | 12 | #include 13 | 14 | // WinPcapSamp 15 | extern jclass winPcapSampClass; 16 | extern jfieldID winPcapSampPhysicalFID; 17 | extern jmethodID winPcapSampConstructorMID; 18 | 19 | // WinPcapStat 20 | extern jclass WinPcapStatClass; 21 | extern jmethodID WinPcapStatConstructorMID; 22 | 23 | // WinPcapRmtAuth 24 | extern jclass winPcapRmtAuthClass; 25 | extern jfieldID winPcapRmtAuthTypeFID; 26 | extern jfieldID winPcapRmtAuthUsernameFID; 27 | extern jfieldID winPcapRmtAuthPasswordFID; 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/trafficEngineering/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Sample application that provides simple form of reactive forwarding 19 | * using the intent service. 20 | */ 21 | package org.itesm.trafficEngineering; 22 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/LoadPcapInterfaceWorker.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap.worker; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.swing.SwingWorker; 7 | 8 | import org.jnetpcap.Pcap; 9 | import org.jnetpcap.PcapIf; 10 | import org.slf4j.Logger; 11 | import org.slf4j.LoggerFactory; 12 | 13 | 14 | public class LoadPcapInterfaceWorker extends SwingWorker,String>{ 15 | 16 | public static final Logger logger = LoggerFactory.getLogger(LoadPcapInterfaceWorker.class); 17 | 18 | public LoadPcapInterfaceWorker() { 19 | super(); 20 | } 21 | 22 | @Override 23 | protected List doInBackground() throws Exception { 24 | 25 | StringBuilder errbuf = new StringBuilder(); 26 | List ifs = new ArrayList<>(); 27 | if(Pcap.findAllDevs(ifs, errbuf)!=Pcap.OK) { 28 | logger.error("Error occured: " + errbuf.toString()); 29 | throw new Exception(errbuf.toString()); 30 | } 31 | return ifs; 32 | } 33 | 34 | @Override 35 | protected void done() { 36 | super.done(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Noe Yungaicela 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /traffic_engineering/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | org/itesm/trafficEngineering/Route.class 2 | org/itesm/linkDelay/impl/LinkQualityManager$1.class 3 | org/itesm/resetConnection/intf/ResetConnectionService.class 4 | org/itesm/resetConnection/impl/ResetConnection.class 5 | org/itesm/trafficEngineering/TrafficEngineeringResource$SRLinkWeigher.class 6 | org/itesm/linkDelay/impl/OsgiPropertyConstants.class 7 | org/itesm/trafficEngineering/TrafficEngineeringApplication.class 8 | org/itesm/linkDelay/impl/LinkQualityManager$LinkProbeReceiver.class 9 | org/itesm/resetConnection/impl/OsgiPropertyConstants.class 10 | org/itesm/trafficEngineering/Routes.class 11 | org/itesm/trafficEngineering/TrafficEngineeringResource.class 12 | org/itesm/resetConnection/impl/ResetConnection$MyPacketProcessor.class 13 | org/itesm/linkDelay/intf/LinkQualityService.class 14 | org/itesm/linkDelay/impl/LinkQualityManager$ProbeLinkQualityTask.class 15 | org/itesm/linkDelay/impl/LinkQualityManager.class 16 | org/itesm/resetConnection/impl/ResetConnection$1.class 17 | org/itesm/linkDelay/impl/LinkQualityManager$CalculateLinkQualityTask.class 18 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/PcapIfWrapper.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap; 2 | 3 | import org.jnetpcap.PcapIf; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class PcapIfWrapper { 9 | 10 | private PcapIf pcapIf; 11 | private String prompt; 12 | 13 | public PcapIfWrapper(PcapIf pcapIf) { 14 | this.pcapIf = pcapIf; 15 | } 16 | 17 | public PcapIfWrapper(String prompt) { 18 | this.prompt = prompt; 19 | } 20 | 21 | public static List fromPcapIf(List ifs){ 22 | List ifWrappers = new ArrayList<>(); 23 | for(PcapIf pcapif:ifs){ 24 | ifWrappers.add(new PcapIfWrapper(pcapif)); 25 | } 26 | return ifWrappers; 27 | } 28 | 29 | public String name(){ 30 | return pcapIf.getName(); 31 | } 32 | 33 | @Override 34 | public String toString() { 35 | if(pcapIf == null){ 36 | return prompt; 37 | }else{ 38 | return String.format("%s (%s)",pcapIf.getName(),pcapIf.getDescription()); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/Protocol.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap; 2 | 3 | import org.jnetpcap.protocol.network.Ip4; 4 | import org.jnetpcap.protocol.network.Ip6; 5 | import org.jnetpcap.protocol.tcpip.Tcp; 6 | import org.jnetpcap.protocol.tcpip.Udp; 7 | import org.jnetpcap.protocol.vpn.L2TP; 8 | import org.jnetpcap.protocol.lan.Ethernet; 9 | 10 | public class Protocol { 11 | 12 | private Tcp tcp; 13 | private Udp udp; 14 | private Ip4 ipv4; 15 | private Ip6 ipv6; 16 | private L2TP l2tp; 17 | private Ethernet eth; 18 | public Protocol() { 19 | super(); 20 | eth = new Ethernet(); 21 | tcp = new Tcp(); 22 | udp = new Udp(); 23 | ipv4 = new Ip4(); 24 | ipv6 = new Ip6(); 25 | l2tp = new L2TP(); 26 | } 27 | 28 | public Ethernet getEthernet() { 29 | return eth; 30 | } 31 | 32 | public Tcp getTcp() { 33 | return tcp; 34 | } 35 | 36 | public Udp getUdp() { 37 | return udp; 38 | } 39 | 40 | public Ip4 getIpv4() { 41 | return ipv4; 42 | } 43 | 44 | public Ip6 getIpv6() { 45 | return ipv6; 46 | } 47 | 48 | public L2TP getL2tp() { 49 | return l2tp; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /fwd_/target/oar/app.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | Reactive forwarding for ONOS 22 | mvn:mx.itesm.reactiveFwd/reactiveFwd/1.0-SNAPSHOT 23 | 24 | -------------------------------------------------------------------------------- /fwd_/target/oar/m2/mx/itesm/reactiveFwd/reactiveFwd/1.0-SNAPSHOT/reactiveFwd-1.0-SNAPSHOT-features.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | onos-api 21 | mvn:mx.itesm.reactiveFwd/reactiveFwd/1.0-SNAPSHOT 22 | 23 | 24 | -------------------------------------------------------------------------------- /flowCollector/target/oar/app.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | ONOS based detector for DDoS attacks 22 | mvn:mx.itesm.FlowCollector/FlowCollector/1.0-SNAPSHOT 23 | 24 | -------------------------------------------------------------------------------- /traffic_engineering/target/oar/app.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 21 | ONOS REST API bundle archetype 22 | mvn:org.itesm/traffic-engineering/1.0-SNAPSHOT 23 | 24 | -------------------------------------------------------------------------------- /traffic_engineering/target/oar/m2/org/itesm/traffic-engineering/1.0-SNAPSHOT/traffic-engineering-1.0-SNAPSHOT-features.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | onos-api 21 | mvn:org.itesm/traffic-engineering/1.0-SNAPSHOT 22 | 23 | 24 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/DateFormatter.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.time.Instant; 5 | import java.time.LocalDateTime; 6 | import java.time.ZoneId; 7 | import java.time.format.DateTimeFormatter; 8 | import java.util.Date; 9 | 10 | public class DateFormatter { 11 | 12 | public static String parseDateFromLong(long time, String format){ 13 | try{ 14 | if (format == null){ 15 | format = "dd/MM/yyyy hh:mm:ss"; 16 | } 17 | SimpleDateFormat simpleFormatter = new SimpleDateFormat(format); 18 | Date tempDate = new Date(time); 19 | return simpleFormatter.format(tempDate); 20 | }catch(Exception ex){ 21 | System.out.println(ex.toString()); 22 | return "dd/MM/yyyy hh:mm:ss"; 23 | } 24 | } 25 | 26 | public static String convertMilliseconds2String(long time, String format) { 27 | 28 | if (format == null){ 29 | format = "dd/MM/yyyy hh:mm:ss"; 30 | } 31 | 32 | DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); 33 | LocalDateTime ldt = LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault()); 34 | return ldt.format(formatter); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /flowCollector/target/oar/m2/mx/itesm/intelligentddosmitigation/intelligentddosmitigation/1.0-SNAPSHOT/intelligentddosmitigation-1.0-SNAPSHOT-features.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | onos-api 21 | mvn:mx.itesm.FlowCollector/FlowCollector/1.0-SNAPSHOT 22 | 23 | 24 | -------------------------------------------------------------------------------- /ips/utils.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import json 3 | import logging 4 | import urllib.request 5 | import urllib.parse 6 | 7 | from config import * 8 | 9 | logging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(message)s') 10 | 11 | def authenticated_http_req(url, user, pwd): 12 | request = urllib.request.Request(url) 13 | base64string = base64.b64encode(('%s:%s' % (user, pwd)).encode('utf-8')).decode('utf-8') 14 | request.add_header('Authorization', 'Basic %s' % base64string) 15 | return request 16 | 17 | def json_get_req(url): 18 | try: 19 | request = authenticated_http_req(url, ONOS_USER, ONOS_PASS) 20 | response = urllib.request.urlopen(request) 21 | return json.loads(response.read()) 22 | except IOError as e: 23 | logging.error(e) 24 | return '' 25 | 26 | def json_post_req(url, json_data): 27 | try: 28 | request = authenticated_http_req(url, ONOS_USER, ONOS_PASS) 29 | request.add_header('Content-Type', 'application/json; charset=utf-8') 30 | request.add_header('Accept', 'application/json; charset=utf-8') 31 | data = json_data.encode('utf-8') 32 | response = urllib.request.urlopen(request, data) 33 | return json.loads(response.read()) 34 | except IOError as e: 35 | logging.error(e) 36 | return '' 37 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/resetConnection/intf/ResetConnectionService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.itesm.resetConnection.intf; 18 | 19 | import org.onosproject.net.DeviceId; 20 | import org.onosproject.net.PortNumber; 21 | 22 | /** 23 | * Link Quality Measurement Service. 24 | */ 25 | public interface ResetConnectionService { 26 | 27 | /** 28 | * Send connection reset 29 | * @param 30 | * @return ok if successfully done 31 | */ 32 | Boolean sendResetConnection(PortNumber portNumber, DeviceId deviceId, String sourceMACAddress, String destinationMACAddress, String sourceIpAddress, String destinationIpAddress, int SrcTcpPort); 33 | 34 | } -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/analysis.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_analysis_h 4 | #define _Included_analysis_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_analysis_Analysis.h" 16 | #include "org_jnetpcap_packet_analysis_AnalysisUtils.h" 17 | 18 | #define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE 19 | 20 | /* 21 | * A header for every analysis object 22 | */ 23 | typedef struct analysis_t { 24 | uint16_t type; 25 | uint16_t len; // length so we can walk unknown analysis types 26 | } analysis_t; 27 | 28 | /* 29 | * Roots are embeded in packet_state_t and header_state_t objects 30 | */ 31 | typedef struct root_analysis_t { 32 | uint16_t type; // == ROOT_TYPE 33 | uint16_t len; // length so we can walk unknown analysis types 34 | 35 | analysis_t *child; 36 | }; 37 | 38 | 39 | typedef void (*native_analyzer_func_t)(packet_state_t *packet); 40 | extern native_analyzer_func_t native_analyzers[]; 41 | 42 | typedef struct analyzer_t { 43 | 44 | native_analyzer_func_t analyzers[64][4]; 45 | 46 | } analyzer_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/analysis.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_analysis_h 4 | #define _Included_analysis_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_analysis_Analysis.h" 16 | #include "org_jnetpcap_packet_analysis_AnalysisUtils.h" 17 | 18 | #define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE 19 | 20 | /* 21 | * A header for every analysis object 22 | */ 23 | typedef struct analysis_t { 24 | uint16_t type; 25 | uint16_t len; // length so we can walk unknown analysis types 26 | } analysis_t; 27 | 28 | /* 29 | * Roots are embeded in packet_state_t and header_state_t objects 30 | */ 31 | typedef struct root_analysis_t { 32 | uint16_t type; // == ROOT_TYPE 33 | uint16_t len; // length so we can walk unknown analysis types 34 | 35 | analysis_t *child; 36 | }; 37 | 38 | 39 | typedef void (*native_analyzer_func_t)(packet_state_t *packet); 40 | extern native_analyzer_func_t native_analyzers[]; 41 | 42 | typedef struct analyzer_t { 43 | 44 | native_analyzer_func_t analyzers[64][4]; 45 | 46 | } analyzer_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/analysis.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_analysis_h 4 | #define _Included_analysis_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_analysis_Analysis.h" 16 | #include "org_jnetpcap_packet_analysis_AnalysisUtils.h" 17 | 18 | #define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE 19 | 20 | /* 21 | * A header for every analysis object 22 | */ 23 | typedef struct analysis_t { 24 | uint16_t type; 25 | uint16_t len; // length so we can walk unknown analysis types 26 | } analysis_t; 27 | 28 | /* 29 | * Roots are embeded in packet_state_t and header_state_t objects 30 | */ 31 | typedef struct root_analysis_t { 32 | uint16_t type; // == ROOT_TYPE 33 | uint16_t len; // length so we can walk unknown analysis types 34 | 35 | analysis_t *child; 36 | }; 37 | 38 | 39 | typedef void (*native_analyzer_func_t)(packet_state_t *packet); 40 | extern native_analyzer_func_t native_analyzers[]; 41 | 42 | typedef struct analyzer_t { 43 | 44 | native_analyzer_func_t analyzers[64][4]; 45 | 46 | } analyzer_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/analysis.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_analysis_h 4 | #define _Included_analysis_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_analysis_Analysis.h" 16 | #include "org_jnetpcap_packet_analysis_AnalysisUtils.h" 17 | 18 | #define ROOT_TYPE org_jnetpcap_analysis_AnalysisUtils_ROOT_TYPE 19 | 20 | /* 21 | * A header for every analysis object 22 | */ 23 | typedef struct analysis_t { 24 | uint16_t type; 25 | uint16_t len; // length so we can walk unknown analysis types 26 | } analysis_t; 27 | 28 | /* 29 | * Roots are embeded in packet_state_t and header_state_t objects 30 | */ 31 | typedef struct root_analysis_t { 32 | uint16_t type; // == ROOT_TYPE 33 | uint16_t len; // length so we can walk unknown analysis types 34 | 35 | analysis_t *child; 36 | }; 37 | 38 | 39 | typedef void (*native_analyzer_func_t)(packet_state_t *packet); 40 | extern native_analyzer_func_t native_analyzers[]; 41 | 42 | typedef struct analyzer_t { 43 | 44 | native_analyzer_func_t analyzers[64][4]; 45 | 46 | } analyzer_t; 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /flowCollector/src/test/java/mx/itesm/FlowCollector/FlowCollectorTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package mx.itesm.FlowCollector; 17 | 18 | import org.junit.After; 19 | import org.junit.Before; 20 | import org.junit.Test; 21 | 22 | 23 | import java.util.Set; 24 | 25 | /** 26 | * Set of tests of the ONOS application component. 27 | */ 28 | public class FlowCollectorTest { 29 | 30 | private FlowCollector component; 31 | 32 | @Before 33 | public void setUp() { 34 | // component = new FlowCollector(); 35 | // component.coreService = get(CoreService.class); 36 | // component.activate(); 37 | } 38 | 39 | @After 40 | public void tearDown() { 41 | // component.deactivate(); 42 | } 43 | 44 | @Test 45 | public void basics() { 46 | 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/util_in_cksum.h: -------------------------------------------------------------------------------- 1 | /* in_cksum.h 2 | * Declaration of Internet checksum routine. 3 | * 4 | * $Id: in_cksum.h 12117 2004-09-28 00:06:32Z guy $ 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif /* __cplusplus */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct { 16 | const uint8_t *ptr; 17 | int len; 18 | } vec_t; 19 | 20 | extern uint16_t in_cksum(const vec_t *vec, int veclen); 21 | extern uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum); 22 | 23 | typedef union { 24 | uint8_t c[2]; 25 | uint16_t s; 26 | } pad_t; 27 | 28 | extern int in_checksum_pad_to_even( 29 | vec_t *vec, 30 | int veclen, 31 | pad_t *pad); 32 | 33 | extern int in_checksum_skip_crc16_field( 34 | const uint8_t *buf, // Buffer ptr 35 | vec_t *vec, 36 | int len, 37 | int crc_offset); 38 | 39 | extern int in_checksum_add_ip_pseudo_header( 40 | const uint8_t *buf, 41 | vec_t *vec, 42 | int type, 43 | int len, 44 | uint32_t phdr[2]); 45 | 46 | extern uint16_t psuedo_ip4_tcp( 47 | JNIEnv *env, 48 | const uint8_t *mem, 49 | size_t size, 50 | jint ip4, 51 | jint tcp); 52 | 53 | uint16_t psuedo_ip6_tcp( 54 | JNIEnv *env, 55 | const uint8_t *mem, 56 | size_t size, 57 | jint ip6, 58 | jint tcp); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif /* __cplusplus */ 64 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/util_in_cksum.h: -------------------------------------------------------------------------------- 1 | /* in_cksum.h 2 | * Declaration of Internet checksum routine. 3 | * 4 | * $Id: in_cksum.h 12117 2004-09-28 00:06:32Z guy $ 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif /* __cplusplus */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct { 16 | const uint8_t *ptr; 17 | int len; 18 | } vec_t; 19 | 20 | extern uint16_t in_cksum(const vec_t *vec, int veclen); 21 | extern uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum); 22 | 23 | typedef union { 24 | uint8_t c[2]; 25 | uint16_t s; 26 | } pad_t; 27 | 28 | extern int in_checksum_pad_to_even( 29 | vec_t *vec, 30 | int veclen, 31 | pad_t *pad); 32 | 33 | extern int in_checksum_skip_crc16_field( 34 | const uint8_t *buf, // Buffer ptr 35 | vec_t *vec, 36 | int len, 37 | int crc_offset); 38 | 39 | extern int in_checksum_add_ip_pseudo_header( 40 | const uint8_t *buf, 41 | vec_t *vec, 42 | int type, 43 | int len, 44 | uint32_t phdr[2]); 45 | 46 | extern uint16_t psuedo_ip4_tcp( 47 | JNIEnv *env, 48 | const uint8_t *mem, 49 | size_t size, 50 | jint ip4, 51 | jint tcp); 52 | 53 | uint16_t psuedo_ip6_tcp( 54 | JNIEnv *env, 55 | const uint8_t *mem, 56 | size_t size, 57 | jint ip6, 58 | jint tcp); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif /* __cplusplus */ 64 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/util_in_cksum.h: -------------------------------------------------------------------------------- 1 | /* in_cksum.h 2 | * Declaration of Internet checksum routine. 3 | * 4 | * $Id: in_cksum.h 12117 2004-09-28 00:06:32Z guy $ 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif /* __cplusplus */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct { 16 | const uint8_t *ptr; 17 | int len; 18 | } vec_t; 19 | 20 | extern uint16_t in_cksum(const vec_t *vec, int veclen); 21 | extern uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum); 22 | 23 | typedef union { 24 | uint8_t c[2]; 25 | uint16_t s; 26 | } pad_t; 27 | 28 | extern int in_checksum_pad_to_even( 29 | vec_t *vec, 30 | int veclen, 31 | pad_t *pad); 32 | 33 | extern int in_checksum_skip_crc16_field( 34 | const uint8_t *buf, // Buffer ptr 35 | vec_t *vec, 36 | int len, 37 | int crc_offset); 38 | 39 | extern int in_checksum_add_ip_pseudo_header( 40 | const uint8_t *buf, 41 | vec_t *vec, 42 | int type, 43 | int len, 44 | uint32_t phdr[2]); 45 | 46 | extern uint16_t psuedo_ip4_tcp( 47 | JNIEnv *env, 48 | const uint8_t *mem, 49 | size_t size, 50 | jint ip4, 51 | jint tcp); 52 | 53 | uint16_t psuedo_ip6_tcp( 54 | JNIEnv *env, 55 | const uint8_t *mem, 56 | size_t size, 57 | jint ip6, 58 | jint tcp); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif /* __cplusplus */ 64 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/util_in_cksum.h: -------------------------------------------------------------------------------- 1 | /* in_cksum.h 2 | * Declaration of Internet checksum routine. 3 | * 4 | * $Id: in_cksum.h 12117 2004-09-28 00:06:32Z guy $ 5 | */ 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif /* __cplusplus */ 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | typedef struct { 16 | const uint8_t *ptr; 17 | int len; 18 | } vec_t; 19 | 20 | extern uint16_t in_cksum(const vec_t *vec, int veclen); 21 | extern uint16_t in_cksum_shouldbe(uint16_t sum, uint16_t computed_sum); 22 | 23 | typedef union { 24 | uint8_t c[2]; 25 | uint16_t s; 26 | } pad_t; 27 | 28 | extern int in_checksum_pad_to_even( 29 | vec_t *vec, 30 | int veclen, 31 | pad_t *pad); 32 | 33 | extern int in_checksum_skip_crc16_field( 34 | const uint8_t *buf, // Buffer ptr 35 | vec_t *vec, 36 | int len, 37 | int crc_offset); 38 | 39 | extern int in_checksum_add_ip_pseudo_header( 40 | const uint8_t *buf, 41 | vec_t *vec, 42 | int type, 43 | int len, 44 | uint32_t phdr[2]); 45 | 46 | extern uint16_t psuedo_ip4_tcp( 47 | JNIEnv *env, 48 | const uint8_t *mem, 49 | size_t size, 50 | jint ip4, 51 | jint tcp); 52 | 53 | uint16_t psuedo_ip6_tcp( 54 | JNIEnv *env, 55 | const uint8_t *mem, 56 | size_t size, 57 | jint ip6, 58 | jint tcp); 59 | 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif /* __cplusplus */ 64 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/trafficEngineering/Routes.java: -------------------------------------------------------------------------------- 1 | package org.itesm.trafficEngineering; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | import com.google.common.base.MoreObjects; 6 | 7 | import java.util.List; 8 | 9 | import static com.google.common.base.Preconditions.checkArgument; 10 | import static com.google.common.base.Preconditions.checkNotNull; 11 | 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | 15 | public class Routes { 16 | 17 | private final Logger log = LoggerFactory.getLogger(getClass()); 18 | 19 | private List paths; 20 | 21 | @JsonCreator 22 | public Routes (@JsonProperty("paths") List paths) { 23 | 24 | try { 25 | 26 | checkNotNull(paths, "Paths must not be null."); 27 | 28 | int pathNum = paths.size(); 29 | checkArgument(pathNum >= 1, "Number of paths must not be 0."); 30 | 31 | this.paths = paths; 32 | 33 | } catch (IllegalArgumentException | NullPointerException e) { 34 | 35 | log.error(e.getMessage()); 36 | 37 | } 38 | 39 | } 40 | 41 | public List getPaths () { 42 | return this.paths; 43 | } 44 | 45 | @Override 46 | public String toString () { 47 | return MoreObjects 48 | .toStringHelper(this) 49 | .add("paths", this.paths) 50 | .toString(); 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /fwd_/src/test/java/mx/itesm/reactiveFwd/reactiveFwdTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package mx.itesm.reactiveFwd; 17 | 18 | import org.junit.After; 19 | import org.junit.Before; 20 | import org.junit.Test; 21 | import org.onosproject.cfg.ComponentConfigService; 22 | import org.onosproject.cfg.ComponentConfigAdapter; 23 | import org.onosproject.cfg.ConfigProperty; 24 | import org.onosproject.core.CoreService; 25 | 26 | import java.util.Set; 27 | 28 | /** 29 | * Set of tests of the ONOS application component. 30 | */ 31 | public class reactiveFwdTest { 32 | 33 | private reactiveFwd component; 34 | 35 | @Before 36 | public void setUp() { 37 | // component = new intentBasedNetworking(); 38 | // component.coreService = get(CoreService.class); 39 | // component.activate(); 40 | } 41 | 42 | @After 43 | public void tearDown() { 44 | // component.deactivate(); 45 | } 46 | 47 | @Test 48 | public void basics() { 49 | 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /traffic_engineering/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/linkDelay/impl/OsgiPropertyConstants.java 2 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/linkDelay/intf/LinkQualityService.java 3 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/trafficEngineering/Route.java 4 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/resetConnection/intf/ResetConnectionService.java 5 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/trafficEngineering/Routes.java 6 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/resetConnection/impl/ResetConnection.java 7 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/resetConnection/impl/OsgiPropertyConstants.java 8 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/trafficEngineering/TrafficEngineeringApplication.java 9 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/linkDelay/impl/LinkQualityManager.java 10 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/trafficEngineering/TrafficEngineeringResource.java 11 | /home/marcelo/Documents/SDNFV_Framework_DDoS_Solution/traffic_engineering/src/main/java/org/itesm/trafficEngineering/package-info.java 12 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/linkDelay/intf/LinkQualityService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.itesm.linkDelay.intf; 18 | 19 | import org.onosproject.net.DeviceId; 20 | import org.onosproject.net.Link; 21 | 22 | import java.util.List; 23 | import java.util.Map; 24 | 25 | /** 26 | * Link Quality Measurement Service. 27 | */ 28 | public interface LinkQualityService { 29 | 30 | /** 31 | * Get latency for one link. 32 | * @param link directional link. 33 | * @return the one-way latency of the specific link. 34 | */ 35 | int getLinkLatency(Link link); 36 | 37 | /** 38 | * Get latencies for all links. 39 | * 40 | * @return one-way latencies of all links. 41 | */ 42 | Map getAllLinkLatencies(); 43 | 44 | 45 | // ========== debug usages ========== 46 | Map getAllInitLatencies(); 47 | Map getAllControlLatencies(); 48 | 49 | Map> getDebugLinkLatancies(); 50 | } -------------------------------------------------------------------------------- /ips/agentq.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import random 3 | from random import randrange 4 | from IPython.display import clear_output 5 | from collections import deque 6 | import progressbar 7 | from tensorflow.keras import Model, Sequential 8 | from tensorflow.keras.layers import Dense, Embedding, Reshape, Conv2D, Dropout, MaxPooling1D, Flatten 9 | from collections import defaultdict 10 | 11 | 12 | # Agent 13 | class AgentQ: 14 | def __init__(self, enviroment, optimizer): 15 | 16 | # Initialize atributes 17 | self._action_size = len(enviroment.action_space) 18 | self._optimizer = optimizer 19 | self.enviroment = enviroment 20 | 21 | 22 | self.q_values = defaultdict(lambda: np.zeros(self._action_size)) 23 | self.blockFlag = 0 24 | 25 | # Initialize discount and exploration rate 26 | self.gamma = 0.7 27 | self.epsilon = 0.6 28 | self.alpha = 0.6 29 | 30 | 31 | def get_epsilon(self): 32 | return self.epsilon 33 | 34 | 35 | def set_epsilon_simulated_annealing(self, step, initial_epsilon): 36 | Temperature = 10 37 | if (initial_epsilon)*np.exp(-step/Temperature) > 0.10: 38 | self.epsilon = (initial_epsilon)*np.exp(-step/Temperature) 39 | 40 | def get_random_action(self): 41 | return randrange(self._action_size) 42 | 43 | 44 | def act(self, state): 45 | print("epsilon: ", self.epsilon) 46 | if np.random.rand() <= self.epsilon: 47 | print("Exploring") 48 | return self.get_random_action() 49 | 50 | return np.argmax(self.q_values[state]) 51 | 52 | 53 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/packet_flow.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_packet_flow_h 4 | #define _Included_packet_flow_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_JFlowKey.h" 16 | 17 | #define FLOW_KEY_PAIR_COUNT org_jnetpcap_packet_JFlowKey_FLOW_KEY_PAIR_COUNT 18 | 19 | struct scan_t; // Forward reference 20 | 21 | /* 22 | * Flow key is made up of several key pairs. In order for a flow key to be 23 | * equal to another flow key, all the pair values must match. The flow pairs 24 | * can be bi-directional. If uni directional flag is not set, it means that the 25 | * second array of pairs is also in use and the values there are exact pair 26 | * reversal of the first array of pairs. 27 | */ 28 | typedef struct flow_key_t { 29 | uint64_t header_map; // bitmap of header IDs part of this flowkey 30 | uint32_t hash; // Hashcode 31 | #define FLOW_KEY_FLAG_REVERSABLE_PAIRS org_jnetpcap_packet_JFlowKey_FLAG_REVERSABLE 32 | uint16_t flags; // flags 33 | uint16_t pair_count; // number of pairs upto FLOW_KEY_PAIR_COUNT 34 | uint8_t id[FLOW_KEY_PAIR_COUNT]; 35 | uint32_t forward_pair[FLOW_KEY_PAIR_COUNT][2]; 36 | uint32_t reverse_pair[FLOW_KEY_PAIR_COUNT][2]; 37 | } flow_key_t; 38 | 39 | /** 40 | * Based on the first part of the key, it sets the second part of the key 41 | * using reversed direction values for each pair. flow_key_t->pair[2] is a 42 | * multi-dimensional array that has 2 sets of key pairs. [0] for forward keys 43 | * and [1] for reverse direction keys. 44 | */ 45 | void flow_key_init(flow_key_t *key, int id); 46 | 47 | void process_flow_key(scan_t *scan); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/packet_flow.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_packet_flow_h 4 | #define _Included_packet_flow_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_JFlowKey.h" 16 | 17 | #define FLOW_KEY_PAIR_COUNT org_jnetpcap_packet_JFlowKey_FLOW_KEY_PAIR_COUNT 18 | 19 | struct scan_t; // Forward reference 20 | 21 | /* 22 | * Flow key is made up of several key pairs. In order for a flow key to be 23 | * equal to another flow key, all the pair values must match. The flow pairs 24 | * can be bi-directional. If uni directional flag is not set, it means that the 25 | * second array of pairs is also in use and the values there are exact pair 26 | * reversal of the first array of pairs. 27 | */ 28 | typedef struct flow_key_t { 29 | uint64_t header_map; // bitmap of header IDs part of this flowkey 30 | uint32_t hash; // Hashcode 31 | #define FLOW_KEY_FLAG_REVERSABLE_PAIRS org_jnetpcap_packet_JFlowKey_FLAG_REVERSABLE 32 | uint16_t flags; // flags 33 | uint16_t pair_count; // number of pairs upto FLOW_KEY_PAIR_COUNT 34 | uint8_t id[FLOW_KEY_PAIR_COUNT]; 35 | uint32_t forward_pair[FLOW_KEY_PAIR_COUNT][2]; 36 | uint32_t reverse_pair[FLOW_KEY_PAIR_COUNT][2]; 37 | } flow_key_t; 38 | 39 | /** 40 | * Based on the first part of the key, it sets the second part of the key 41 | * using reversed direction values for each pair. flow_key_t->pair[2] is a 42 | * multi-dimensional array that has 2 sets of key pairs. [0] for forward keys 43 | * and [1] for reverse direction keys. 44 | */ 45 | void flow_key_init(flow_key_t *key, int id); 46 | 47 | void process_flow_key(scan_t *scan); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/packet_flow.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_packet_flow_h 4 | #define _Included_packet_flow_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_JFlowKey.h" 16 | 17 | #define FLOW_KEY_PAIR_COUNT org_jnetpcap_packet_JFlowKey_FLOW_KEY_PAIR_COUNT 18 | 19 | struct scan_t; // Forward reference 20 | 21 | /* 22 | * Flow key is made up of several key pairs. In order for a flow key to be 23 | * equal to another flow key, all the pair values must match. The flow pairs 24 | * can be bi-directional. If uni directional flag is not set, it means that the 25 | * second array of pairs is also in use and the values there are exact pair 26 | * reversal of the first array of pairs. 27 | */ 28 | typedef struct flow_key_t { 29 | uint64_t header_map; // bitmap of header IDs part of this flowkey 30 | uint32_t hash; // Hashcode 31 | #define FLOW_KEY_FLAG_REVERSABLE_PAIRS org_jnetpcap_packet_JFlowKey_FLAG_REVERSABLE 32 | uint16_t flags; // flags 33 | uint16_t pair_count; // number of pairs upto FLOW_KEY_PAIR_COUNT 34 | uint8_t id[FLOW_KEY_PAIR_COUNT]; 35 | uint32_t forward_pair[FLOW_KEY_PAIR_COUNT][2]; 36 | uint32_t reverse_pair[FLOW_KEY_PAIR_COUNT][2]; 37 | } flow_key_t; 38 | 39 | /** 40 | * Based on the first part of the key, it sets the second part of the key 41 | * using reversed direction values for each pair. flow_key_t->pair[2] is a 42 | * multi-dimensional array that has 2 sets of key pairs. [0] for forward keys 43 | * and [1] for reverse direction keys. 44 | */ 45 | void flow_key_init(flow_key_t *key, int id); 46 | 47 | void process_flow_key(scan_t *scan); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/packet_flow.h: -------------------------------------------------------------------------------- 1 | /* Header for analysis_flow utility methods */ 2 | 3 | #ifndef _Included_packet_flow_h 4 | #define _Included_packet_flow_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "export.h" 13 | 14 | #include 15 | #include "org_jnetpcap_packet_JFlowKey.h" 16 | 17 | #define FLOW_KEY_PAIR_COUNT org_jnetpcap_packet_JFlowKey_FLOW_KEY_PAIR_COUNT 18 | 19 | struct scan_t; // Forward reference 20 | 21 | /* 22 | * Flow key is made up of several key pairs. In order for a flow key to be 23 | * equal to another flow key, all the pair values must match. The flow pairs 24 | * can be bi-directional. If uni directional flag is not set, it means that the 25 | * second array of pairs is also in use and the values there are exact pair 26 | * reversal of the first array of pairs. 27 | */ 28 | typedef struct flow_key_t { 29 | uint64_t header_map; // bitmap of header IDs part of this flowkey 30 | uint32_t hash; // Hashcode 31 | #define FLOW_KEY_FLAG_REVERSABLE_PAIRS org_jnetpcap_packet_JFlowKey_FLAG_REVERSABLE 32 | uint16_t flags; // flags 33 | uint16_t pair_count; // number of pairs upto FLOW_KEY_PAIR_COUNT 34 | uint8_t id[FLOW_KEY_PAIR_COUNT]; 35 | uint32_t forward_pair[FLOW_KEY_PAIR_COUNT][2]; 36 | uint32_t reverse_pair[FLOW_KEY_PAIR_COUNT][2]; 37 | } flow_key_t; 38 | 39 | /** 40 | * Based on the first part of the key, it sets the second part of the key 41 | * using reversed direction values for each pair. flow_key_t->pair[2] is a 42 | * multi-dimensional array that has 2 sets of key pairs. [0] for forward keys 43 | * and [1] for reverse direction keys. 44 | */ 45 | void flow_key_init(flow_key_t *key, int id); 46 | 47 | void process_flow_key(scan_t *scan); 48 | 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | #endif 54 | -------------------------------------------------------------------------------- /flowCollector/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- 1 | mx/itesm/FlowCollector/FlowCollector$ReactivePacketProcessor.class 2 | mx/itesm/FlowCollector/jnetpcap/FlowGenerator.class 3 | mx/itesm/FlowCollector/jnetpcap/MutableInt.class 4 | mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorkerY.class 5 | mx/itesm/FlowCollector/jnetpcap/TcpState.class 6 | mx/itesm/FlowCollector/jnetpcap/worker/LoadPcapInterfaceWorker.class 7 | mx/itesm/FlowCollector/jnetpcap/BasicPacketInfo.class 8 | mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker.class 9 | mx/itesm/FlowCollector/FlowCollector.class 10 | mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker$FlowListener.class 11 | mx/itesm/FlowCollector/FlowCollector$1.class 12 | mx/itesm/FlowCollector/jnetpcap/IdGenerator.class 13 | mx/itesm/FlowCollector/jnetpcap/worker/PcapReader$FlowListener.class 14 | mx/itesm/FlowCollector/jnetpcap/TcpState$State.class 15 | mx/itesm/FlowCollector/jnetpcap/PcapIfWrapper.class 16 | mx/itesm/FlowCollector/jnetpcap/PacketReader.class 17 | mx/itesm/FlowCollector/jnetpcap/BasicFlow.class 18 | mx/itesm/FlowCollector/jnetpcap/DateFormatter.class 19 | mx/itesm/FlowCollector/Mitigation/Mitigation$InternalIntentListener.class 20 | mx/itesm/FlowCollector/jnetpcap/worker/InsertCsvRow.class 21 | mx/itesm/api/flow/FlowApi.class 22 | mx/itesm/api/ApiResponse.class 23 | mx/itesm/FlowCollector/jnetpcap/FlowFeature$1.class 24 | mx/itesm/FlowCollector/jnetpcap/Protocol.class 25 | mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorker.class 26 | mx/itesm/FlowCollector/Helpers.class 27 | mx/itesm/FlowCollector/jnetpcap/FlowFeature.class 28 | mx/itesm/FlowCollector/TopoMonitor/TopologyMonitor.class 29 | mx/itesm/FlowCollector/FlowCollector$PacketCollector.class 30 | mx/itesm/FlowCollector/jnetpcap/Utils.class 31 | mx/itesm/FlowCollector/Mitigation/Mitigation.class 32 | mx/itesm/api/flow/FlowRuleId.class 33 | mx/itesm/FlowCollector/jnetpcap/worker/FlowGenListener.class 34 | mx/itesm/FlowCollector/jnetpcap/worker/PcapReader.class 35 | -------------------------------------------------------------------------------- /flowCollector/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Canadian Institute for Cybersecurity (CIC) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (CICFlowMeter), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | 21 | For citation in your works and also understanding CICFlowMeter (formerly ISCXFlowMeter) completely, you can find below published papers: 22 | 23 | Arash Habibi Lashkari, Gerard Draper-Gil, Mohammad Saiful Islam Mamun and Ali A. Ghorbani, "Characterization of Tor Traffic Using Time Based Features", In the proceeding of the 3rd International Conference on Information System Security and Privacy, SCITEPRESS, Porto, Portugal, 2017 24 | 25 | Gerard Drapper Gil, Arash Habibi Lashkari, Mohammad Mamun, Ali A. Ghorbani, "Characterization of Encrypted and VPN Traffic Using Time-Related Features", In Proceedings of the 2nd International Conference on Information Systems Security and Privacy(ICISSP 2016) , pages 407-414, Rome , Italy 26 | 27 | Contributors: 28 | Arash Habibi Lashkari: Researcher and Developer (Founder) 29 | 30 | Gerard Drapper: Researcher and Developer (Co-funder) 31 | 32 | muhammad saiful islam: Researcher and Developer (Co-funder) 33 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/trafficEngineering/Route.java: -------------------------------------------------------------------------------- 1 | package org.itesm.trafficEngineering; 2 | 3 | import com.fasterxml.jackson.annotation.JsonCreator; 4 | import com.fasterxml.jackson.annotation.JsonProperty; 5 | import com.google.common.base.MoreObjects; 6 | import org.onosproject.net.DeviceId; 7 | import org.onosproject.net.HostId; 8 | 9 | import java.util.ArrayList; 10 | import java.util.List; 11 | 12 | import static com.google.common.base.Preconditions.checkArgument; 13 | import static com.google.common.base.Preconditions.checkNotNull; 14 | 15 | import org.slf4j.LoggerFactory; 16 | import org.slf4j.Logger; 17 | 18 | public class Route { 19 | 20 | private final Logger log = LoggerFactory.getLogger(getClass()); 21 | 22 | private HostId srcId; 23 | private HostId dstId; 24 | private List deviceIds; 25 | 26 | @JsonCreator 27 | public Route (@JsonProperty("path") List path) { 28 | 29 | try { 30 | 31 | checkNotNull(path, "Path must not be null."); 32 | 33 | int deviceNum = path.size(); 34 | checkArgument(deviceNum >= 3, "Number of devices on path must not be less than 3."); 35 | 36 | this.srcId = HostId.hostId(path.get(0)); 37 | this.dstId = HostId.hostId(path.get(deviceNum - 1)); 38 | this.deviceIds = new ArrayList(); 39 | for (int i = 1; i < deviceNum - 1; i++) { 40 | this.deviceIds.add(DeviceId.deviceId(path.get(i))); 41 | } 42 | 43 | } catch (IllegalArgumentException | NullPointerException e) { 44 | 45 | log.error(e.getMessage()); 46 | 47 | } 48 | } 49 | 50 | public HostId getDstId() { 51 | return this.dstId; 52 | } 53 | 54 | public HostId getSrcId() { 55 | return this.srcId; 56 | } 57 | 58 | public List getDeviceIds() { 59 | return this.deviceIds; 60 | } 61 | 62 | @Override 63 | public String toString() { 64 | return MoreObjects 65 | .toStringHelper(this) 66 | .add("srcId", this.srcId) 67 | .add("dstId", this.dstId) 68 | .add("deviceIds", this.deviceIds) 69 | .toString(); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /flowCollector/Flow_Saving.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Created on Mon Sep 7 10:40:31 2020 4 | 5 | @author: Marcelo 6 | """ 7 | from flask import Flask, request, abort 8 | from keras.models import load_model 9 | from numpy import load 10 | import pickle, time 11 | import os 12 | import logging 13 | import pandas as pd 14 | logging.basicConfig(level=logging.DEBUG) 15 | #log = logging.getLogger('werkzeug') 16 | #log.setLevel(logging.ERROR) 17 | import sys 18 | import numpy as np 19 | app = Flask(__name__) 20 | ids_slowrate_Flows = {} 21 | ids_highrate_Flows = {} 22 | 23 | # slow rate 24 | columns = [ # flow identifier 25 | 'SWID', 26 | 'SrcMac', 27 | 'DstMac'] 28 | class_values_application = { 29 | 0:"normal", 30 | 1:"slowbody", 31 | 2:"slowread", 32 | 5:"slowheader" 33 | } 34 | 35 | class_values_transport = { 36 | 0:"normal", 37 | 1:"syn", 38 | 2:"udp" 39 | } 40 | 41 | 42 | ip_victim = {"192.168.56.101":'ip'} # SW6 43 | 44 | currentAttack = "slowread" 45 | experiment = "_a_1_r_400" 46 | 47 | file = "/home/marcelo/Documents/FlowCollectionDataset/eval3-"+currentAttack+experiment+".txt" 48 | 49 | def raw_flow_to_values(flow): 50 | return [list(flow.values())] 51 | 52 | def saving(ipsource, ipdestination, df): 53 | global ip_victim,currentAttack,file1 54 | real_label = "normal" 55 | if (ipsource in ip_victim) or (ipdestination in ip_victim): # labeled as an attack 56 | real_label = currentAttack 57 | saveflow = str(','.join(str(e) for e in df))+","+str(real_label)+"\n" 58 | with open(file,"a") as f: 59 | f.write(saveflow) 60 | return 0 61 | 62 | @app.route("/save", methods=['GET','POST']) 63 | def test(): 64 | global xtest, lstmModel 65 | if request.method == 'POST': 66 | values = request.json 67 | df = pd.DataFrame.from_dict(values, orient='index') 68 | df = df[0] 69 | ipsource = df['SrcIP'] 70 | ipdestination = df['DstIP'] 71 | timeStamp = df['Timestamp'] 72 | df.drop(columns,axis='rows',inplace=True) 73 | df = df.values.tolist() 74 | saving(ipsource, ipdestination, df) 75 | return "saved",202 76 | 77 | def start_IDS_Server(): 78 | app.run(debug=True, host='0.0.0.0', port = 9001) 79 | 80 | if __name__ == '__main__': 81 | # start IDS 82 | start_IDS_Server() 83 | -------------------------------------------------------------------------------- /fwd_/src/main/java/mx/itesm/reactiveFwd/ReactiveForwardMetrics.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package mx.itesm.reactiveFwd; 17 | 18 | import org.onlab.packet.MacAddress; 19 | import static com.google.common.base.MoreObjects.toStringHelper; 20 | 21 | /** 22 | * Sample reactive forwarding application. 23 | */ 24 | public class ReactiveForwardMetrics { 25 | private Long replyPacket = null; 26 | private Long inPacket = null; 27 | private Long droppedPacket = null; 28 | private Long forwardedPacket = null; 29 | private MacAddress macAddress; 30 | 31 | ReactiveForwardMetrics(Long replyPacket, Long inPacket, Long droppedPacket, 32 | Long forwardedPacket, MacAddress macAddress) { 33 | this.replyPacket = replyPacket; 34 | this.inPacket = inPacket; 35 | this.droppedPacket = droppedPacket; 36 | this.forwardedPacket = forwardedPacket; 37 | this.macAddress = macAddress; 38 | } 39 | 40 | public void incremnetReplyPacket() { 41 | replyPacket++; 42 | 43 | } 44 | 45 | public void incrementInPacket() { 46 | inPacket++; 47 | } 48 | 49 | public void incrementDroppedPacket() { 50 | droppedPacket++; 51 | } 52 | 53 | public void incrementForwardedPacket() { 54 | forwardedPacket++; 55 | } 56 | 57 | public MacAddress getMacAddress() { 58 | return macAddress; 59 | } 60 | 61 | @Override 62 | public String toString() { 63 | return toStringHelper(this) 64 | .add("inpktCounter ", inPacket) 65 | .add("replypktCounter ", replyPacket) 66 | .add("forwardpktCounter ", forwardedPacket) 67 | .add("droppktCounter ", droppedPacket).toString(); 68 | } 69 | } -------------------------------------------------------------------------------- /traffic_engineering/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 22 | Sample App REST API v1.0 23 | 24 | 25 | 26 | Secured 27 | /* 28 | 29 | 30 | admin 31 | viewer 32 | 33 | 34 | 35 | 36 | admin 37 | viewer 38 | 39 | 40 | 41 | BASIC 42 | karaf 43 | 44 | 45 | 46 | JAX-RS Service 47 | org.glassfish.jersey.servlet.ServletContainer 48 | 49 | javax.ws.rs.Application 50 | org.itesm.trafficEngineering.TrafficEngineeringApplication 51 | 52 | 1 53 | 54 | 55 | 56 | JAX-RS Service 57 | /* 58 | 59 | 60 | -------------------------------------------------------------------------------- /flowCollector/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/nio_jmemory.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_nio_jmemory_h 4 | #define _Included_nio_jmemory_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include "export.h" 12 | 13 | #include 14 | 15 | typedef struct memory_usage_t { 16 | uint64_t total_allocated; 17 | uint64_t total_deallocated; 18 | 19 | uint64_t total_allocate_calls; 20 | uint64_t total_deallocate_calls; 21 | 22 | uint64_t seg_0_255_bytes; 23 | uint64_t seg_256_or_above_bytes; 24 | 25 | uint64_t max_direct; 26 | uint64_t soft_direct; 27 | uint64_t reserved_direct; 28 | uint64_t available_direct; 29 | 30 | } memory_usage_t; 31 | 32 | typedef struct jni_global_ref_t { 33 | int count; // Number of references held 34 | jobject reference[]; // array of references held 35 | } jni_global_ref_t; 36 | 37 | 38 | extern jclass jmemoryClass; 39 | extern jclass jmemoryPoolClass; 40 | extern jclass jmemoryReferenceClass; 41 | 42 | extern jmethodID jmemoryToDebugStringMID; 43 | extern jmethodID jmemoryMaxDirectMemoryBreachMID; 44 | extern jmethodID jmemorySoftDirectMemoryBreachMID; 45 | extern jmethodID jmemoryCleanupMID; 46 | extern jmethodID jmemoryPeer0MID; 47 | extern jmethodID jmemoryAllocateMID; 48 | extern jmethodID jmemorySetSize0MID; 49 | 50 | extern jfieldID jmemoryPhysicalFID; 51 | extern jfieldID jmemorySizeFID; 52 | extern jfieldID jmemoryOwnerFID; 53 | extern jfieldID jmemoryKeeperFID; 54 | extern jfieldID jmemoryRefFID; 55 | extern jfieldID jmemoryRefAddressFID; 56 | extern jobject jmemoryPOINTER_CONST; // JMemory.POINTER constant reference 57 | 58 | extern jmethodID jmemoryPoolAllocateExclusiveMID; 59 | extern jmethodID jmemoryPoolDefaultMemoryPoolMID; 60 | 61 | extern jobject defaultMemoryPool; 62 | 63 | extern memory_usage_t memory_usage; 64 | 65 | // Prototypes 66 | void init_jmemory(JNIEnv *env); 67 | void *getJMemoryPhysical(JNIEnv *env, jobject obj); 68 | void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value); 69 | void jmemoryCleanup(JNIEnv *env, jobject obj); 70 | 71 | jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length, jobject owner); 72 | 73 | char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref); 74 | void jmemoryResize(JNIEnv *env, jobject obj, size_t size); 75 | char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj); 76 | char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf); 77 | 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/Utils.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap; 2 | 3 | import org.apache.tika.Tika; 4 | import org.jnetpcap.PcapClosedException; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | import java.io.*; 9 | 10 | public class Utils { 11 | protected static final Logger logger = LoggerFactory.getLogger(Utils.class); 12 | public static final String FILE_SEP = System.getProperty("file.separator"); 13 | public static final String LINE_SEP = System.lineSeparator(); 14 | private final static String PCAP = "application/vnd.tcpdump.pcap"; 15 | public static final String FLOW_SUFFIX = "_Flow.csv"; 16 | 17 | 18 | private static boolean isPcapFile(String contentType) { 19 | 20 | return PCAP.equalsIgnoreCase(contentType); 21 | } 22 | 23 | public static boolean isPcapFile(File file) { 24 | 25 | if (file == null) { 26 | return false; 27 | } 28 | 29 | try { 30 | 31 | //Files.probeContentType returns null on Windows 32 | /*Path filePath = Paths.get(file.getPath()); 33 | contentType = Files.probeContentType(filePath);*/ 34 | 35 | return isPcapFile(new Tika().detect(file)); 36 | 37 | } catch (IOException e) { 38 | logger.debug(e.getMessage()); 39 | } 40 | 41 | return false; 42 | } 43 | 44 | public static boolean isPcapFile(InputStream stream) { 45 | 46 | if (stream == null) { 47 | return false; 48 | } 49 | 50 | try { 51 | return isPcapFile(new Tika().detect(stream)); 52 | } catch (IOException e) { 53 | logger.debug(e.getMessage()); 54 | } 55 | 56 | return false; 57 | } 58 | 59 | public static long countLines(String fileName) { 60 | File file =new File(fileName); 61 | int linenumber = 0; 62 | FileReader fr; 63 | LineNumberReader lnr = null; 64 | try { 65 | fr = new FileReader(file); 66 | lnr = new LineNumberReader(fr); 67 | 68 | while (lnr.readLine() != null){ 69 | linenumber++; 70 | } 71 | 72 | } catch (IOException e) { 73 | logger.debug(e.getMessage()); 74 | } finally { 75 | 76 | if (lnr != null) { 77 | 78 | try { 79 | lnr.close(); 80 | } catch (IOException e) { 81 | logger.debug(e.getMessage()); 82 | } 83 | } 84 | } 85 | return linenumber; 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/nio_jmemory.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_nio_jmemory_h 4 | #define _Included_nio_jmemory_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include "export.h" 12 | 13 | #include 14 | 15 | typedef struct memory_usage_t { 16 | uint64_t total_allocated; 17 | uint64_t total_deallocated; 18 | 19 | uint64_t total_allocate_calls; 20 | uint64_t total_deallocate_calls; 21 | 22 | uint64_t seg_0_255_bytes; 23 | uint64_t seg_256_or_above_bytes; 24 | 25 | uint64_t max_direct; 26 | uint64_t soft_direct; 27 | uint64_t reserved_direct; 28 | uint64_t available_direct; 29 | 30 | } memory_usage_t; 31 | 32 | typedef struct jni_global_ref_t { 33 | int count; // Number of references held 34 | jobject reference[]; // array of references held 35 | } jni_global_ref_t; 36 | 37 | 38 | extern jclass jmemoryClass; 39 | extern jclass jmemoryPoolClass; 40 | extern jclass jmemoryReferenceClass; 41 | 42 | extern jmethodID jmemoryToDebugStringMID; 43 | extern jmethodID jmemoryMaxDirectMemoryBreachMID; 44 | extern jmethodID jmemorySoftDirectMemoryBreachMID; 45 | extern jmethodID jmemoryCleanupMID; 46 | extern jmethodID jmemoryPeer0MID; 47 | extern jmethodID jmemoryAllocateMID; 48 | extern jmethodID jmemorySetSize0MID; 49 | 50 | extern jfieldID jmemoryPhysicalFID; 51 | extern jfieldID jmemorySizeFID; 52 | extern jfieldID jmemoryOwnerFID; 53 | extern jfieldID jmemoryKeeperFID; 54 | extern jfieldID jmemoryRefFID; 55 | extern jfieldID jmemoryRefAddressFID; 56 | extern jobject jmemoryPOINTER_CONST; // JMemory.POINTER constant reference 57 | 58 | extern jmethodID jmemoryPoolAllocateExclusiveMID; 59 | extern jmethodID jmemoryPoolDefaultMemoryPoolMID; 60 | 61 | extern jobject defaultMemoryPool; 62 | 63 | extern memory_usage_t memory_usage; 64 | 65 | // Prototypes 66 | void init_jmemory(JNIEnv *env); 67 | void *getJMemoryPhysical(JNIEnv *env, jobject obj); 68 | void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value); 69 | void jmemoryCleanup(JNIEnv *env, jobject obj); 70 | 71 | jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length, jobject owner); 72 | 73 | char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref); 74 | void jmemoryResize(JNIEnv *env, jobject obj, size_t size); 75 | char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj); 76 | char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf); 77 | 78 | 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #endif 83 | -------------------------------------------------------------------------------- /flowCollector/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/FlowGenerator.java 2 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/Mitigation/Mitigation.java 3 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/ReadPcapFileWorker.java 4 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/FlowFeature.java 5 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/IdGenerator.java 6 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/DateFormatter.java 7 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/FlowGenListener.java 8 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorkerY.java 9 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/TcpState.java 10 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/api/ApiResponse.java 11 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/LoadPcapInterfaceWorker.java 12 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/Protocol.java 13 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/Helpers.java 14 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/TrafficFlowWorker.java 15 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/TopoMonitor/TopologyMonitor.java 16 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/InsertCsvRow.java 17 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/api/flow/FlowRuleId.java 18 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/BasicPacketInfo.java 19 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/BasicFlow.java 20 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/FlowCollector.java 21 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/PcapReader.java 22 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/PcapIfWrapper.java 23 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/api/flow/FlowApi.java 24 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/PacketReader.java 25 | /home/marcelo/Documents/FlowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/Utils.java 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SDNFV_Framework_DDoS_Solution 2 | 3 | 4 | ## Setup tools: 5 | 1. Install a linux OS, e.g. Ubuntu, or Virtualize 6 | 2. Install Mininet 7 | 3. Install ONOS (version 2.6.0) and setup the basic applications, as done in our tutorials in http://sdn.wikidot.com/tutorials 8 | 4. Make sure that the native app of ONOS ReactiveFowarding is deactivated/uninstalled 9 | 5. Install the [fwd_](/fwd_/) application which replaces the ReactiveForwarding and adds other functionalities 10 | 6. Install the [traffic_engineering](/traffic_engineering/) application 11 | 12 | ## Setup Network 13 | 1. Create docker images using [DockerFile](sdn_nfv_tests/ubuntu/) 14 | 2. Start network configured in script [exampleTopology_traffic.py](/sdn_nfv_tests/) 15 | 16 | 2.1. >> sudo python3 exampleTopology_traffic.py 17 | 18 | 3. Run >> pingall command in the mininet(contairned) terminal to check connectivity of all hosts 19 | 20 | 21 | ## Deploy IDS/IPS 22 | 1. Run the FlowCollectorModule. 23 | 24 | 1.1. Open a terminal at the [flowCollector](/flowCollector/) directoty 25 | 26 | 1.2. >> sudo bash 27 | 28 | 1.3. >> gradle execute 29 | 30 | 2. Run the IDS and IPS 31 | 32 | 1.1. Open a terminal at the [ips](/ips/) directory 33 | 34 | 1.2. >> sudo python3 qLearning.py 35 | 36 | ## Run tests 37 | 1. Open terminals in mininet 38 | 39 | 1.1. >> xterm h1 h2 h3 h4 40 | 41 | 2. Initiate legitimate traffic from h1 and h3 42 | 43 | 2.1. >> iperf -c 10.0.0.%s -t 800 -b 10k 44 | 45 | 3. Initiate attack traffic from h2 and h4 46 | 47 | 2.2 >> slowhttptest -c 10000 -X -r 300 -w 1 -y 1 -n 1 -z 5 -u http://localhost:8080/ -p 5 -l 350 48 | 49 | ## Notes: 50 | 1. For steps 2 and 3 of Setup Tools use the tutorials hosted at http://sdn.wikidot.com/tutorials 51 | 2. Host 101 captures the traffic of the network. 52 | 3. Some variables should be changed, such as: 53 | 54 | 3.1. The paths where the results of the experiments are being saved, in [script lstm_server_for_ips_improved.py](/ids/slow_rate/lstm_testbed_based) 55 | 56 | 3.2. The paths where the LSTM model is allocated must be changed [script lstm_server_for_ips_improved.py](/ids/slow_rate/lstm_testbed_based) 57 | 58 | 3.3. Any other that causes conflict while running the app in your system. 59 | 60 | 4. The author will try to create a tutorial video that explains the deployment of the system and upload it to youtube. Thereafter, the link will be shared in this instruction file. 61 | 62 | ## How to cite this work 63 | Yungaicela-Naula, N. M., Vargas-Rosales, C., & Pérez-Díaz, J. A. (2023). SDN/NFV-based framework for autonomous defense against slow-rate DDoS attacks by using reinforcement learning. Future Generation Computer Systems. 64 | # SDNFV_Framework_DDoS_Solution 65 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/util_debug.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_util_debug_h 6 | #define Include_util_debug_h 7 | 8 | #define JNIEXPORT extern "C" 9 | 10 | #undef __declspec 11 | #define __declspec(a) extern "C" 12 | 13 | #include 14 | 15 | #define DEBUG_MAX_LEVEL 10 16 | 17 | #define DEBUG_TRACE 10 18 | #define DEBUG_INFO 8 19 | #define DEBUG_WARN 6 20 | #define DEBUG_ERROR 4 21 | 22 | #define DEFAULT_LEVEL DEBUG_TRACE 23 | #define DEFAULT_INDENT_CHAR '.' 24 | 25 | extern int debug_get_level(); 26 | extern void debug_set_level(int level); 27 | extern void debug_inc(); 28 | extern void debug_dec(); 29 | extern void debug_reset(); 30 | extern void debug_vmsg(const char *type, const char *msg, const char *fmt, va_list ap); 31 | extern void debug_msg(const char *type, const char *msg, const char *fmt, ...); 32 | extern void debug_trace(const char *msg, const char *fmt, ...); 33 | extern void debug_warn(const char *msg, const char *fmt, ...); 34 | extern void debug_error(const char *msg, const char *fmt, ...); 35 | extern void debug_info(const char *msg, const char *fmt, ...); 36 | extern void debug_enter(const char *method); 37 | extern void debug_exit(const char *method); 38 | 39 | #define DEBUG_MAX_NAME 256 40 | #define DEBUG_DEFAULT_LEVEL TRACE 41 | 42 | /*** 43 | ******** Temporarily backedout 44 | class Debug { 45 | public: 46 | enum Level { 47 | ALL, 48 | TRACE, 49 | INFO, 50 | WARN, 51 | ERR, 52 | NONE, 53 | UNDEFINED 54 | }; 55 | 56 | private: 57 | Level level; 58 | int indentation; 59 | char indentBuffer[DEBUG_MAX_LEVEL + 2]; 60 | char indentChar; 61 | Debug *parent; 62 | char name[DEBUG_MAX_NAME]; 63 | 64 | public: 65 | Debug(const char *name, Debug *parent); 66 | Debug(const char *name); 67 | Debug(const char *name, Level defaultLevel); 68 | ~Debug() { } 69 | void setLevel(Level level); 70 | Level getLevel(); 71 | void inc(); 72 | void dec(); 73 | void reset(); 74 | 75 | void msg(Level type, char *msg, char *fmt, ...); 76 | void trace(char *msg, char *fmt, ...); 77 | void info(char *msg, char *fmt, ...); 78 | void warn(char *msg, char *fmt, ...); 79 | void error(char *msg, char *fmt, ...); 80 | 81 | void enter(char *method); 82 | void exit(char *method); 83 | 84 | 85 | private: 86 | void vmsg(Level type, char *msg, char *fgm, va_list ap); 87 | char *indent(); 88 | char *getLevelName(Level level); 89 | static char *levelNames[ERR + 1]; 90 | static Debug global_logger; 91 | static Debug null_logger; 92 | }; 93 | 94 | ****************/ 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/util_debug.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_util_debug_h 6 | #define Include_util_debug_h 7 | 8 | #define JNIEXPORT extern "C" 9 | 10 | #undef __declspec 11 | #define __declspec(a) extern "C" 12 | 13 | #include 14 | 15 | #define DEBUG_MAX_LEVEL 10 16 | 17 | #define DEBUG_TRACE 10 18 | #define DEBUG_INFO 8 19 | #define DEBUG_WARN 6 20 | #define DEBUG_ERROR 4 21 | 22 | #define DEFAULT_LEVEL DEBUG_TRACE 23 | #define DEFAULT_INDENT_CHAR '.' 24 | 25 | extern int debug_get_level(); 26 | extern void debug_set_level(int level); 27 | extern void debug_inc(); 28 | extern void debug_dec(); 29 | extern void debug_reset(); 30 | extern void debug_vmsg(const char *type, const char *msg, const char *fmt, va_list ap); 31 | extern void debug_msg(const char *type, const char *msg, const char *fmt, ...); 32 | extern void debug_trace(const char *msg, const char *fmt, ...); 33 | extern void debug_warn(const char *msg, const char *fmt, ...); 34 | extern void debug_error(const char *msg, const char *fmt, ...); 35 | extern void debug_info(const char *msg, const char *fmt, ...); 36 | extern void debug_enter(const char *method); 37 | extern void debug_exit(const char *method); 38 | 39 | #define DEBUG_MAX_NAME 256 40 | #define DEBUG_DEFAULT_LEVEL TRACE 41 | 42 | /*** 43 | ******** Temporarily backedout 44 | class Debug { 45 | public: 46 | enum Level { 47 | ALL, 48 | TRACE, 49 | INFO, 50 | WARN, 51 | ERR, 52 | NONE, 53 | UNDEFINED 54 | }; 55 | 56 | private: 57 | Level level; 58 | int indentation; 59 | char indentBuffer[DEBUG_MAX_LEVEL + 2]; 60 | char indentChar; 61 | Debug *parent; 62 | char name[DEBUG_MAX_NAME]; 63 | 64 | public: 65 | Debug(const char *name, Debug *parent); 66 | Debug(const char *name); 67 | Debug(const char *name, Level defaultLevel); 68 | ~Debug() { } 69 | void setLevel(Level level); 70 | Level getLevel(); 71 | void inc(); 72 | void dec(); 73 | void reset(); 74 | 75 | void msg(Level type, char *msg, char *fmt, ...); 76 | void trace(char *msg, char *fmt, ...); 77 | void info(char *msg, char *fmt, ...); 78 | void warn(char *msg, char *fmt, ...); 79 | void error(char *msg, char *fmt, ...); 80 | 81 | void enter(char *method); 82 | void exit(char *method); 83 | 84 | 85 | private: 86 | void vmsg(Level type, char *msg, char *fgm, va_list ap); 87 | char *indent(); 88 | char *getLevelName(Level level); 89 | static char *levelNames[ERR + 1]; 90 | static Debug global_logger; 91 | static Debug null_logger; 92 | }; 93 | 94 | ****************/ 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/util_debug.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_util_debug_h 6 | #define Include_util_debug_h 7 | 8 | #define JNIEXPORT extern "C" 9 | 10 | #undef __declspec 11 | #define __declspec(a) extern "C" 12 | 13 | #include 14 | 15 | #define DEBUG_MAX_LEVEL 10 16 | 17 | #define DEBUG_TRACE 10 18 | #define DEBUG_INFO 8 19 | #define DEBUG_WARN 6 20 | #define DEBUG_ERROR 4 21 | 22 | #define DEFAULT_LEVEL DEBUG_TRACE 23 | #define DEFAULT_INDENT_CHAR '.' 24 | 25 | extern int debug_get_level(); 26 | extern void debug_set_level(int level); 27 | extern void debug_inc(); 28 | extern void debug_dec(); 29 | extern void debug_reset(); 30 | extern void debug_vmsg(const char *type, const char *msg, const char *fmt, va_list ap); 31 | extern void debug_msg(const char *type, const char *msg, const char *fmt, ...); 32 | extern void debug_trace(const char *msg, const char *fmt, ...); 33 | extern void debug_warn(const char *msg, const char *fmt, ...); 34 | extern void debug_error(const char *msg, const char *fmt, ...); 35 | extern void debug_info(const char *msg, const char *fmt, ...); 36 | extern void debug_enter(const char *method); 37 | extern void debug_exit(const char *method); 38 | 39 | #define DEBUG_MAX_NAME 256 40 | #define DEBUG_DEFAULT_LEVEL TRACE 41 | 42 | /*** 43 | ******** Temporarily backedout 44 | class Debug { 45 | public: 46 | enum Level { 47 | ALL, 48 | TRACE, 49 | INFO, 50 | WARN, 51 | ERR, 52 | NONE, 53 | UNDEFINED 54 | }; 55 | 56 | private: 57 | Level level; 58 | int indentation; 59 | char indentBuffer[DEBUG_MAX_LEVEL + 2]; 60 | char indentChar; 61 | Debug *parent; 62 | char name[DEBUG_MAX_NAME]; 63 | 64 | public: 65 | Debug(const char *name, Debug *parent); 66 | Debug(const char *name); 67 | Debug(const char *name, Level defaultLevel); 68 | ~Debug() { } 69 | void setLevel(Level level); 70 | Level getLevel(); 71 | void inc(); 72 | void dec(); 73 | void reset(); 74 | 75 | void msg(Level type, char *msg, char *fmt, ...); 76 | void trace(char *msg, char *fmt, ...); 77 | void info(char *msg, char *fmt, ...); 78 | void warn(char *msg, char *fmt, ...); 79 | void error(char *msg, char *fmt, ...); 80 | 81 | void enter(char *method); 82 | void exit(char *method); 83 | 84 | 85 | private: 86 | void vmsg(Level type, char *msg, char *fgm, va_list ap); 87 | char *indent(); 88 | char *getLevelName(Level level); 89 | static char *levelNames[ERR + 1]; 90 | static Debug global_logger; 91 | static Debug null_logger; 92 | }; 93 | 94 | ****************/ 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/jnetpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_ids_h 4 | #define _Included_jnetpcap_ids_h 5 | 6 | #include "export.h" 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #define EXTERN extern "C" 13 | #endif 14 | 15 | extern jclass pcapClass; 16 | extern jclass byteBufferClass; 17 | extern jclass stringBuilderClass; 18 | extern jclass pcapIfClass; 19 | extern jclass pcapAddrClass; 20 | extern jclass PcapSockAddrClass; 21 | extern jclass pcapIntegerClass; 22 | extern jclass JBufferHandlerClass; 23 | extern jclass ByteBufferHandlerClass; 24 | extern jclass JPacketHandlerClass; 25 | extern jclass PcapPacketHandlerClass; 26 | 27 | extern jmethodID byteBufferIsDirectMID; 28 | extern jmethodID bufferGetPositionMID; 29 | extern jmethodID bufferGetLimitMID; 30 | extern jmethodID bufferSetLimitMID; 31 | extern jmethodID bufferSetPositionMID; 32 | extern jmethodID bufferGetPositionMID; 33 | extern jmethodID bufferGetCapacityMID; 34 | extern jmethodID JBufferHandlerNextPacketMID; 35 | extern jmethodID ByteBufferHandlerNextPacketMID; 36 | extern jmethodID JPacketHandlerNextPacketMID; 37 | extern jmethodID PcapPacketHandlerNextPacketMID; 38 | 39 | 40 | extern jclass msIpAdapterIndexMapClass; 41 | 42 | extern jfieldID pcapPhysicalFID; 43 | extern jfieldID pcapIntegerValueFID; 44 | 45 | 46 | extern jfieldID PcapPktHdrSecondsFID; 47 | extern jfieldID PcapPktHdrUSecondsFID; 48 | extern jfieldID PcapPktHdrCaplenFID; 49 | extern jfieldID PcapPktHdrLenFID; 50 | 51 | extern jfieldID PcapPktBufferFID; 52 | 53 | extern jfieldID pcapIfNextFID; 54 | extern jfieldID pcapIfNameFID; 55 | extern jfieldID pcapIfDescriptionFID; 56 | extern jfieldID pcapIfAddressesFID; 57 | extern jfieldID pcapIfFlagsFID; 58 | 59 | extern jfieldID pcapAddrNextFID; 60 | extern jfieldID pcapAddrAddrFID; 61 | extern jfieldID pcapAddrNetmaskFID; 62 | extern jfieldID pcapAddrBroadaddrFID; 63 | extern jfieldID pcapAddrDstaddrFID; 64 | 65 | extern jfieldID PcapSockAddrFamilyFID; 66 | extern jfieldID PcapSockAddrDataFID; 67 | 68 | extern jmethodID pcapConstructorMID; 69 | extern jmethodID pcapIfConstructorMID; 70 | extern jmethodID PcapSockAddrConstructorMID; 71 | extern jmethodID pcapAddrConstructorMID; 72 | extern jmethodID msIpAdapterIndexMapMID; 73 | 74 | extern jmethodID appendMID; 75 | extern jmethodID setLengthMID; 76 | 77 | extern jclass pcapStatClass; 78 | 79 | extern jfieldID pcapStatRecvFID; 80 | extern jfieldID pcapStatDropFID; 81 | extern jfieldID pcapStatIfDropFID; 82 | extern jfieldID pcapStatCaptFID; 83 | extern jfieldID pcapStatSentFID; 84 | extern jfieldID pcapStatNetdropFID; 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #endif 90 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/util_debug.h: -------------------------------------------------------------------------------- 1 | 2 | // Include this file after jni.h is included. It undefines MS compiler, def for 3 | // gcc specific one. 4 | // 5 | #ifndef Include_util_debug_h 6 | #define Include_util_debug_h 7 | 8 | #define JNIEXPORT extern "C" 9 | 10 | #undef __declspec 11 | #define __declspec(a) extern "C" 12 | 13 | #include 14 | 15 | #define DEBUG_MAX_LEVEL 10 16 | 17 | #define DEBUG_TRACE 10 18 | #define DEBUG_INFO 8 19 | #define DEBUG_WARN 6 20 | #define DEBUG_ERROR 4 21 | 22 | #define DEFAULT_LEVEL DEBUG_TRACE 23 | #define DEFAULT_INDENT_CHAR '.' 24 | 25 | extern int debug_get_level(); 26 | extern void debug_set_level(int level); 27 | extern void debug_inc(); 28 | extern void debug_dec(); 29 | extern void debug_reset(); 30 | extern void debug_vmsg(const char *type, const char *msg, const char *fmt, va_list ap); 31 | extern void debug_msg(const char *type, const char *msg, const char *fmt, ...); 32 | extern void debug_trace(const char *msg, const char *fmt, ...); 33 | extern void debug_warn(const char *msg, const char *fmt, ...); 34 | extern void debug_error(const char *msg, const char *fmt, ...); 35 | extern void debug_info(const char *msg, const char *fmt, ...); 36 | extern void debug_enter(const char *method); 37 | extern void debug_exit(const char *method); 38 | 39 | #define DEBUG_MAX_NAME 256 40 | #define DEBUG_DEFAULT_LEVEL TRACE 41 | 42 | /*** 43 | ******** Temporarily backedout 44 | class Debug { 45 | public: 46 | enum Level { 47 | ALL, 48 | TRACE, 49 | INFO, 50 | WARN, 51 | ERR, 52 | NONE, 53 | UNDEFINED 54 | }; 55 | 56 | private: 57 | Level level; 58 | int indentation; 59 | char indentBuffer[DEBUG_MAX_LEVEL + 2]; 60 | char indentChar; 61 | Debug *parent; 62 | char name[DEBUG_MAX_NAME]; 63 | 64 | public: 65 | Debug(const char *name, Debug *parent); 66 | Debug(const char *name); 67 | Debug(const char *name, Level defaultLevel); 68 | ~Debug() { } 69 | void setLevel(Level level); 70 | Level getLevel(); 71 | void inc(); 72 | void dec(); 73 | void reset(); 74 | 75 | void msg(Level type, char *msg, char *fmt, ...); 76 | void trace(char *msg, char *fmt, ...); 77 | void info(char *msg, char *fmt, ...); 78 | void warn(char *msg, char *fmt, ...); 79 | void error(char *msg, char *fmt, ...); 80 | 81 | void enter(char *method); 82 | void exit(char *method); 83 | 84 | 85 | private: 86 | void vmsg(Level type, char *msg, char *fgm, va_list ap); 87 | char *indent(); 88 | char *getLevelName(Level level); 89 | static char *levelNames[ERR + 1]; 90 | static Debug global_logger; 91 | static Debug null_logger; 92 | }; 93 | 94 | ****************/ 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/jnetpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_ids_h 4 | #define _Included_jnetpcap_ids_h 5 | 6 | #include "export.h" 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #define EXTERN extern "C" 13 | #endif 14 | 15 | extern jclass pcapClass; 16 | extern jclass byteBufferClass; 17 | extern jclass stringBuilderClass; 18 | extern jclass pcapIfClass; 19 | extern jclass pcapAddrClass; 20 | extern jclass PcapSockAddrClass; 21 | extern jclass pcapIntegerClass; 22 | extern jclass JBufferHandlerClass; 23 | extern jclass ByteBufferHandlerClass; 24 | extern jclass JPacketHandlerClass; 25 | extern jclass PcapPacketHandlerClass; 26 | 27 | extern jmethodID byteBufferIsDirectMID; 28 | extern jmethodID bufferGetPositionMID; 29 | extern jmethodID bufferGetLimitMID; 30 | extern jmethodID bufferSetLimitMID; 31 | extern jmethodID bufferSetPositionMID; 32 | extern jmethodID bufferGetPositionMID; 33 | extern jmethodID bufferGetCapacityMID; 34 | extern jmethodID JBufferHandlerNextPacketMID; 35 | extern jmethodID ByteBufferHandlerNextPacketMID; 36 | extern jmethodID JPacketHandlerNextPacketMID; 37 | extern jmethodID PcapPacketHandlerNextPacketMID; 38 | 39 | 40 | extern jclass msIpAdapterIndexMapClass; 41 | 42 | extern jfieldID pcapPhysicalFID; 43 | extern jfieldID pcapIntegerValueFID; 44 | 45 | 46 | extern jfieldID PcapPktHdrSecondsFID; 47 | extern jfieldID PcapPktHdrUSecondsFID; 48 | extern jfieldID PcapPktHdrCaplenFID; 49 | extern jfieldID PcapPktHdrLenFID; 50 | 51 | extern jfieldID PcapPktBufferFID; 52 | 53 | extern jfieldID pcapIfNextFID; 54 | extern jfieldID pcapIfNameFID; 55 | extern jfieldID pcapIfDescriptionFID; 56 | extern jfieldID pcapIfAddressesFID; 57 | extern jfieldID pcapIfFlagsFID; 58 | 59 | extern jfieldID pcapAddrNextFID; 60 | extern jfieldID pcapAddrAddrFID; 61 | extern jfieldID pcapAddrNetmaskFID; 62 | extern jfieldID pcapAddrBroadaddrFID; 63 | extern jfieldID pcapAddrDstaddrFID; 64 | 65 | extern jfieldID PcapSockAddrFamilyFID; 66 | extern jfieldID PcapSockAddrDataFID; 67 | 68 | extern jmethodID pcapConstructorMID; 69 | extern jmethodID pcapIfConstructorMID; 70 | extern jmethodID PcapSockAddrConstructorMID; 71 | extern jmethodID pcapAddrConstructorMID; 72 | extern jmethodID msIpAdapterIndexMapMID; 73 | 74 | extern jmethodID appendMID; 75 | extern jmethodID setLengthMID; 76 | 77 | extern jclass pcapStatClass; 78 | 79 | extern jfieldID pcapStatRecvFID; 80 | extern jfieldID pcapStatDropFID; 81 | extern jfieldID pcapStatIfDropFID; 82 | extern jfieldID pcapStatCaptFID; 83 | extern jfieldID pcapStatSentFID; 84 | extern jfieldID pcapStatNetdropFID; 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #endif 90 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/jnetpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_ids_h 4 | #define _Included_jnetpcap_ids_h 5 | 6 | #include "export.h" 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #define EXTERN extern "C" 13 | #endif 14 | 15 | extern jclass pcapClass; 16 | extern jclass byteBufferClass; 17 | extern jclass stringBuilderClass; 18 | extern jclass pcapIfClass; 19 | extern jclass pcapAddrClass; 20 | extern jclass PcapSockAddrClass; 21 | extern jclass pcapIntegerClass; 22 | extern jclass JBufferHandlerClass; 23 | extern jclass ByteBufferHandlerClass; 24 | extern jclass JPacketHandlerClass; 25 | extern jclass PcapPacketHandlerClass; 26 | 27 | extern jmethodID byteBufferIsDirectMID; 28 | extern jmethodID bufferGetPositionMID; 29 | extern jmethodID bufferGetLimitMID; 30 | extern jmethodID bufferSetLimitMID; 31 | extern jmethodID bufferSetPositionMID; 32 | extern jmethodID bufferGetPositionMID; 33 | extern jmethodID bufferGetCapacityMID; 34 | extern jmethodID JBufferHandlerNextPacketMID; 35 | extern jmethodID ByteBufferHandlerNextPacketMID; 36 | extern jmethodID JPacketHandlerNextPacketMID; 37 | extern jmethodID PcapPacketHandlerNextPacketMID; 38 | 39 | 40 | extern jclass msIpAdapterIndexMapClass; 41 | 42 | extern jfieldID pcapPhysicalFID; 43 | extern jfieldID pcapIntegerValueFID; 44 | 45 | 46 | extern jfieldID PcapPktHdrSecondsFID; 47 | extern jfieldID PcapPktHdrUSecondsFID; 48 | extern jfieldID PcapPktHdrCaplenFID; 49 | extern jfieldID PcapPktHdrLenFID; 50 | 51 | extern jfieldID PcapPktBufferFID; 52 | 53 | extern jfieldID pcapIfNextFID; 54 | extern jfieldID pcapIfNameFID; 55 | extern jfieldID pcapIfDescriptionFID; 56 | extern jfieldID pcapIfAddressesFID; 57 | extern jfieldID pcapIfFlagsFID; 58 | 59 | extern jfieldID pcapAddrNextFID; 60 | extern jfieldID pcapAddrAddrFID; 61 | extern jfieldID pcapAddrNetmaskFID; 62 | extern jfieldID pcapAddrBroadaddrFID; 63 | extern jfieldID pcapAddrDstaddrFID; 64 | 65 | extern jfieldID PcapSockAddrFamilyFID; 66 | extern jfieldID PcapSockAddrDataFID; 67 | 68 | extern jmethodID pcapConstructorMID; 69 | extern jmethodID pcapIfConstructorMID; 70 | extern jmethodID PcapSockAddrConstructorMID; 71 | extern jmethodID pcapAddrConstructorMID; 72 | extern jmethodID msIpAdapterIndexMapMID; 73 | 74 | extern jmethodID appendMID; 75 | extern jmethodID setLengthMID; 76 | 77 | extern jclass pcapStatClass; 78 | 79 | extern jfieldID pcapStatRecvFID; 80 | extern jfieldID pcapStatDropFID; 81 | extern jfieldID pcapStatIfDropFID; 82 | extern jfieldID pcapStatCaptFID; 83 | extern jfieldID pcapStatSentFID; 84 | extern jfieldID pcapStatNetdropFID; 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #endif 90 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/jnetpcap_ids.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_jnetpcap_ids_h 4 | #define _Included_jnetpcap_ids_h 5 | 6 | #include "export.h" 7 | 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #define EXTERN extern "C" 13 | #endif 14 | 15 | extern jclass pcapClass; 16 | extern jclass byteBufferClass; 17 | extern jclass stringBuilderClass; 18 | extern jclass pcapIfClass; 19 | extern jclass pcapAddrClass; 20 | extern jclass PcapSockAddrClass; 21 | extern jclass pcapIntegerClass; 22 | extern jclass JBufferHandlerClass; 23 | extern jclass ByteBufferHandlerClass; 24 | extern jclass JPacketHandlerClass; 25 | extern jclass PcapPacketHandlerClass; 26 | 27 | extern jmethodID byteBufferIsDirectMID; 28 | extern jmethodID bufferGetPositionMID; 29 | extern jmethodID bufferGetLimitMID; 30 | extern jmethodID bufferSetLimitMID; 31 | extern jmethodID bufferSetPositionMID; 32 | extern jmethodID bufferGetPositionMID; 33 | extern jmethodID bufferGetCapacityMID; 34 | extern jmethodID JBufferHandlerNextPacketMID; 35 | extern jmethodID ByteBufferHandlerNextPacketMID; 36 | extern jmethodID JPacketHandlerNextPacketMID; 37 | extern jmethodID PcapPacketHandlerNextPacketMID; 38 | 39 | 40 | extern jclass msIpAdapterIndexMapClass; 41 | 42 | extern jfieldID pcapPhysicalFID; 43 | extern jfieldID pcapIntegerValueFID; 44 | 45 | 46 | extern jfieldID PcapPktHdrSecondsFID; 47 | extern jfieldID PcapPktHdrUSecondsFID; 48 | extern jfieldID PcapPktHdrCaplenFID; 49 | extern jfieldID PcapPktHdrLenFID; 50 | 51 | extern jfieldID PcapPktBufferFID; 52 | 53 | extern jfieldID pcapIfNextFID; 54 | extern jfieldID pcapIfNameFID; 55 | extern jfieldID pcapIfDescriptionFID; 56 | extern jfieldID pcapIfAddressesFID; 57 | extern jfieldID pcapIfFlagsFID; 58 | 59 | extern jfieldID pcapAddrNextFID; 60 | extern jfieldID pcapAddrAddrFID; 61 | extern jfieldID pcapAddrNetmaskFID; 62 | extern jfieldID pcapAddrBroadaddrFID; 63 | extern jfieldID pcapAddrDstaddrFID; 64 | 65 | extern jfieldID PcapSockAddrFamilyFID; 66 | extern jfieldID PcapSockAddrDataFID; 67 | 68 | extern jmethodID pcapConstructorMID; 69 | extern jmethodID pcapIfConstructorMID; 70 | extern jmethodID PcapSockAddrConstructorMID; 71 | extern jmethodID pcapAddrConstructorMID; 72 | extern jmethodID msIpAdapterIndexMapMID; 73 | 74 | extern jmethodID appendMID; 75 | extern jmethodID setLengthMID; 76 | 77 | extern jclass pcapStatClass; 78 | 79 | extern jfieldID pcapStatRecvFID; 80 | extern jfieldID pcapStatDropFID; 81 | extern jfieldID pcapStatIfDropFID; 82 | extern jfieldID pcapStatCaptFID; 83 | extern jfieldID pcapStatSentFID; 84 | extern jfieldID pcapStatNetdropFID; 85 | 86 | #ifdef __cplusplus 87 | } 88 | #endif 89 | #endif 90 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/util_crc16.h: -------------------------------------------------------------------------------- 1 | /* crc16.h 2 | * Declaration of CRC-16 routines and table 3 | * 4 | * 2004 Richard van der Hoff 5 | * 6 | * $Id: crc16.h 20485 2007-01-18 18:43:30Z guy $ 7 | * 8 | * Wireshark - Network traffic analyzer 9 | * By Gerald Combs 10 | * Copyright 1998 Gerald Combs 11 | * 12 | * Copied from README.developer 13 | * 14 | * This program is free software; you can redistribute it and/or 15 | * modify it under the terms of the GNU General Public License 16 | * as published by the Free Software Foundation; either version 2 17 | * of the License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with this program; if not, write to the Free Software 26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 27 | */ 28 | 29 | #ifndef __CRC16_H_ 30 | #define __CRC16_H_ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | /* Calculate the CCITT/ITU/CRC-16 16-bit CRC 39 | 40 | (parameters for this CRC are: 41 | Polynomial: x^16 + x^12 + x^5 + 1 (0x1021); 42 | Start value 0xFFFF; 43 | XOR result with 0xFFFF; 44 | First bit is LSB) 45 | */ 46 | 47 | /** Compute CRC16 CCITT checksum of a buffer of data. 48 | @param buf The buffer containing the data. 49 | @param len The number of bytes to include in the computation. 50 | @return The CRC16 CCITT checksum. */ 51 | extern uint16_t crc16_ccitt(const uint8_t *buf, uint32_t len); 52 | 53 | /** Compute CRC16 X.25 CCITT checksum of a buffer of data. 54 | @param buf The buffer containing the data. 55 | @param len The number of bytes to include in the computation. 56 | @return The CRC16 X.25 CCITT checksum. */ 57 | extern uint16_t crc16_x25_ccitt(const uint8_t *buf, uint32_t len); 58 | 59 | /** Compute CRC16 CCITT checksum of a buffer of data. If computing the 60 | * checksum over multiple buffers and you want to feed the partial CRC16 61 | * back in, remember to take the 1's complement of the partial CRC16 first. 62 | @param buf The buffer containing the data. 63 | @param len The number of bytes to include in the computation. 64 | @param seed The seed to use. 65 | @return The CRC16 CCITT checksum (using the given seed). */ 66 | extern uint16_t crc16_ccitt_seed(const uint8_t *buf, uint32_t len, uint16_t seed); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* crc16.h */ 73 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/util_crc16.h: -------------------------------------------------------------------------------- 1 | /* crc16.h 2 | * Declaration of CRC-16 routines and table 3 | * 4 | * 2004 Richard van der Hoff 5 | * 6 | * $Id: crc16.h 20485 2007-01-18 18:43:30Z guy $ 7 | * 8 | * Wireshark - Network traffic analyzer 9 | * By Gerald Combs 10 | * Copyright 1998 Gerald Combs 11 | * 12 | * Copied from README.developer 13 | * 14 | * This program is free software; you can redistribute it and/or 15 | * modify it under the terms of the GNU General Public License 16 | * as published by the Free Software Foundation; either version 2 17 | * of the License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with this program; if not, write to the Free Software 26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 27 | */ 28 | 29 | #ifndef __CRC16_H_ 30 | #define __CRC16_H_ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | /* Calculate the CCITT/ITU/CRC-16 16-bit CRC 39 | 40 | (parameters for this CRC are: 41 | Polynomial: x^16 + x^12 + x^5 + 1 (0x1021); 42 | Start value 0xFFFF; 43 | XOR result with 0xFFFF; 44 | First bit is LSB) 45 | */ 46 | 47 | /** Compute CRC16 CCITT checksum of a buffer of data. 48 | @param buf The buffer containing the data. 49 | @param len The number of bytes to include in the computation. 50 | @return The CRC16 CCITT checksum. */ 51 | extern uint16_t crc16_ccitt(const uint8_t *buf, uint32_t len); 52 | 53 | /** Compute CRC16 X.25 CCITT checksum of a buffer of data. 54 | @param buf The buffer containing the data. 55 | @param len The number of bytes to include in the computation. 56 | @return The CRC16 X.25 CCITT checksum. */ 57 | extern uint16_t crc16_x25_ccitt(const uint8_t *buf, uint32_t len); 58 | 59 | /** Compute CRC16 CCITT checksum of a buffer of data. If computing the 60 | * checksum over multiple buffers and you want to feed the partial CRC16 61 | * back in, remember to take the 1's complement of the partial CRC16 first. 62 | @param buf The buffer containing the data. 63 | @param len The number of bytes to include in the computation. 64 | @param seed The seed to use. 65 | @return The CRC16 CCITT checksum (using the given seed). */ 66 | extern uint16_t crc16_ccitt_seed(const uint8_t *buf, uint32_t len, uint16_t seed); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* crc16.h */ 73 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/util_crc16.h: -------------------------------------------------------------------------------- 1 | /* crc16.h 2 | * Declaration of CRC-16 routines and table 3 | * 4 | * 2004 Richard van der Hoff 5 | * 6 | * $Id: crc16.h 20485 2007-01-18 18:43:30Z guy $ 7 | * 8 | * Wireshark - Network traffic analyzer 9 | * By Gerald Combs 10 | * Copyright 1998 Gerald Combs 11 | * 12 | * Copied from README.developer 13 | * 14 | * This program is free software; you can redistribute it and/or 15 | * modify it under the terms of the GNU General Public License 16 | * as published by the Free Software Foundation; either version 2 17 | * of the License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with this program; if not, write to the Free Software 26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 27 | */ 28 | 29 | #ifndef __CRC16_H_ 30 | #define __CRC16_H_ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | /* Calculate the CCITT/ITU/CRC-16 16-bit CRC 39 | 40 | (parameters for this CRC are: 41 | Polynomial: x^16 + x^12 + x^5 + 1 (0x1021); 42 | Start value 0xFFFF; 43 | XOR result with 0xFFFF; 44 | First bit is LSB) 45 | */ 46 | 47 | /** Compute CRC16 CCITT checksum of a buffer of data. 48 | @param buf The buffer containing the data. 49 | @param len The number of bytes to include in the computation. 50 | @return The CRC16 CCITT checksum. */ 51 | extern uint16_t crc16_ccitt(const uint8_t *buf, uint32_t len); 52 | 53 | /** Compute CRC16 X.25 CCITT checksum of a buffer of data. 54 | @param buf The buffer containing the data. 55 | @param len The number of bytes to include in the computation. 56 | @return The CRC16 X.25 CCITT checksum. */ 57 | extern uint16_t crc16_x25_ccitt(const uint8_t *buf, uint32_t len); 58 | 59 | /** Compute CRC16 CCITT checksum of a buffer of data. If computing the 60 | * checksum over multiple buffers and you want to feed the partial CRC16 61 | * back in, remember to take the 1's complement of the partial CRC16 first. 62 | @param buf The buffer containing the data. 63 | @param len The number of bytes to include in the computation. 64 | @param seed The seed to use. 65 | @return The CRC16 CCITT checksum (using the given seed). */ 66 | extern uint16_t crc16_ccitt_seed(const uint8_t *buf, uint32_t len, uint16_t seed); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* crc16.h */ 73 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/util_crc16.h: -------------------------------------------------------------------------------- 1 | /* crc16.h 2 | * Declaration of CRC-16 routines and table 3 | * 4 | * 2004 Richard van der Hoff 5 | * 6 | * $Id: crc16.h 20485 2007-01-18 18:43:30Z guy $ 7 | * 8 | * Wireshark - Network traffic analyzer 9 | * By Gerald Combs 10 | * Copyright 1998 Gerald Combs 11 | * 12 | * Copied from README.developer 13 | * 14 | * This program is free software; you can redistribute it and/or 15 | * modify it under the terms of the GNU General Public License 16 | * as published by the Free Software Foundation; either version 2 17 | * of the License, or (at your option) any later version. 18 | * 19 | * This program is distributed in the hope that it will be useful, 20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | * GNU General Public License for more details. 23 | * 24 | * You should have received a copy of the GNU General Public License 25 | * along with this program; if not, write to the Free Software 26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 27 | */ 28 | 29 | #ifndef __CRC16_H_ 30 | #define __CRC16_H_ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif /* __cplusplus */ 35 | 36 | #include 37 | 38 | /* Calculate the CCITT/ITU/CRC-16 16-bit CRC 39 | 40 | (parameters for this CRC are: 41 | Polynomial: x^16 + x^12 + x^5 + 1 (0x1021); 42 | Start value 0xFFFF; 43 | XOR result with 0xFFFF; 44 | First bit is LSB) 45 | */ 46 | 47 | /** Compute CRC16 CCITT checksum of a buffer of data. 48 | @param buf The buffer containing the data. 49 | @param len The number of bytes to include in the computation. 50 | @return The CRC16 CCITT checksum. */ 51 | extern uint16_t crc16_ccitt(const uint8_t *buf, uint32_t len); 52 | 53 | /** Compute CRC16 X.25 CCITT checksum of a buffer of data. 54 | @param buf The buffer containing the data. 55 | @param len The number of bytes to include in the computation. 56 | @return The CRC16 X.25 CCITT checksum. */ 57 | extern uint16_t crc16_x25_ccitt(const uint8_t *buf, uint32_t len); 58 | 59 | /** Compute CRC16 CCITT checksum of a buffer of data. If computing the 60 | * checksum over multiple buffers and you want to feed the partial CRC16 61 | * back in, remember to take the 1's complement of the partial CRC16 first. 62 | @param buf The buffer containing the data. 63 | @param len The number of bytes to include in the computation. 64 | @param seed The seed to use. 65 | @return The CRC16 CCITT checksum (using the given seed). */ 66 | extern uint16_t crc16_ccitt_seed(const uint8_t *buf, uint32_t len, uint16_t seed); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif /* __cplusplus */ 71 | 72 | #endif /* crc16.h */ 73 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/nio_jmemory.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_nio_jmemory_h 4 | #define _Included_nio_jmemory_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include "export.h" 12 | 13 | #include 14 | 15 | typedef struct memory_usage_t { 16 | uint64_t total_allocated; 17 | uint64_t total_deallocated; 18 | 19 | uint64_t total_allocate_calls; 20 | uint64_t total_deallocate_calls; 21 | 22 | uint64_t seg_0_255_bytes; 23 | uint64_t seg_256_or_above_bytes; 24 | 25 | uint64_t max_direct; 26 | uint64_t soft_direct; 27 | uint64_t reserved_direct; 28 | uint64_t available_direct; 29 | 30 | } memory_usage_t; 31 | 32 | typedef struct jni_global_ref_t { 33 | int count; // Number of references held 34 | jobject reference[]; // array of references held 35 | } jni_global_ref_t; 36 | 37 | 38 | extern jclass jmemoryClass; 39 | extern jclass jmemoryPoolClass; 40 | extern jclass jmemoryReferenceClass; 41 | 42 | extern jmethodID jmemoryToDebugStringMID; 43 | extern jmethodID jmemoryMaxDirectMemoryBreachMID; 44 | extern jmethodID jmemorySoftDirectMemoryBreachMID; 45 | extern jmethodID jmemoryCleanupMID; 46 | extern jmethodID jmemoryPeer0MID; 47 | extern jmethodID jmemoryAllocateMID; 48 | extern jmethodID jmemorySetSize0MID; 49 | 50 | extern jfieldID jmemoryPhysicalFID; 51 | extern jfieldID jmemorySizeFID; 52 | extern jfieldID jmemoryOwnerFID; 53 | extern jfieldID jmemoryKeeperFID; 54 | extern jfieldID jmemoryRefFID; 55 | extern jfieldID jmemoryRefAddressFID; 56 | extern jobject jmemoryPOINTER_CONST; // JMemory.POINTER constant reference 57 | 58 | extern jmethodID jmemoryPoolAllocateExclusiveMID; 59 | extern jmethodID jmemoryPoolDefaultMemoryPoolMID; 60 | 61 | extern jobject defaultMemoryPool; 62 | 63 | extern memory_usage_t memory_usage; 64 | 65 | // Prototypes 66 | void init_jmemory(JNIEnv *env); 67 | void *getJMemoryPhysical(JNIEnv *env, jobject obj); 68 | void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value); 69 | void jmemoryCleanup(JNIEnv *env, jobject obj); 70 | 71 | jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length, jobject owner); 72 | 73 | char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref); 74 | void jmemoryResize(JNIEnv *env, jobject obj, size_t size); 75 | char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj); 76 | char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf); 77 | 78 | #ifdef ENABLE_ASSERT 79 | #define TOKEN_TO_STRING(TOK) # TOK 80 | #define ASSERT(cond) if (!(cond)) { fprintf(stderr, "ASSERT FAILED: %s:%d \"%s\"\n", __FILE__, __LINE__, TOKEN_TO_STRING(cond)); fflush(stderr); exit(1);} 81 | #else 82 | #define ASSERT(cond) 83 | #endif 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/nio_jmemory.h: -------------------------------------------------------------------------------- 1 | /* Header for jnetpcap_utils utility methods */ 2 | 3 | #ifndef _Included_nio_jmemory_h 4 | #define _Included_nio_jmemory_h 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #define EXTERN extern "C" 8 | #endif 9 | 10 | #include 11 | #include "export.h" 12 | 13 | #include 14 | 15 | typedef struct memory_usage_t { 16 | uint64_t total_allocated; 17 | uint64_t total_deallocated; 18 | 19 | uint64_t total_allocate_calls; 20 | uint64_t total_deallocate_calls; 21 | 22 | uint64_t seg_0_255_bytes; 23 | uint64_t seg_256_or_above_bytes; 24 | 25 | uint64_t max_direct; 26 | uint64_t soft_direct; 27 | uint64_t reserved_direct; 28 | uint64_t available_direct; 29 | 30 | } memory_usage_t; 31 | 32 | typedef struct jni_global_ref_t { 33 | int count; // Number of references held 34 | jobject reference[]; // array of references held 35 | } jni_global_ref_t; 36 | 37 | 38 | extern jclass jmemoryClass; 39 | extern jclass jmemoryPoolClass; 40 | extern jclass jmemoryReferenceClass; 41 | 42 | extern jmethodID jmemoryToDebugStringMID; 43 | extern jmethodID jmemoryMaxDirectMemoryBreachMID; 44 | extern jmethodID jmemorySoftDirectMemoryBreachMID; 45 | extern jmethodID jmemoryCleanupMID; 46 | extern jmethodID jmemoryPeer0MID; 47 | extern jmethodID jmemoryAllocateMID; 48 | extern jmethodID jmemorySetSize0MID; 49 | 50 | extern jfieldID jmemoryPhysicalFID; 51 | extern jfieldID jmemorySizeFID; 52 | extern jfieldID jmemoryOwnerFID; 53 | extern jfieldID jmemoryKeeperFID; 54 | extern jfieldID jmemoryRefFID; 55 | extern jfieldID jmemoryRefAddressFID; 56 | extern jobject jmemoryPOINTER_CONST; // JMemory.POINTER constant reference 57 | 58 | extern jmethodID jmemoryPoolAllocateExclusiveMID; 59 | extern jmethodID jmemoryPoolDefaultMemoryPoolMID; 60 | 61 | extern jobject defaultMemoryPool; 62 | 63 | extern memory_usage_t memory_usage; 64 | 65 | // Prototypes 66 | void init_jmemory(JNIEnv *env); 67 | void *getJMemoryPhysical(JNIEnv *env, jobject obj); 68 | void setJMemoryPhysical(JNIEnv *env, jobject obj, jlong value); 69 | void jmemoryCleanup(JNIEnv *env, jobject obj); 70 | 71 | jint jmemoryPeer(JNIEnv *env, jobject obj, const void *ptr, size_t length, jobject owner); 72 | 73 | char *jmemoryPoolAllocate(JNIEnv *env, size_t size, jobject *obj_ref); 74 | void jmemoryResize(JNIEnv *env, jobject obj, size_t size); 75 | char *jmemoryAllocate(JNIEnv *env, size_t size, jobject obj); 76 | char *jmemoryToDebugString(JNIEnv *env, jobject obj, char *buf); 77 | 78 | #ifdef ENABLE_ASSERT 79 | #define TOKEN_TO_STRING(TOK) # TOK 80 | #define ASSERT(cond) if (!(cond)) { fprintf(stderr, "ASSERT FAILED: %s:%d \"%s\"\n", __FILE__, __LINE__, TOKEN_TO_STRING(cond)); fflush(stderr); exit(1);} 81 | #else 82 | #define ASSERT(cond) 83 | #endif 84 | 85 | #ifdef __cplusplus 86 | } 87 | #endif 88 | #endif 89 | -------------------------------------------------------------------------------- /fwd_/src/main/java/mx/itesm/reactiveFwd/OsgiPropertyConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package mx.itesm.reactiveFwd; 18 | 19 | public final class OsgiPropertyConstants { 20 | private OsgiPropertyConstants() { 21 | } 22 | 23 | static final String PACKET_OUT_ONLY = "packetOutOnly"; 24 | static final boolean PACKET_OUT_ONLY_DEFAULT = false; 25 | 26 | static final String PACKET_OUT_OFPP_TABLE = "packetOutOfppTable"; 27 | static final boolean PACKET_OUT_OFPP_TABLE_DEFAULT = false; 28 | 29 | static final String FLOW_TIMEOUT = "flowTimeout"; 30 | static final int FLOW_TIMEOUT_DEFAULT = 10; 31 | 32 | static final String FLOW_PRIORITY = "flowPriority"; 33 | static final int FLOW_PRIORITY_DEFAULT = 10; 34 | 35 | static final String IPV6_FORWARDING = "ipv6Forwarding"; 36 | static final boolean IPV6_FORWARDING_DEFAULT = false; 37 | 38 | static final String MATCH_DST_MAC_ONLY = "matchDstMacOnly"; 39 | static final boolean MATCH_DST_MAC_ONLY_DEFAULT = false; 40 | 41 | static final String MATCH_VLAN_ID = "matchVlanId"; 42 | static final boolean MATCH_VLAN_ID_DEFAULT = false; 43 | 44 | static final String MATCH_IPV4_ADDRESS = "matchIpv4Address"; 45 | static final boolean MATCH_IPV4_ADDRESS_DEFAULT = false; 46 | 47 | static final String MATCH_IPV4_DSCP = "matchIpv4Dscp"; 48 | static final boolean MATCH_IPV4_DSCP_DEFAULT = false; 49 | 50 | static final String MATCH_IPV6_ADDRESS = "matchIpv6Address"; 51 | static final boolean MATCH_IPV6_ADDRESS_DEFAULT = false; 52 | 53 | static final String MATCH_IPV6_FLOW_LABEL = "matchIpv6FlowLabel"; 54 | static final boolean MATCH_IPV6_FLOW_LABEL_DEFAULT = false; 55 | 56 | static final String MATCH_TCP_UDP_PORTS = "matchTcpUdpPorts"; 57 | static final boolean MATCH_TCP_UDP_PORTS_DEFAULT = false; 58 | 59 | static final String MATCH_ICMP_FIELDS = "matchIcmpFields"; 60 | static final boolean MATCH_ICMP_FIELDS_DEFAULT = false; 61 | 62 | static final String IGNORE_IPV4_MCAST_PACKETS = "ignoreIPv4Multicast"; 63 | static final boolean IGNORE_IPV4_MCAST_PACKETS_DEFAULT = false; 64 | 65 | static final String RECORD_METRICS = "recordMetrics"; 66 | static final boolean RECORD_METRICS_DEFAULT = false; 67 | 68 | static final String INHERIT_FLOW_TREATMENT = "inheritFlowTreatment"; 69 | static final boolean INHERIT_FLOW_TREATMENT_DEFAULT = false; 70 | } -------------------------------------------------------------------------------- /flowCollector/src/main/java/mx/itesm/FlowCollector/jnetpcap/worker/InsertCsvRow.java: -------------------------------------------------------------------------------- 1 | package mx.itesm.FlowCollector.jnetpcap.worker; 2 | 3 | 4 | import java.io.File; 5 | import java.io.FileOutputStream; 6 | import java.io.IOException; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | import static mx.itesm.FlowCollector.jnetpcap.Utils.FILE_SEP; 12 | import static mx.itesm.FlowCollector.jnetpcap.Utils.LINE_SEP; 13 | 14 | public class InsertCsvRow implements Runnable { 15 | public static final Logger logger = LoggerFactory.getLogger(InsertCsvRow.class); 16 | private String header; 17 | private List rows; 18 | private String savepath = null; 19 | private String filename = null; 20 | 21 | public InsertCsvRow(String header, List rows, String savepath, String filename) { 22 | this.header = header; 23 | this.rows = rows; 24 | this.savepath = savepath; 25 | this.filename = filename; 26 | } 27 | 28 | public InsertCsvRow(String header, String row, String savepath, String filename) { 29 | 30 | this.header = header; 31 | this.rows = new ArrayList<>(); 32 | this.savepath = savepath; 33 | this.filename = filename; 34 | 35 | rows.add(row); 36 | } 37 | 38 | @Override 39 | public void run() { 40 | insert(header,rows,savepath,filename); 41 | } 42 | 43 | public static void insert(String header,List rows,String savepath, String filename) { 44 | if (savepath == null || filename == null || rows == null || rows.size() <= 0) { 45 | String ex = String.format("savepath=%s,filename=%s", savepath, filename); 46 | throw new IllegalArgumentException(ex); 47 | } 48 | 49 | File fileSavPath = new File(savepath); 50 | 51 | if(!fileSavPath.exists()) { 52 | fileSavPath.mkdirs(); 53 | } 54 | 55 | 56 | if(!savepath.endsWith(FILE_SEP)){ 57 | savepath += FILE_SEP; 58 | } 59 | 60 | File file = new File(savepath+filename); 61 | FileOutputStream output = null; 62 | 63 | try { 64 | if (file.exists()) { 65 | output = new FileOutputStream(file, true); 66 | }else{ 67 | if (file.createNewFile()) { 68 | output = new FileOutputStream(file); 69 | } 70 | if (header != null) { 71 | output.write((header+LINE_SEP).getBytes()); 72 | } 73 | } 74 | for (String row : rows) { 75 | output.write((row+LINE_SEP).getBytes()); 76 | } 77 | 78 | } catch (IOException e) { 79 | logger.debug(e.getMessage()); 80 | } finally { 81 | try { 82 | if (output != null) { 83 | output.flush(); 84 | output.close(); 85 | } 86 | } catch (IOException e) { 87 | logger.debug(e.getMessage()); 88 | } 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.3.0/include/util_crc32.h: -------------------------------------------------------------------------------- 1 | /* crc32.h 2 | * Declaration of CRC-32 routine and table 3 | * 4 | * $Id: crc32.h 24930 2008-04-12 12:31:53Z stig $ 5 | * 6 | * Wireshark - Network traffic analyzer 7 | * By Gerald Combs 8 | * Copyright 1998 Gerald Combs 9 | * 10 | * Copied from README.developer 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef __UTIL_CRC32_H_ 28 | #define __UTIL_CRC32_H_ 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif /* __cplusplus */ 33 | 34 | #include 35 | 36 | #define CRC32C_PRELOAD 0xffffffff 37 | 38 | /* 39 | * Byte swap fix contributed by Dave Wysochanski . 40 | */ 41 | #define CRC32C_SWAP(crc32c_value) \ 42 | (((crc32c_value & 0xff000000) >> 24) | \ 43 | ((crc32c_value & 0x00ff0000) >> 8) | \ 44 | ((crc32c_value & 0x0000ff00) << 8) | \ 45 | ((crc32c_value & 0x000000ff) << 24)) 46 | 47 | #define CRC32C(c,d) (c=(c>>8)^crc32c_table[(c^(d))&0xFF]) 48 | 49 | extern const uint32_t crc32c_table[256]; 50 | 51 | /** Compute CRC32C checksum of a buffer of data. 52 | @param buf The buffer containing the data. 53 | @param len The number of bytes to include in the computation. 54 | @param crc The preload value for the CRC32C computation. 55 | @return The CRC32C checksum. */ 56 | extern uint32_t calculate_crc32c(const void *buf, int len, uint32_t crc); 57 | 58 | extern const uint32_t crc32_ccitt_table[256]; 59 | 60 | /** Compute CRC32 CCITT checksum of a buffer of data. 61 | @param buf The buffer containing the data. 62 | @param len The number of bytes to include in the computation. 63 | @return The CRC32 CCITT checksum. */ 64 | extern uint32_t crc32_ccitt(const uint8_t *buf, uint32_t len); 65 | 66 | /** Compute CRC32 CCITT checksum of a buffer of data. If computing the 67 | * checksum over multiple buffers and you want to feed the partial CRC32 68 | * back in, remember to take the 1's complement of the partial CRC32 first. 69 | @param buf The buffer containing the data. 70 | @param len The number of bytes to include in the computation. 71 | @param seed The seed to use. 72 | @return The CRC32 CCITT checksum (using the given seed). */ 73 | extern uint32_t crc32_ccitt_seed(const uint8_t *buf, uint32_t len, uint32_t seed); 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif /* __cplusplus */ 79 | 80 | #endif /* util_crc32.h */ 81 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.3.0/include/util_crc32.h: -------------------------------------------------------------------------------- 1 | /* crc32.h 2 | * Declaration of CRC-32 routine and table 3 | * 4 | * $Id: crc32.h 24930 2008-04-12 12:31:53Z stig $ 5 | * 6 | * Wireshark - Network traffic analyzer 7 | * By Gerald Combs 8 | * Copyright 1998 Gerald Combs 9 | * 10 | * Copied from README.developer 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef __UTIL_CRC32_H_ 28 | #define __UTIL_CRC32_H_ 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif /* __cplusplus */ 33 | 34 | #include 35 | 36 | #define CRC32C_PRELOAD 0xffffffff 37 | 38 | /* 39 | * Byte swap fix contributed by Dave Wysochanski . 40 | */ 41 | #define CRC32C_SWAP(crc32c_value) \ 42 | (((crc32c_value & 0xff000000) >> 24) | \ 43 | ((crc32c_value & 0x00ff0000) >> 8) | \ 44 | ((crc32c_value & 0x0000ff00) << 8) | \ 45 | ((crc32c_value & 0x000000ff) << 24)) 46 | 47 | #define CRC32C(c,d) (c=(c>>8)^crc32c_table[(c^(d))&0xFF]) 48 | 49 | extern const uint32_t crc32c_table[256]; 50 | 51 | /** Compute CRC32C checksum of a buffer of data. 52 | @param buf The buffer containing the data. 53 | @param len The number of bytes to include in the computation. 54 | @param crc The preload value for the CRC32C computation. 55 | @return The CRC32C checksum. */ 56 | extern uint32_t calculate_crc32c(const void *buf, int len, uint32_t crc); 57 | 58 | extern const uint32_t crc32_ccitt_table[256]; 59 | 60 | /** Compute CRC32 CCITT checksum of a buffer of data. 61 | @param buf The buffer containing the data. 62 | @param len The number of bytes to include in the computation. 63 | @return The CRC32 CCITT checksum. */ 64 | extern uint32_t crc32_ccitt(const uint8_t *buf, uint32_t len); 65 | 66 | /** Compute CRC32 CCITT checksum of a buffer of data. If computing the 67 | * checksum over multiple buffers and you want to feed the partial CRC32 68 | * back in, remember to take the 1's complement of the partial CRC32 first. 69 | @param buf The buffer containing the data. 70 | @param len The number of bytes to include in the computation. 71 | @param seed The seed to use. 72 | @return The CRC32 CCITT checksum (using the given seed). */ 73 | extern uint32_t crc32_ccitt_seed(const uint8_t *buf, uint32_t len, uint32_t seed); 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif /* __cplusplus */ 79 | 80 | #endif /* util_crc32.h */ 81 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/win/jnetpcap-1.4.r1425/include/util_crc32.h: -------------------------------------------------------------------------------- 1 | /* crc32.h 2 | * Declaration of CRC-32 routine and table 3 | * 4 | * $Id: crc32.h 24930 2008-04-12 12:31:53Z stig $ 5 | * 6 | * Wireshark - Network traffic analyzer 7 | * By Gerald Combs 8 | * Copyright 1998 Gerald Combs 9 | * 10 | * Copied from README.developer 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef __UTIL_CRC32_H_ 28 | #define __UTIL_CRC32_H_ 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif /* __cplusplus */ 33 | 34 | #include 35 | 36 | #define CRC32C_PRELOAD 0xffffffff 37 | 38 | /* 39 | * Byte swap fix contributed by Dave Wysochanski . 40 | */ 41 | #define CRC32C_SWAP(crc32c_value) \ 42 | (((crc32c_value & 0xff000000) >> 24) | \ 43 | ((crc32c_value & 0x00ff0000) >> 8) | \ 44 | ((crc32c_value & 0x0000ff00) << 8) | \ 45 | ((crc32c_value & 0x000000ff) << 24)) 46 | 47 | #define CRC32C(c,d) (c=(c>>8)^crc32c_table[(c^(d))&0xFF]) 48 | 49 | extern const uint32_t crc32c_table[256]; 50 | 51 | /** Compute CRC32C checksum of a buffer of data. 52 | @param buf The buffer containing the data. 53 | @param len The number of bytes to include in the computation. 54 | @param crc The preload value for the CRC32C computation. 55 | @return The CRC32C checksum. */ 56 | extern uint32_t calculate_crc32c(const void *buf, int len, uint32_t crc); 57 | 58 | extern const uint32_t crc32_ccitt_table[256]; 59 | 60 | /** Compute CRC32 CCITT checksum of a buffer of data. 61 | @param buf The buffer containing the data. 62 | @param len The number of bytes to include in the computation. 63 | @return The CRC32 CCITT checksum. */ 64 | extern uint32_t crc32_ccitt(const uint8_t *buf, uint32_t len); 65 | 66 | /** Compute CRC32 CCITT checksum of a buffer of data. If computing the 67 | * checksum over multiple buffers and you want to feed the partial CRC32 68 | * back in, remember to take the 1's complement of the partial CRC32 first. 69 | @param buf The buffer containing the data. 70 | @param len The number of bytes to include in the computation. 71 | @param seed The seed to use. 72 | @return The CRC32 CCITT checksum (using the given seed). */ 73 | extern uint32_t crc32_ccitt_seed(const uint8_t *buf, uint32_t len, uint32_t seed); 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif /* __cplusplus */ 79 | 80 | #endif /* util_crc32.h */ 81 | -------------------------------------------------------------------------------- /flowCollector/jnetpcap/linux/jnetpcap-1.4.r1425/include/util_crc32.h: -------------------------------------------------------------------------------- 1 | /* crc32.h 2 | * Declaration of CRC-32 routine and table 3 | * 4 | * $Id: crc32.h 24930 2008-04-12 12:31:53Z stig $ 5 | * 6 | * Wireshark - Network traffic analyzer 7 | * By Gerald Combs 8 | * Copyright 1998 Gerald Combs 9 | * 10 | * Copied from README.developer 11 | * 12 | * This program is free software; you can redistribute it and/or 13 | * modify it under the terms of the GNU General Public License 14 | * as published by the Free Software Foundation; either version 2 15 | * of the License, or (at your option) any later version. 16 | * 17 | * This program is distributed in the hope that it will be useful, 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | * GNU General Public License for more details. 21 | * 22 | * You should have received a copy of the GNU General Public License 23 | * along with this program; if not, write to the Free Software 24 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 25 | */ 26 | 27 | #ifndef __UTIL_CRC32_H_ 28 | #define __UTIL_CRC32_H_ 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif /* __cplusplus */ 33 | 34 | #include 35 | 36 | #define CRC32C_PRELOAD 0xffffffff 37 | 38 | /* 39 | * Byte swap fix contributed by Dave Wysochanski . 40 | */ 41 | #define CRC32C_SWAP(crc32c_value) \ 42 | (((crc32c_value & 0xff000000) >> 24) | \ 43 | ((crc32c_value & 0x00ff0000) >> 8) | \ 44 | ((crc32c_value & 0x0000ff00) << 8) | \ 45 | ((crc32c_value & 0x000000ff) << 24)) 46 | 47 | #define CRC32C(c,d) (c=(c>>8)^crc32c_table[(c^(d))&0xFF]) 48 | 49 | extern const uint32_t crc32c_table[256]; 50 | 51 | /** Compute CRC32C checksum of a buffer of data. 52 | @param buf The buffer containing the data. 53 | @param len The number of bytes to include in the computation. 54 | @param crc The preload value for the CRC32C computation. 55 | @return The CRC32C checksum. */ 56 | extern uint32_t calculate_crc32c(const void *buf, int len, uint32_t crc); 57 | 58 | extern const uint32_t crc32_ccitt_table[256]; 59 | 60 | /** Compute CRC32 CCITT checksum of a buffer of data. 61 | @param buf The buffer containing the data. 62 | @param len The number of bytes to include in the computation. 63 | @return The CRC32 CCITT checksum. */ 64 | extern uint32_t crc32_ccitt(const uint8_t *buf, uint32_t len); 65 | 66 | /** Compute CRC32 CCITT checksum of a buffer of data. If computing the 67 | * checksum over multiple buffers and you want to feed the partial CRC32 68 | * back in, remember to take the 1's complement of the partial CRC32 first. 69 | @param buf The buffer containing the data. 70 | @param len The number of bytes to include in the computation. 71 | @param seed The seed to use. 72 | @return The CRC32 CCITT checksum (using the given seed). */ 73 | extern uint32_t crc32_ccitt_seed(const uint8_t *buf, uint32_t len, uint32_t seed); 74 | 75 | 76 | #ifdef __cplusplus 77 | } 78 | #endif /* __cplusplus */ 79 | 80 | #endif /* util_crc32.h */ 81 | -------------------------------------------------------------------------------- /fwd_/target/classes/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bnd-LastModified: 1684963606313 3 | Build-Jdk: 11.0.7 4 | Built-By: root 5 | Bundle-Description: Reactive forwarding for ONOS 6 | Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt 7 | Bundle-ManifestVersion: 2 8 | Bundle-Name: reactiveFwd 9 | Bundle-SymbolicName: mx.itesm.reactiveFwd.reactiveFwd 10 | Bundle-Version: 1.0.0.SNAPSHOT 11 | Created-By: Apache Maven Bundle Plugin 12 | Export-Package: mx.itesm.reactiveFwd;uses:="org.onlab.graph,org.onlab.pa 13 | cket,org.onosproject.cfg,org.onosproject.core,org.onosproject.net,org.o 14 | nosproject.net.flow,org.onosproject.net.flowobjective,org.onosproject.n 15 | et.host,org.onosproject.net.intent,org.onosproject.net.link,org.onospro 16 | ject.net.packet,org.onosproject.net.topology,org.onosproject.store.serv 17 | ice,org.osgi.service.component";version="1.0.0" 18 | Import-Package: com.google.common.base;version="[22.0,23)",com.google.co 19 | mmon.collect;version="[22.0,23)",org.onlab.graph;version="[2.2,3)",org. 20 | onlab.packet;version="[2.2,3)",org.onlab.util;version="[2.2,3)",org.ono 21 | sproject.cfg;version="[2.2,3)",org.onosproject.core;version="[2.2,3)",o 22 | rg.onosproject.event;version="[2.2,3)",org.onosproject.net;version="[2. 23 | 2,3)",org.onosproject.net.flow;version="[2.2,3)",org.onosproject.net.fl 24 | ow.criteria;version="[2.2,3)",org.onosproject.net.flow.instructions;ver 25 | sion="[2.2,3)",org.onosproject.net.flowobjective;version="[2.2,3)",org. 26 | onosproject.net.host;version="[2.2,3)",org.onosproject.net.intent;versi 27 | on="[2.2,3)",org.onosproject.net.link;version="[2.2,3)",org.onosproject 28 | .net.packet;version="[2.2,3)",org.onosproject.net.topology;version="[2. 29 | 2,3)",org.onosproject.store.service;version="[2.2,3)",org.osgi.service. 30 | component;version="[1.4,2)",org.slf4j;version="[1.7,2)" 31 | Require-Capability: osgi.service;filter:="(objectClass=org.onosproject.c 32 | fg.ComponentConfigService)";effective:=active,osgi.service;filter:="(ob 33 | jectClass=org.onosproject.core.CoreService)";effective:=active,osgi.ser 34 | vice;filter:="(objectClass=org.onosproject.net.flow.FlowRuleService)";e 35 | ffective:=active,osgi.service;filter:="(objectClass=org.onosproject.net 36 | .flowobjective.FlowObjectiveService)";effective:=active,osgi.service;fi 37 | lter:="(objectClass=org.onosproject.net.host.HostService)";effective:=a 38 | ctive,osgi.service;filter:="(objectClass=org.onosproject.net.intent.Int 39 | entService)";effective:=active,osgi.service;filter:="(objectClass=org.o 40 | nosproject.net.link.LinkService)";effective:=active,osgi.service;filter 41 | :="(objectClass=org.onosproject.net.packet.PacketService)";effective:=a 42 | ctive,osgi.service;filter:="(objectClass=org.onosproject.net.topology.T 43 | opologyService)";effective:=active,osgi.service;filter:="(objectClass=o 44 | rg.onosproject.store.service.StorageService)";effective:=active,osgi.ex 45 | tender;filter:="(&(osgi.extender=osgi.component)(version>=1.4.0)(!(vers 46 | ion>=2.0.0)))",osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=11))" 47 | Service-Component: OSGI-INF/mx.itesm.reactiveFwd.reactiveFwd.xml 48 | Tool: Bnd-4.1.0.201810181252 49 | -------------------------------------------------------------------------------- /traffic_engineering/src/main/java/org/itesm/resetConnection/impl/OsgiPropertyConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018-present Open Networking Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.itesm.resetConnection.impl; 18 | 19 | public final class OsgiPropertyConstants { 20 | private OsgiPropertyConstants() { 21 | } 22 | 23 | static final String PACKET_OUT_ONLY = "packetOutOnly"; 24 | static final boolean PACKET_OUT_ONLY_DEFAULT = false; 25 | 26 | static final String PACKET_OUT_OFPP_TABLE = "packetOutOfppTable"; 27 | static final boolean PACKET_OUT_OFPP_TABLE_DEFAULT = false; 28 | 29 | static final String FLOW_TIMEOUT = "flowTimeout"; 30 | static final int FLOW_TIMEOUT_DEFAULT = 10; 31 | 32 | static final String FLOW_PRIORITY = "flowPriority"; 33 | static final int FLOW_PRIORITY_DEFAULT = 10; 34 | 35 | static final String IPV6_FORWARDING = "ipv6Forwarding"; 36 | static final boolean IPV6_FORWARDING_DEFAULT = false; 37 | 38 | static final String MATCH_DST_MAC_ONLY = "matchDstMacOnly"; 39 | static final boolean MATCH_DST_MAC_ONLY_DEFAULT = false; 40 | 41 | static final String MATCH_VLAN_ID = "matchVlanId"; 42 | static final boolean MATCH_VLAN_ID_DEFAULT = false; 43 | 44 | static final String MATCH_IPV4_ADDRESS = "matchIpv4Address"; 45 | static final boolean MATCH_IPV4_ADDRESS_DEFAULT = false; 46 | 47 | static final String MATCH_IPV4_DSCP = "matchIpv4Dscp"; 48 | static final boolean MATCH_IPV4_DSCP_DEFAULT = false; 49 | 50 | static final String MATCH_IPV6_ADDRESS = "matchIpv6Address"; 51 | static final boolean MATCH_IPV6_ADDRESS_DEFAULT = false; 52 | 53 | static final String MATCH_IPV6_FLOW_LABEL = "matchIpv6FlowLabel"; 54 | static final boolean MATCH_IPV6_FLOW_LABEL_DEFAULT = false; 55 | 56 | static final String MATCH_TCP_UDP_PORTS = "matchTcpUdpPorts"; 57 | static final boolean MATCH_TCP_UDP_PORTS_DEFAULT = false; 58 | 59 | static final String MATCH_ICMP_FIELDS = "matchIcmpFields"; 60 | static final boolean MATCH_ICMP_FIELDS_DEFAULT = false; 61 | 62 | static final String IGNORE_IPV4_MCAST_PACKETS = "ignoreIPv4Multicast"; 63 | static final boolean IGNORE_IPV4_MCAST_PACKETS_DEFAULT = false; 64 | 65 | static final String RECORD_METRICS = "recordMetrics"; 66 | static final boolean RECORD_METRICS_DEFAULT = false; 67 | 68 | static final String INHERIT_FLOW_TREATMENT = "inheritFlowTreatment"; 69 | static final boolean INHERIT_FLOW_TREATMENT_DEFAULT = false; 70 | 71 | 72 | static final String PROBE_SPLITER = ";"; 73 | static final short PROBE_ETHERTYPE = 0x3366; 74 | 75 | static final String PROBE_SRC = "FF:FF:FF:FF:FF:FF"; 76 | 77 | static final int PCEP_PORT = 80; 78 | 79 | } -------------------------------------------------------------------------------- /fwd_/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 4.0.0 19 | 20 | 21 | org.onosproject 22 | onos-dependencies 23 | 2.2.1-b2 24 | 25 | 26 | mx.itesm.reactiveFwd 27 | reactiveFwd 28 | 1.0-SNAPSHOT 29 | bundle 30 | 31 | Reactive forwarding for ONOS 32 | http://onosproject.org 33 | 34 | 35 | mx.itesm.reactiveFwd 36 | Reactive Forwarding 37 | ITESM 38 | 43 | 44 | 45 | 46 | 47 | org.onosproject 48 | onos-api 49 | ${onos.version} 50 | provided 51 | 52 | 53 | 54 | org.onosproject 55 | onlab-osgi 56 | ${onos.version} 57 | provided 58 | 59 | 60 | 61 | org.onosproject 62 | onlab-misc 63 | ${onos.version} 64 | provided 65 | 66 | 67 | 68 | org.onosproject 69 | onos-api 70 | ${onos.version} 71 | test 72 | tests 73 | 74 | 75 | 76 | 77 | 78 | 79 | org.onosproject 80 | onos-maven-plugin 81 | 82 | 83 | 84 | 85 | 86 | --------------------------------------------------------------------------------