# A Jamming-Resilient and Scalable Broadcasting Algorithm for Multiple Access Channel Networks
## 5 Model of Injection  
In this section, we describe the models used for injecting packets into nodes. The performance of the three broadcasting algorithms is evaluated using packet injection models that simulate network traffic activity [41; 42]. Deterministic broadcasting algorithms are analyzed using an adversarial model of injection, in which injection is controlled by an adversary. One of the main advantages of using an adversarial model of injection over Poisson arrival of a packet is the absence of stochastic assumptions [43; 44; 45; 46]. Two different traffic injection models are used to evaluate the performance of these broadcast algorithms. One of these models is based on the leaky bucket adversary [20; 47], in which the adversary has full control over which nodes get injected with new packets. The LBIM possesses knowledge about the type of broadcasting algorithm being used. Based on this knowledge, the LBIM simulates worst-case network traffic such that injected packets make queues grow significantly or out of control as a result of the algorithm's failure to keep up with injected packets. This model is defined based on the parameters \(\rho\) and \(\beta\), where \(\rho\) represents the injection rate, which is a real number such that \(0<\rho\leq 1.0\). The parameter \(\beta\) represents the maximum number of packets that can be injected in a single round, also known as the burstiness, which is an integer number such that \(\beta\geq 1\). The second adversarial model of injection is based on the randomized adversary developed in [21]. The RIM is based on the LBIM, with an additional restriction on the power of the adversary. In this model, each node has an individual injection rate \(\rho_{i}\) such that \(\sum_{i=1}^{n}=1.0\), where \(i\) is the node's number. The RIM simulates network traffic differing from that of the LBIM. The two traffic injection models are also known as one-activating, as they can activate no more than one node in each round. We studied the network traffic behavior of both types of adversarial models and compared them with real-world network traffic. The main objective of this comparison is to demonstrate that the network traffic behavior for the two adversarial models of injection resembles the network traffic behavior of real-world networks. The network traffic behavior is compared based on injection rates of packets among the nodes during a specified time period. A capture tool was developed in Python using the Scapy library to collect real-world network traffic [48]. This tool was used to capture wireless network traffic in several environments, including university campuses, hotels, coffee shops, and residential apartment complexes (RAC). For each environment, the traffic was captured for a period of 1-24 h and saved in pcap files. An analysis tool was also developed to process and analyze each pcap file for different time durations including 5, 10, and 15 minutes, which transforms the data into synchronous timing and converts each packet's source and destination addresses as a unique ID, beginning from 1. The transformed data was then saved in a CSV file, which was then analyzed for the number of active nodes and the injection rate of packets per node per unit of time. For both the LBIM and the RIM, a simulation was developed in Java to model their injection behavior. Several simulations were run for different network sizes based on the number of nodes. The network traffic was recorded for each simulation as a CSV file. Charts for each simulation were developed that displayed similar network traffic behavior for each run regardless of the number of nodes in the network. For the RIM, the injection rate for each node was within 1% of any other node, which showed almost uniform distribution of injected packets (see Figure 2). As the RIM has the additional restriction of individual injection rates as well as randomization, this resulted in almost equal distribution of injected packets among the nodes.