# An Adaptive Security Framework for Internet of Things Networks Leveraging SDN and Machine Learning
## 6 Performance Analysis
### Channel Latency  
To evaluate the effectiveness of the Enhanced SCAFFOLD protocol in maintaining quality of service during threats, we conducted extensive simulations and measured the latency overhead under various network scenarios and attack conditions. Table 12 presents the latency measurements for different network technologies (WiFi, LTE, and wired) and traffic patterns (custom IoT traffic, video conferencing, SSH sessions, and variable traffic loads) under normal conditions and during attacks. \begin{table}
\begin{tabular}{c c c c c} \hline
**Attack Type** & **Minimum (ms)** & **Maximum (ms)** & **Average (ms)** & **Median (ms)** \\ \hline
**DDoS** & 26 & 38 & 31 & 29 \\ \hline
**Reconnaissance** & 33 & 62 & 47 & 44 \\ \hline
**MITM** & 41 & 71 & 53 & 52 \\ \hline
**Malware** & 39 & 67 & 49 & 48 \\ \hline \end{tabular}
\end{table} 
Table 11: Attack Mitigation Delay. The results demonstrate that the Enhanced SCAFFOLD protocol introduces minimal latency overhead during the attack scenarios. For instance, in the WiFi network, the latency increased from 32 ms under normal conditions to 34 ms during the attacks, indicating that the protocol effectively contains the threats while maintaining network performance. Similar trends can be observed for LTE and wired networks, with the attack latencies being only slightly higher than the normal latencies. When considering different traffic patterns, the Enhanced SCAFFOLD protocol showcased its ability to preserve quality of service. Custom IoT traffic experienced a small increase in latency from 38 ms to 42 ms during the attacks, highlighting the protocol's capability to handle specialized IoT protocols. Video conferencing and SSH sessions also exhibited minor latency increases of 3 ms each, demonstrating the protocol's effectiveness in securing multimedia applications and remote sessions. To further validate the protocol's performance under varying network loads, we measured the latency for high, medium, and low traffic scenarios. As expected, the high load scenario experienced the largest latency increase from 62 ms to 68 ms during the attacks. However, the protocol managed to maintain availability and contain the latency impact to an acceptable level. The medium- and low-load scenarios showed latency increases of 5 ms and 3 ms, respectively, confirming the protocol's ability to operate efficiently under typical network conditions. These quantitative results provide concrete evidence of the Enhanced SCAFFOLD protocol's effectiveness in maintaining low latency overhead and ensuring quality of service during threat scenarios. The low latency effect, seen across various network technologies, traffic patterns, and load circumstances, emphasizes the resilience and usefulness of the protocol for practical IoT deployments. We contrasted Enhanced SCAFFOLD's latency overhead with those of other security frameworks in use to put these findings into context. Studies on DTLS and MQTT-SN have shown 10-20 ms latency increases during attacks. The latency overhead of the Enhanced SCAFFOLD protocol is usually less than 5 ms. This comparison shows our framework's better service quality sustainability. Several important aspects of the Enhanced SCAFFOLD protocol are responsible for the reduced latency overhead. The computational load on resource-constrained IoT devices is reduced via the use of improved key exchange protocols and lightweight cryptographic primitives. Furthermore, minimal latency and the effective use of network resources are guaranteed by the SDN controller's capacity to selectively reject harmful traffic while permitting valid flows. The Enhanced SCAFFOLD protocol's ability to maintain minimal latency overhead and guarantee quality of service under threat situations is strongly supported by the quantitative data reported in this section. Our suggested approach's effectiveness and superiority are shown by its negligible latency impact under a variety of network situations and by