## 5 Transmission Rate Control Scheme Based on Network Node Bandwidth Allocation
### Scheme Process  
The process of the _Server_ is shown in Algorithm 3. After the _Server_ sends a negotiation request message, it receives the negotiation message and adjustment message for processing. After reading the header information (line 2) in the message, it first determines the type of received message (line 3), and if it is a negotiation successful message, then it sets the sending rate to the rate \(Max\) in the message (line 4). If the message type is for failed negotiation (line 5), then it reselects the transmission path for negotiation or waits for some time before proceeding with negotiation (line 6). If there is an increase transmission rate message (line 7), then it uses the rate _Speed_ in the message as the current provide rate of the node and sends a negotiation request (lines 8-9). If there is a reduce transmission rate message (line 10), then it is necessary to judge the current transmission rate and the size of the adjusted rate \(Speed\) in the message. Since other nodes may have adjusted it, the smaller value (line 11) is taken. ```
1 The server receives a negotiation message or adjustment message;
2 Read the \(Type,ID,Max,Min,Rtt,Speed\) field in the header of the message;
3 if\(Type==Negotiation\) successfulthen
4 set\(send\_speed_{ID}\) to \(Max\);
5 elseif\(Type==Negotiation\) failedthen
6 choose another path or wait;
7 elseif\(Type==Increase\) transmission ratethen
8 set\(provide\_speed_{ID}\) to \(Speed\);
9 send negotiation request message;
10 elseif\(Type==Reduce\) transmission ratethen
11 set\(send\_speed_{ID}\) to \(min(Speed,send\_speed_{ID})\);
12 end if
```  
**Algorithm 3**Server negotiation process  
The processing process of \(RouterA\) and \(RouterB\) is shown in Algorithm 4. The router receives the negotiation message, reads the header information (line 2), and determines the received message type. If it is a negotiation request message (line 3), then it calculates the allocatable bandwidth value (line 4) based on the bandwidth allocation algorithm. If the allocated bandwidth is less than the \(Min\) field value (line 5) in the message, then it sends a negotiation failed message and no longer forwards the negotiation request message (line 6). If the allocated bandwidth is less than the \(Max\) field value (line 8), then it updates the  
Figure 3: Adjustment message. Figure 2: Negotiation message. message's \(Max\) field (line 9). The network node records the bandwidth allocation result (line 11), continues to forward the negotiation request message (line 12), and then sends the increase transmission rate message according to the list of transmissions \(L_{i}\) that need to increase their transmission rates (lines 13-15) and sends the reduce transmission rate message according to the list of transmissions \(L_{r}\) that need to decrease their transmission rates (lines 16-18). If there is a negotiation successful message (line 20), and if the transmission rate in the record is greater than the \(Max\) field value (line 21) in the message, then it sets the bottleneck flag of the transmission \(ctl\_flag\) to false (line 22). If the transmission rate in the record is equal to the \(Max\) field value (line 23) in the message, then it sets the bottleneck flag to true (line 24). If the transmission termination message or record timeout occurs (line 26), then it deletes the corresponding transmission record (line 27).